A166497 A Per Bak sand pile collapse sequence using A147665 in the A153112 form.
1, 1, 1, 1, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 4, 3, 2, 4, 3, 2, 4, 3, 2, 5, 1, 2, 2, 2, 2, 3, 2, 2, 4, 3, 2, 4, 3, 2, 4, 3, 2, 5, 4, 3, 5, 4, 2, 5, 5, 5, 5, 4, 3, 6, 3, 2, 4, 4, 4, 4, 3, 2, 5, 4, 3, 5, 5, 5, 6, 3, 2, 7, 3, 2, 4, 5, 6, 5, 4, 3, 4, 3, 2, 4, 3, 2, 4, 1, 2, 2, 2, 2, 3, 2, 2, 4, 3, 2, 4, 3, 2, 4
Offset: 0
References
- Per Bak, "How nature works, the science of self-organized criticality", Springer-Verlag, New York, 1996, pages 49-64
Programs
-
Mathematica
f[0] = 1; 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]] + If[Mod[n, 3] == 0, f[f[n/3]], If[Mod[n, 3] == 1, f[f[(n - 1)/3]], f[n - f[(n - 2)/3]]]]]; Table[f[n], {n, 0, 200}]