Beta-expansions of Pisot and Salem numbers