OFFSET
1,2
LINKS
Eric Angelini, Yellow commas, pink, red, blue..., personal blog "Cinquante signes" on blogspot.com, May 17 2020
EXAMPLE
The even terms are at indices 2, 3, 5, 9, 12, 18, 23, 30, ...; first differences give 1, 2, 4, 3, 6, 5, 7, ... = the sequence itself.
PROG
(PARI) upto(N)={my(a=Vec([1, 2], N), i=1, L=2); local(U=[2], nxt(e)=while(#U>1&&U[2]==U[1]+1, U=U[^1]); my(t=U[1]); until( t++%2!=e && !setsearch(U, t), ); U=setunion(U, [t]); t ); for(n=3, N, a[n]=nxt(n-L==a[i] && i++ && L=n)); a}
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Angelini and M. F. Hasler, May 19 2020
STATUS
approved