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.

A189638 Partial sums of A116178.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 9, 10, 11, 11, 12, 13, 13, 13, 14, 14, 14, 15, 15, 16, 17, 17, 17, 18, 18, 18, 19, 19, 20, 21, 21, 21, 22, 22, 23, 24, 24, 25, 26, 26, 26, 27, 27, 27, 28, 28, 29, 30, 30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 35, 36, 36, 37, 38, 38, 39, 40
Offset: 1

Views

Author

Clark Kimberling, Apr 24 2011

Keywords

Comments

See A116178.

Crossrefs

Programs

  • Mathematica
    t = Nest[Flatten[# /. {0->{0,0,1}, 1->{0,1,1}}] &, {0}, 5] (*A116178*)
    f[n_] := t[[n]]
    Flatten[Position[t, 0]] (*A189636*)
    Flatten[Position[t, 1]] (*A189637*)
    s[n_] := Sum[f[i], {i, 1, n}]; s[0] = 0;
    Table[s[n], {n, 1, 120}] (*A189638*)

Formula

s(n)=s([(n+1)/3])+[n/3], where s(0)=0.