%I #8 Jan 11 2013 15:25:18
%S 1,2,3,5,5,8,7,8,12,15,11,12,13,27,15,23,17,18,19,20,29,37,23,35,37,
%T 38,27,28,29,57,31,32,33,57,35,53,37,56,54,59,54,42,43,44,45,83,47,48,
%U 49,70,51,52,53,92,55,83,57,86,111,60,61,154,63,132,65,98,67,68,69,127,71
%N Let b(n) the sequence of zero plus the natural numbers (0+A000027). At any step n=1,2,3,4,... add b(n-1) to the number in position n+b(n).
%e Start from b(n)=0,1,2,3,4,5,6,7,8,9,10,...... [n(0)=0].
%e First step n=1: add b(n-1)=b(0)=0 to n+b(n)=2 (practically no change).
%e Second step n=2: add b(n-1)=b(1)=1 to n+b(n)=4 -> 0,1,2,3,5,5,6,7,8,9,...
%e Third step n=3: add b(n-1)=b(2)=2 to n+b(n)=6 -> 0,1,2,3,5,5,8,7,8,9,...
%e Fourth step n=4: add b(n-1)=b(3)=3 to n+b(n)=8 -> 0,1,2,3,5,5,8,7,8,12,...
%e Etc.
%p P:=proc(i) local n,v; v:=array(1..i); for n from 1 by 1 to i do v[n]:=n; od; for n from 2 by 1 to 200 do v[v[n]+n]:=v[v[n]+n]+v[n-1]; od; for n from 1 by 1 to 200 do print(v[n]); od; end: P(1000);
%Y A000027
%K easy,nonn
%O 0,2
%A _Paolo P. Lava_ & _Giorgio Balzarotti_, Mar 13 2009
|