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 A050129 #15 Feb 21 2020 10:58:05 %S A050129 1,3,9,2,6,15,8,4,20,5,12,27,14,7,32,17,37,19,40,10,22,11,24,51,26,13, %T A050129 56,29,61,31,64,16,34,71,36,18,76,39,81,163,42,21,44,91,46,23,48,99, %U A050129 50,25,104,53,109,55,112,28,58,119,60,30,124,63 %N A050129 a(n) is the least k satisfying A050128(k) = n. %C A050129 Conjecture: for n > 1, a(n) is always one of n/2, n+1, 2*n+2, 2*n+3, 4*n+3 or 4*n+5. - _Robert Israel_, Feb 18 2020 %H A050129 Robert Israel, <a href="/A050129/b050129.txt">Table of n, a(n) for n = 1..10000</a> %p A050129 N:= 100: # to get a(1)..a(N) %p A050129 A[1]:= 1: S:= {0,1}: count:= 1: %p A050129 v:= 1: %p A050129 for n from 2 while count < N do %p A050129 v:= floor(v/2); %p A050129 if member(v, S) then v:= 2*n fi; %p A050129 if v <= N then count:= count+1; A[v]:= n fi; %p A050129 S:= S union {v}; %p A050129 od: %p A050129 seq(A[i],i=1..N); # _Robert Israel_, Feb 09 2020 %Y A050129 Cf. A050128. %K A050129 nonn %O A050129 1,2 %A A050129 _Clark Kimberling_ %E A050129 Name changed by _Robert Israel_, Feb 09 2020