OFFSET
0,3
COMMENTS
The graphic representation shows the structure.
LINKS
Michel Lagneau, Table of n, a(n) for n = 0..5000
EXAMPLE
a(0) = 0; a(1) = 1;
a(2) = 0 + max(1,2) = 2;
a(3) = 1 + max(2,3) = 4.
MAPLE
a0:=0:a1:=1:for n from 2 to 200 do: a2:=a0-min(a1, n): if a2 >0 then
printf(`%d, `, a2):a0:=a1:a1:=a2:else a2:=a0+max(a1, n):a0:=a1:a1:=a2:printf(`%d, `, a2):fi:od:
MATHEMATICA
t={0, 1}; Do[s=t[[-2]]-Min[n, t[[-1]]]; If[s<=0, s=t[[-2]]+Max[n, t[[-1]]]]; AppendTo[t, s], {n, 2, 10}]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 08 2011
STATUS
approved