login
A071995
a(1) = 1, a(2) = 0, a(n) = a(floor(n/3)) + a(n - floor(n/3)).
3
1, 0, 1, 2, 3, 2, 3, 2, 3, 4, 3, 4, 5, 6, 7, 6, 7, 6, 7, 8, 9, 10, 9, 8, 9, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 12, 13, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 20, 19, 18, 19, 18, 19, 18, 19, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 29, 30, 29, 28, 27, 26, 27, 28, 27, 26
OFFSET
1,4
COMMENTS
"Rauzy's sequence" with initial values 1, 0.
David Moews showed that a(n)/n converges to about 0.37512. - Jim Nastos, Jan 08 2003
Difference of consecutive terms is always +/- 1.
MATHEMATICA
a[1]=1; a[2]=0; a[n_] := a[n]=a[Floor[n/3]]+a[n-Floor[n/3]]; Table[a[n], {n, 1, 80}]
PROG
(PARI)
n = 33; v = vector(n); v[1] = 'x; v[2] = 'y;
for(i = 3, n, v[i] = v[floor(i/3)] + v[i - floor(i/3)]);
apply(e -> polcoeff(e, 1, v[1]), v) \\ Gheorghe Coserea, Aug 22 2015
CROSSREFS
Sequence in context: A339085 A140887 A132423 * A114108 A366912 A276090
KEYWORD
easy,nonn
AUTHOR
Jim Nastos, Jun 17 2002
EXTENSIONS
Edited by Robert G. Wilson v, Jun 23 2002
STATUS
approved