|
|
A117821
|
|
a(0) = a(1) = 1; for n >= 2, a(n) = a(n-1) + a(n-2) - n if that number is positive and not already in the sequence, otherwise a(n) = a(n-1) + a(n-2) + n.
|
|
3
|
|
|
1, 1, 4, 2, 10, 7, 11, 25, 28, 44, 62, 95, 145, 227, 358, 570, 912, 1465, 2359, 3805, 6144, 9928, 16050, 25955, 41981, 67911, 109866, 177750, 287588, 465309, 752867, 1218145, 1970980, 3189092, 5160038, 8349095, 13509097, 21858155, 35367214
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
MAPLE
|
a[0]:=1: a[1]:=1: A:={1}: for n from 2 to 40 do if a[n-1]+a[n-2]-n>0 and member(a[n-1]+a[n-2]-n, A)=false then a[n]:=a[n-1]+a[n-2]-n: A:=A union {a[n-1]+a[n-2]-n} else a[n]:=a[n-1]+a[n-2]+n: A:=A union {a[n-1]+a[n-2]+n} fi: od: seq(a[n], n=0..40); # Emeric Deutsch, Apr 30 2006
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|