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.

A153112 a(0) = 0 and a(1)=a(2)=1; a(n) = a(a(n-1)) + a(n-a(n-1)) unless floor( sum_{i=0..n-1} a(i)/2) mod 16*A069705(n) = 1 in which case a(n) = A010882(n).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Dec 18 2008

Keywords

References

  • Per Bak, "How nature works, the science of self-organized criticality", Springer, New York (1996), pp. 49-64.

Crossrefs

Programs

  • Maple
    A069705 := proc(n) op(1+(n mod 3), [1,2,4]) ; end proc:
    A010882 := proc(n) op(1+(n mod 3), [1,2,3]) ; end proc:
    A153112 := proc(n) option remember; local psu ; if n=0 then 0; elif n<=2 then 1; else psu := add( procname(i),i=0..n-1) ; if floor(psu/2) mod (16*A069705(n)) = 1 then A010882(n) ; else procname(procname(n-1)) +procname(n-procname(n-1)) ; end if; end if; end proc:
    seq(A153112(n),n=0..100) ; # R. J. Mathar, Jun 24 2011
  • Mathematica
    Clear[f, n]; f[0] = 0; f[1] = 1; f[2] = 1;
    f[n_] := f[n] = If[Mod[ Floor[Sum[f[i], {i,0, n - 1}]/2], 2^(4 + Mod[n, 3])] == 1, 1 + Mod[n, 3],
    f[f[n - 1]] + f[n - f[n - 1]]]; a = Table[f[n], {n, 0, 200}]

Extensions

Definition cleaned up. - R. J. Mathar, Jun 24 2011