The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117823 a(0) = 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
0, 1, 3, 7, 6, 8, 20, 21, 33, 45, 68, 102, 158, 247, 391, 623, 998, 1604, 2584, 4169, 6733, 10881, 17592, 28450, 46018, 74443, 120435, 194851, 315258, 510080, 825308, 1335357, 2160633, 3495957, 5656556, 9152478, 14808998, 23961439, 38770399 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
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>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..42); # Emeric Deutsch, Apr 30 2006
CROSSREFS
Sequence in context: A296343 A347155 A371240 * A338067 A178242 A352168
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 30 2006
EXTENSIONS
More terms from 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 18:59 EDT 2024. Contains 372765 sequences. (Running on oeis4.)