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.
%I A293977 #27 Dec 23 2024 14:53:45 %S A293977 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, %T A293977 33,23,42,25,35,24,45,29,43,28,50,31,46,30,57,32,49,36,62,37,55,38,72, %U A293977 39,59,40,73,41,64,44,86,51,76,47,82,53,77,48,93,52,81,54,97,56,84,58 %N A293977 Lexicographically smallest permutation of the nonnegative integers such that a(n) = a(2n) - a(2n-1) for all n >= 1. %C A293977 A variant of A293976 and A033485. %C A293977 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. %H A293977 Carole Dubois, <a href="/A293977/b293977.txt">Table of n, a(n) for n = 0..1244</a> %H A293977 E. Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2010-June/004987.html">Successive weighing scales</a>, post to the SeqFan list, June 14, 2010. %H A293977 E. Angelini, <a href="http://www.cetteadressecomportecinquantesignes.com/Roberval.htm">Weighing scales and sequences</a>. %o A293977 (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} %Y A293977 Cf. A033485, A293976. %K A293977 nonn %O A293977 0,3 %A A293977 _M. F. Hasler_, Oct 27 2017