OFFSET
1,2
COMMENTS
Sequence is a permutation of the positive integers.
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
EXAMPLE
For a(9) we want the a(4)th = 4th positive integer among those not equal to any of the first 8 terms of the sequence (those positive integers not equal to 1,2,3,4,6,5,9, or 7). Among those positive integers not equal to any the first 8 terms (which is the sequence 8,10,11,12,13...), 12 is the 4th. So a(9) = 12.
Now for a(10) we want the smallest positive integer that does not occur among the first 9 terms of the sequence. So a(10) = 8.
MATHEMATICA
s={1}; a=Range[1000]; b=Rest[a]; Do[ c=If[OddQ[n], b[[s[[(n-1)/2]]]], b[[1]]]; b=Complement[b, {c}]; AppendTo[s, c], {n, 2, 200}]; s (Seidov)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Apr 23 2006
EXTENSIONS
More terms from Zak Seidov and Joshua Zucker, Apr 23 2006
STATUS
approved