# Beta-numeration system¶

Beta-numeration

See for instance [Rényi1957] or [Parry1960].

EXAMPLES:

sage: from slabbe import BetaTransformation
sage: z = polygen(QQ, 'z')
sage: K.<phi> = NumberField(z**2-z-1, 'phi', embedding=RR(1.6))
sage: T = BetaTransformation(phi)
sage: T.orbit(.1, 5)
[0.100000000000000,
0.161803398874990,
0.261803398874990,
0.423606797749979,
0.685410196624969,
0.109016994374948]
sage: T.greedy_beta_expansion(.1, 10)
[0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0]

REFERENCES:

Rényi1957

Rényi, A. « Representations for real numbers and their ergodic properties ». Acta Mathematica. Academiae Scientiarum Hungaricae 8 (1957): 477–493. https://doi.org/10.1007/BF02020331.

Parry1960

Parry, W. « On the \$beta\$-expansions of real numbers ». Acta Mathematica. Academiae Scientiarum Hungaricae 11 (1960): 401–416. https://doi.org/10.1007/BF02020954.

AUTHOR:

• Sébastien Labbé, September 8, 2020

class slabbe.beta_numeration_system.BetaTransformation(beta)

Bases: object

INPUT:

• beta – real number

EXAMPLES:

sage: from slabbe import BetaTransformation
sage: z = polygen(QQ, 'z')
sage: K.<phi> = NumberField(z**2-z-1, 'phi', embedding=RR(1.6))
sage: BetaTransformation(phi)
β-transformation with β = phi ≈ 1.61803398874989
greedy_beta_expansion(x, n)

Return the beta expansion of x.

INPUT:

• x – real number in [0,1]

• n – positive integer

OUTPUT:

list

EXAMPLES:

sage: from slabbe import BetaTransformation
sage: z = polygen(QQ, 'z')
sage: K.<phi> = NumberField(z**2-z-1, 'phi', embedding=RR(1.6))
sage: T = BetaTransformation(phi)
sage: T.greedy_beta_expansion(.1, 10)
[0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0]
sage: T.greedy_beta_expansion(pi-3, 10)
[0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0]
orbit(x, n)

Return the orbit of length n under the beta transformation starting at x.

INPUT:

• x – real number in [0,1]

• n – positive integer

OUTPUT:

list

EXAMPLES:

sage: from slabbe import BetaTransformation
sage: z = polygen(QQ, 'z')
sage: K.<phi> = NumberField(z**2-z-1, 'phi', embedding=RR(1.6))
sage: T = BetaTransformation(phi)
sage: T.orbit(.1, 5)
[0.100000000000000,
0.161803398874990,
0.261803398874990,
0.423606797749979,
0.685410196624969,
0.109016994374948]
sage: T.orbit(pi-3, 5)
[pi - 3,
1/2*(pi - 3)*(sqrt(5) + 1),
1/4*(pi - 3)*(sqrt(5) + 1)^2,
1/8*(pi - 3)*(sqrt(5) + 1)^3,
1/16*(pi - 3)*(sqrt(5) + 1)^4,
1/32*(pi - 3)*(sqrt(5) + 1)^5 - 1]
plot_me()

Return the plot of the beta-transformation on interval [0,1].

EXAMPLES:

sage: from slabbe import BetaTransformation
sage: z = polygen(QQ, 'z')
sage: K.<phi> = NumberField(z**2-z-1, 'phi', embedding=RR(1.6))
sage: T = BetaTransformation(phi)
sage: _ = T.plot_me()