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(8) we want the a(4)th = 5th positive integer among those not equal to any of the first 7 terms of the sequence (those positive integers not equal to 1,2,3,5,4,8, or 6). Among those positive integers not equal to any the first 7 terms (which is the sequence 7,9,10,11,12,13...), 12 is the 5th. So a(8) = 12.
Now for a(9) we want the smallest positive integer that does not occur among the first 8 terms of the sequence. So a(9) = 7.
MATHEMATICA
a = {1, 2}; Do[w = Complement[Range[Max[a] + a[[n]] + 1], a]; AppendTo[a, w[[1]]]; AppendTo[a, w[[a[[n]] + 1]]], {n, 2, 40}]; a (* Ivan Neretin, Jun 25 2015 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Apr 23 2006
EXTENSIONS
More terms from Joshua Zucker, May 06 2006
STATUS
approved