|
| |
|
|
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).
|
|
3
| |
|
|
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
(list; graph; refs; listen; history; internal format)
|
|
|
|
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
| Cf. A004001, A092550, A136640.
Sequence in context: A101646 A166079 A080677 * A005350 A055037 A125186
Adjacent sequences: A153109 A153110 A153111 * A153113 A153114 A153115
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Roger L. Bagula (rlbagulatftn(AT)yahoo.com), Dec 18 2008
|
|
|
EXTENSIONS
| Definition cleaned up. - R. J. Mathar, Jun 24 2011
|
| |
|
|