OFFSET
1,2
COMMENTS
a(n+a(n)+1) is the term reached by "jumping over" a(n) terms to the right of a(n).
LINKS
E. Angelini, Small perturbations in the natural flow, SeqFan list, Apr 12 2012
EXAMPLE
a(1)=1 means that jumping over its neighbor we will land on a(3) which must have the same parity as a(1).
a(2)=2 means that jumping over a(3), a(4), we will land on a(5) which must be even, as is a(2). Therefore a(5) cannot equal 5 (which would be the least available number not yet used), the least possible choice is a(5)=6 (after having filled in a(3) with the least unused odd number, and a(4) with the least unused number without restriction).
PROG
(PARI) {R=vector(222); u=0; for(n=1, 100, a=0; while( bittest(u, a++) || (R[n] &(a+R[n])%2) || (R[n+a+1] & (a+R[n+a+1])%2), ); u+=1<<R[n]=a; R[n+a+1]=bittest(a, 0)-2); vecextract(R, "1..100")}
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Angelini and M. F. Hasler, Apr 12 2012
STATUS
approved