login
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

%I #9 Apr 04 2014 01:51:00

%S 1,3,0,4,9,15,22,30,21,31,42,54,67,81,66,82,99,117,136,156,135,113,

%T 136,160,185,211,238,266,295,265,234,266,299,333,368,404,441,479,518,

%U 558,599,557,600,644,689,735,782,830,879,929,980,1032,1085,1031,1086,1142

%N 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.

%C Does limit n ->infinity a(n)/n^2 exist?

%e 9 is in the sequence, so a(9) = a(8)-9 = 30-9 = 21.

%Y Cf. A005132.

%K nonn

%O 1,2

%A _Benoit Cloitre_, Feb 16 2003