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.

A071996 a(1) = 0, a(2) = 1, a(n) = a(floor(n/3)) + a(n - floor(n/3)).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 21, 22, 23, 24, 24, 24, 25, 26, 26, 27
Offset: 1

Views

Author

Jim Nastos, Jun 17 2002

Keywords

Comments

"Rauzy's sequence" with initial values 0, 1.
David Moews showed that a(n)/n converges to about 0.31244. - Jim Nastos, Jan 08 2003
Difference of consecutive terms is always 0 or 1

Crossrefs

Programs

  • Mathematica
    a[1]=0; a[2]=1; a[n_] := a[n]=a[Floor[n/3]]+a[n-Floor[n/3]]; Table[a[n], {n, 1, 75}]
  • 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[2]), v) \\ Gheorghe Coserea, Aug 22 2015

Extensions

Edited by Robert G. Wilson v, Jun 23 2002