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 A346000 #19 Jul 20 2021 15:35:15 %S A346000 0,1111,2222,3333,4444,5555,6666,7777,8888,9999,10123,11032,12301, %T A346000 13210,14567,15476,16745,17654,20231,21320,22013,23102,24675,25764, %U A346000 26457,27546,30312,31203,32130,33021,34756,35647,36574,37465 %N A346000 Lexicographically earliest sequence of nonnegative integers such that two distinct terms differ by at least 4 decimal digits. %C A346000 This is the distance 4 lexicode over the decimal alphabet. %H A346000 J. H. Conway, <a href="https://doi.org/10.1016/0012-365X(90)90008-6">Integral lexicographic codes</a>, Discrete Mathematics 83.2-3 (1990): 219-235. %H A346000 J. H. Conway and N. J. A. Sloane, <a href="https://doi.org/10.1109/TIT.1986.1057187">Lexicographic codes: error-correcting codes from game theory</a>, IEEE Transactions on Information Theory, 32:337-348, 1986. %p A346000 # Hamming distance in base b %p A346000 Hammdist:=proc(m,n,b) local t1,t2,L1,L2,L,d,i; %p A346000 t1:=convert(m,base,b); L1:=nops(t1); %p A346000 t2:=convert(n,base,b); L2:=nops(t2); L:=L1; %p A346000 if L2<L1 then for i from 1 to L1-L2 do t2:=[op(t2),0]; od; %p A346000 elif L1<L2 then for i from 1 to L2-L1 do t1:=[op(t1),0]; od; L:=L2; %p A346000 fi; %p A346000 d:=0; %p A346000 for i from 1 to L do if t1[i]<>t2[i] then d:=d+1; fi; od; %p A346000 d; end; %p A346000 # Build lexicode with min distance D in base b, search up to M %p A346000 # C = size of code found, tooc = 1 means too close to code %p A346000 unprotect(D); %p A346000 lexicode := proc(D,b,M) local cod,v,i,tooc,C; %p A346000 cod:=[0]; C:=1; %p A346000 # can we add v ? %p A346000 for v from 0 to M do %p A346000 tooc:=-1; %p A346000 for i from 1 to C do %p A346000 if Hammdist(v,cod[i],b)<D then tooc:=1; break; fi; %p A346000 od: %p A346000 if tooc = -1 then C:=C+1; cod:=[op(cod),v]; fi; %p A346000 od: %p A346000 cod; %p A346000 end; %Y A346000 Lexicodes of minimal distance 1,2,3,... over alphabets of size 2: A001477, A001969, A075926, A075928, A075931, A075934, ...; size 3: A001477, A346002, A346003; size 10: A001477, A343444, A333568, A346000, A346001. %K A346000 nonn,base %O A346000 1,2 %A A346000 _N. J. A. Sloane_, Jul 20 2021