1,1

Indranil Ghosh, Table of n, a(n) for n = 1..10000

Index entries for sequences related to Recamán's sequence

(Python)

l=[0, 2, 1]

for n in xrange(3, 101):

x=l[n - 1] - (n - 1)

if x>0 and not x in l: l+=[x, ]

else: l+=[l[n - 1] + (n - 1)]

print l[1:] # Indranil Ghosh, Jun 02 2017

A variant of A005132. A row of the array in A066202.

Sequence in context: A057925 A086964 A076242 * A024866 A076058 A098124

Adjacent sequences: A066200 A066201 A066202 * A066204 A066205 A066206

nonn,easy

N. J. A. Sloane, Dec 16 2001

More terms from Sascha Kurz, Mar 24 2002

approved