A058840 From Renyi's "beta expansion of 1 in base 3/2": sequence gives y(0), y(1), ...
1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0
Offset: 0
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 = 0..10000
- Aubrey J. Kempner, Anormal Systems of Numeration, American Mathematical Monthly, volume 43, number 10, December 1936, pages 610-617.
Programs
-
Haskell
import Data.Ratio ((%), numerator, denominator) a058840 n = a058840_list !! n a058840_list = 1 : renyi' 1 where renyi' x = y : renyi' r where (r, y) | q > 1 = (q - 1, 1) | otherwise = (q, 0) q = 3%2 * x -- Reinhard Zumkeller, Jul 01 2011
-
Mathematica
r = 3/2; x = 1; a[0] = a[1] = 1; For[n = 2, n<105, n++, x = If[r x > 1, r x - 1, r x]; a[n] = Floor[r x]]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Dec 21 2018, a solution I owe to Benoit Cloitre *)
-
PARI
a_vector(len) = my(v=vector(len),c=2,d=1); for(i=1,len, if(c>=d,c-=d;v[i]=1); c*=3;d*=2); v; \\ Kevin Ryde, Dec 06 2019
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Feb 22 2001
Comments