OFFSET
0,5
REFERENCES
Per Bak, "How nature works, the science of self-organized criticality", Springer, New York (1996), pp. 49-64.
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Dec 18 2008
EXTENSIONS
Definition cleaned up. - R. J. Mathar, Jun 24 2011
STATUS
approved