cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A293977 Lexicographically smallest permutation of the nonnegative integers such that a(n) = a(2n) - a(2n-1) for all n >= 1.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Oct 27 2017

Keywords

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.

Crossrefs

Programs

  • 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}
Showing 1-1 of 1 results.