cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A058840 From Renyi's "beta expansion of 1 in base 3/2": sequence gives y(0), y(1), ...

Original entry on oeis.org

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

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Jan 05 2001

Keywords

Comments

Let r be a real number strictly between 1 and 2, x any real number between 0 and 1; define y = (y(i)) by x(0) = x; x(i+1) = r*x(i)-1 if r*x(i)>1 and r*x(i) otherwise; y(i) = integer part of x(i+1): y = (y(i)) is an infinite word on the alphabet (0,1). Here we take r = 3/2 and x = 1.
Kempner considers a "canonical" expansion of a real number in a non-integer base using the greedy algorithm. The greedy algorithm takes the largest possible integer digit in the range 0 <= digit < base at each digit position from high to low. For base 3/2, Kempner gives the present sequence of digits, except instead a(1)=0, as an example canonical 2 = 10.01000001001... Kempner notes too that a(1) omitted and the rest shifted down is a base-3/2 non-canonical 1 = .101000001001.... (canonical would be 1 = 1.000...). - Kevin Ryde, Dec 06 2019

References

  • A. Renyi (1957), Representation for real numbers and their ergodic properties, Acta. Math. Acad. Sci. Hung., 8, 477-493.

Crossrefs

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