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).

This page as a plain text file.
%I A153112 #9 Sep 01 2017 14:15:51
%S A153112 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,
%T A153112 2,14,14,14,14,15,16,16,17,18,18,19,19,10,19,20,20,20,21,21,21,10,24,
%U A153112 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
%N 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).
%D A153112 Per Bak, "How nature works, the science of self-organized criticality", Springer, New York (1996), pp. 49-64.
%p A153112 A069705 := proc(n) op(1+(n mod 3), [1,2,4]) ; end proc:
%p A153112 A010882 := proc(n) op(1+(n mod 3), [1,2,3]) ; end proc:
%p A153112 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:
%p A153112 seq(A153112(n),n=0..100) ; # _R. J. Mathar_, Jun 24 2011
%t A153112 Clear[f, n]; f[0] = 0; f[1] = 1; f[2] = 1;
%t A153112 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],
%t A153112 f[f[n - 1]] + f[n - f[n - 1]]]; a = Table[f[n], {n, 0, 200}]
%Y A153112 Cf. A004001, A092550, A136640.
%K A153112 nonn
%O A153112 0,5
%A A153112 _Roger L. Bagula_, Dec 18 2008
%E A153112 Definition cleaned up. - _R. J. Mathar_, Jun 24 2011