|
Search: id:A117821
|
|
|
| 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. |
|
+0 4
|
|
| 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; listen)
|
|
|
OFFSET
|
0,3
|
|
|
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 (deutsch(AT)duke.poly.edu), Apr 30 2006
|
|
CROSSREFS
|
Cf. A079053, A005132, A117822, A117823, A117824.
Sequence in context: A016516 A138569 A066579 this_sequence A121794 A075086 A128781
Adjacent sequences: A117818 A117819 A117820 this_sequence A117822 A117823 A117824
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
njas, Apr 30 2006
|
|
EXTENSIONS
|
More terms from Benoit Cloitre and Emeric Deutsch (deutsch(AT)duke.poly.edu), Apr 30 2006
|
|
|
Search completed in 0.002 seconds
|