login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

Table of n, a(n) for n=0..38.

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

Cf. A005132, A079053, A117822, A117823, A117824.

Sequence in context: A213584 A213587 A066579 * A266851 A185732 A121794

Adjacent sequences:  A117818 A117819 A117820 * A117822 A117823 A117824

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Apr 30 2006

EXTENSIONS

More terms from Benoit Cloitre and Emeric Deutsch, Apr 30 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 22 21:05 EDT 2019. Contains 323503 sequences. (Running on oeis4.)