login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A079406
Recamán variation: a(1)=1, then a(n)=a(n-1)-n if n is already in the sequence, a(n)=a(n-1)+n otherwise.
1
1, 3, 0, 4, 9, 15, 22, 30, 21, 31, 42, 54, 67, 81, 66, 82, 99, 117, 136, 156, 135, 113, 136, 160, 185, 211, 238, 266, 295, 265, 234, 266, 299, 333, 368, 404, 441, 479, 518, 558, 599, 557, 600, 644, 689, 735, 782, 830, 879, 929, 980, 1032, 1085, 1031, 1086, 1142
OFFSET
1,2
COMMENTS
Does limit n ->infinity a(n)/n^2 exist?
EXAMPLE
9 is in the sequence, so a(9) = a(8)-9 = 30-9 = 21.
CROSSREFS
Cf. A005132.
Sequence in context: A068630 A374966 A309764 * A378505 A068627 A357884
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 16 2003
STATUS
approved