OFFSET
0,2
EXAMPLE
Start from b(n)=0,1,2,3,4,5,6,7,8,9,10,...... [n(0)=0].
First step n=1: add b(n-1)=b(0)=0 to n+b(n)=2 (practically no change).
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,...
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,...
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,...
Etc.
MAPLE
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);
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paolo P. Lava & Giorgio Balzarotti, Mar 13 2009
STATUS
approved