login
A293977
Lexicographically smallest permutation of the nonnegative integers such that a(n) = a(2n) - a(2n-1) for all n >= 1.
2
0, 1, 2, 3, 5, 4, 7, 6, 11, 8, 12, 9, 16, 13, 19, 10, 21, 14, 22, 15, 27, 17, 26, 18, 34, 20, 33, 23, 42, 25, 35, 24, 45, 29, 43, 28, 50, 31, 46, 30, 57, 32, 49, 36, 62, 37, 55, 38, 72, 39, 59, 40, 73, 41, 64, 44, 86, 51, 76, 47, 82, 53, 77, 48, 93, 52, 81, 54, 97, 56, 84, 58
OFFSET
0,3
COMMENTS
A variant of A293976 and A033485.
The definition means that the sequence of differences of pairs of terms, (a(2n)-a(2n-1); n>=1), is equal to the sequence (a(n); n>=1) itself. The term a(0) is just a very natural extension of this permutation of the positive integers to all n >= 0.
LINKS
E. Angelini, Successive weighing scales, post to the SeqFan list, June 14, 2010.
PROG
(PARI) A293977_vec(n, A=vector(n+1), U=[0])={for(i=2, n, A[i]&&next; if(bittest(i, 0), A[i]=A[i-1]+A[i\2+1], for(k=U[1]+1, oo, setsearch(U, k)&&next; setsearch(U, k+A[i\2+1])&&next; A[i]=k; break)); U=setunion(U, [A[i]]); while(#U>1&&U[2]==U[1]+1, U=U[^1])); A}
CROSSREFS
Sequence in context: A276346 A123882 A256271 * A282649 A102454 A232640
KEYWORD
nonn
AUTHOR
M. F. Hasler, Oct 27 2017
STATUS
approved