OFFSET
1,2
COMMENTS
This sequence is likely a permutation of the integers.
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
EXAMPLE
The first 8 terms of the sequence are 1,3,2,6,5,7,4,12. |a(8) - 9| + 1 = 4, so a(9) = the 4th positive integer which doesn't occur earlier in the sequence (i.e., the 4th integer in the sequence 8, 9, 10, 11, 13, 14, ...). Therefore a(9) = 11.
MATHEMATICA
Fold[Append[#1, Complement[Range[Max[#1] + (d = Abs[#1[[-1]] - #2] + 1)], #1][[d]]] &, {1}, Range[2, 72]] (* Ivan Neretin, Mar 13 2017 *)
CROSSREFS
KEYWORD
AUTHOR
Leroy Quet, May 01 2006
EXTENSIONS
More terms from Franklin T. Adams-Watters, Nov 28 2006
STATUS
approved