OFFSET
0,3
MAPLE
a[0]:=0: a[1]:=1: A:={0, 1}: for n from 2 to 42 do if a[n-1]+a[n-2]-n+1>0 and member(a[n-1]+a[n-2]-n+1, A)=false then a[n]:=a[n-1]+a[n-2]-n+1: A:=A union {a[n-1]+a[n-2]-n+1} else a[n]:=a[n-1]+a[n-2]+n-1: A:=A union {a[n-1]+a[n-2]+n-1} fi: od: seq(a[n], n=0..42); # Emeric Deutsch, Apr 30 2006
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 30 2006
EXTENSIONS
More terms from Emeric Deutsch, Apr 30 2006
STATUS
approved