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 A322000 #16 Feb 25 2019 09:32:35 %S A322000 0,1,2,10,3,11,4,12,20,100,5,13,21,101,6,14,22,30,102,110,7,15,23,31, %T A322000 103,111,8,16,24,32,40,104,112,120,200,1000,9,17,25,33,41,105,113,121, %U A322000 201,1001,18,26,34,42,50,106,114,122,130,202,210,1002,1010,19,27 %N A322000 Nonnegative integers, sorted by increasing value of A028897(n) = Sum d[i]*2^i for n = Sum d[i]*10^i, then value of n. %C A322000 A028897(n) is the result of using the decimal digits of n, but weighting their position as in base 2. For sake of brevity we refer to this as the b-value of n in the sequel. This idea is found on the website given in links under the name "decibinary numbers". %C A322000 The b-values increment by 1 at indices (of "records") 1, 2, 4, 6, 10, 14, 20, 26, 36, ... Prefixing an initial 0, the gaps between these, equal to the number of occurrences of a given b-value (0, 1, 2, ...), are 1, 1, 2, 2, 4, 4, 6, 6, 10, 10, 13, 13, ... = A072170(n,10). In this sequence each of (1, 2, 4, 6, 10, 13, 18, ...) is repeated twice. %H A322000 Robert Israel, <a href="/A322000/b322000.txt">Table of n, a(n) for n = 0..10000</a> %H A322000 Robin C. Yu, <a href="https://www.hackerrank.com/challenges/decibinary-numbers">Decibinary Numbers</a>, on Hackerrank.com. %e A322000 The first terms of the sequence are as follows: (b = A028897) %e A322000 n | 0 | 1 | 2 | 10 | 3 | 11 | 4 | 12 | 20 | 100 | 5 | 13 | 21 | 101 | ... %e A322000 ----+---+---+---+----+---+----+---+----+----+-----+---+----+----+-----+----- %e A322000 b(n)| 0 | 1 | 2 | 2 | 3 | 3 | 4 | 4 | 4 | 4 | 5 | 5 | 5 | 5 | ... %e A322000 For example, b(345) = 3*2^2 + 4*2 + 5 = 25. %p A322000 N:= 30: # for all numbers with A028897(n) <= N %p A322000 L:= {seq([i,i],i=0..9)}: Agenda:= {seq([i,i],i=1..9)}: %p A322000 extend:= proc(p) local x; op(select(t -> t[2]<=N, [seq([10*p[1]+x, 2*p[2]+x],x=0..9)])); end proc: %p A322000 sorter:= proc(p1,p2) if p1[2] <> p2[2] then p1[2] < p2[2] else p1[1] < p2[1] fi end proc: %p A322000 while Agenda <> {} do %p A322000 Agenda:= map(extend, Agenda); %p A322000 L:= L union Agenda; %p A322000 od: %p A322000 L:= sort( convert(L,list),sorter): %p A322000 map(t -> t[1], L); # _Robert Israel_, Feb 24 2019 %o A322000 (PARI) my(A028897(n)=fromdigits(digits(n),2),S=[]);for(k=1,2^10,(t=A028897(k))>9||S=setunion(S,[[t,k]]));apply(t->t[2],S) %Y A322000 Cf. A028897, A072170 (see comments). %K A322000 nonn,base,look %O A322000 0,3 %A A322000 _M. F. Hasler_, Feb 13 2019