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.

A346003 Distance 3 lexicode over the alphabet {0,1,2}, with the codewords written in base 10.

This page as a plain text file.
%I A346003 #16 Sep 30 2021 12:13:00
%S A346003 0,13,26,32,42,46,61,65,75,325,336,357,362,373,383,394,396,413,584,
%T A346003 651,658,677,699,716,812,825,832,840,847,863,878,898,909,975,982,1001,
%U A346003 1023,1043,1048,1148,1165,1170,1194,1208,1223,1254,1269,1330,1341,1421,1452
%N A346003 Distance 3 lexicode over the alphabet {0,1,2}, with the codewords written in base 10.
%C A346003 Lexicographically earliest sequence of ternary words such that any two distinct words differ in at least 3 positions.
%H A346003 Andrey Zabolotskiy, <a href="/A346003/b346003.txt">Table of n, a(n) for n = 1..6000</a>
%H A346003 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 A346003 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 A346003 (See A346000).
%o A346003 (Python)
%o A346003 def t(n):
%o A346003     d = []
%o A346003     while n:
%o A346003         d.append(n%3)
%o A346003         n //= 3
%o A346003     return d
%o A346003 def dif(n1, n2):
%o A346003     return sum(d1 != d2 for d1, d2 in zip(n1 + [0] * (len(n2)-len(n1)), n2))
%o A346003 a = [0]
%o A346003 for n in range(2000):
%o A346003     if all(dif(t(n1), t(n)) >= 3 for n1 in a):
%o A346003         a.append(n)
%o A346003 print(a) # _Andrey Zabolotskiy_, Sep 30 2021
%Y A346003 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 A346003 nonn,base
%O A346003 1,2
%A A346003 _N. J. A. Sloane_, Jul 20 2021
%E A346003 Terms a(36) and beyond from _Andrey Zabolotskiy_, Sep 30 2021