This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A066203 a(1) = 2; a(2) = 1; for n > 2, a(n) = a(n-1)-(n-1) if this is positive and has not already appeared in the sequence, otherwise a(n) = a(n-1)+(n-1). 2
 2, 1, 3, 6, 10, 5, 11, 4, 12, 21, 31, 20, 8, 21, 7, 22, 38, 55, 37, 18, 38, 17, 39, 16, 40, 15, 41, 14, 42, 13, 43, 74, 106, 73, 107, 72, 36, 73, 35, 74, 34, 75, 33, 76, 32, 77, 123, 170, 122, 171, 121, 70, 122, 69, 123, 68, 124, 67, 9, 68, 128, 189, 127, 64, 128, 63, 129, 62 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Indranil Ghosh, Table of n, a(n) for n = 1..10000 PROG (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 CROSSREFS 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 KEYWORD nonn,easy AUTHOR N. J. A. Sloane, Dec 16 2001 EXTENSIONS More terms from Sascha Kurz, Mar 24 2002 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 20 06:06 EST 2018. Contains 317385 sequences. (Running on oeis4.)