A058842 From Renyi's "beta expansion of 1 in base 3/2": sequence gives a(1), a(2), ... where x(n) = a(n)/2^n, with 0 < a(n) < 2^n, a(1) = 1, a(n) = 3*a(n-1) modulo 2^n.
1, 3, 1, 3, 9, 27, 81, 243, 217, 651, 1953, 1763, 5289, 15867, 14833, 44499, 2425, 7275, 21825, 65475, 196425, 589275, 1767825, 5303475, 15910425, 47731275, 8976097, 26928291, 80784873, 242354619, 727063857, 2181191571, 6543574713
Offset: 1
References
- A. Renyi (1957), Representation for real numbers and their ergodic properties, Acta. Math. Acad. Sci. Hung., 8, 477-493.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Programs
-
Haskell
import Data.Ratio ((%), numerator, denominator) a058842 n = a058842_list !! (n-1) a058842_list = map numerator (renyi 1 []) where renyi :: Rational -> [Rational] -> [Rational] renyi x xs = r : renyi r (x:xs) where r = q - fromInteger ((numerator q) `div` (denominator q)) q = 3%2 * x -- Reinhard Zumkeller, Jun 28 2011
-
Mathematica
x[1] = 1; x[n_] := x[n] = (3/2)*x[n-1] - Floor[(3/2)*x[n-1]]; a[n_] := x[n+1]*2^(n); Table[a[n], {n, 1, 33}] (* Jean-François Alcover, Oct 13 2011, after Benoit Cloitre *)
Formula
Let x(1)=1, x(n+1) = (3/2)*x(n) - floor((3/2)*x(n)); then a(n) = x(n)*2^n - Benoit Cloitre, Aug 27 2002
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Feb 22 2001
Comments