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 A246805 #19 Nov 07 2022 13:46:14 %S A246805 1,3,4,7,19,31,67,391,583,4549,917467,6777061,86794921,1421517037, %T A246805 171234891469 %N A246805 Lexicographically earliest sequence of distinct terms such that, when i<j, at least one of a(i) U a(j) or a(j) U a(i) is prime (where U denotes concatenation). %C A246805 Two distinct terms can always be concatenated in some way to form a prime number. %C A246805 Is this sequence infinite? %H A246805 Paul Tek, <a href="/A246805/a246805.gp.txt">PARI program for this sequence</a> %e A246805 The following concatenations are prime: %e A246805 - j=2: a(1) U a(2)=13, a(2) U a(1)=31 %e A246805 - j=3: a(3) U a(1)=41, a(3) U a(2)=43 %e A246805 - j=4: a(1) U a(4)=17, a(4) U a(1)=71, a(2) U a(4)=37, a(4) U a(2)=73, a(3) U a(4)=47 %e A246805 - j=5: a(5) U a(1)=191, a(5) U a(2)=193, a(3) U a(5)=419, a(4) U a(5)=719, a(5) U a(4)=197 %e A246805 - j=6: a(1) U a(6)=131, a(6) U a(1)=311, a(2) U a(6)=331, a(6) U a(2)=313, a(3) U a(6)=431, a(6) U a(4)=317, a(5) U a(6)=1931, a(6) U a(5)=3119 %o A246805 (PARI) See Link section. %o A246805 (Python) %o A246805 from sympy import isprime %o A246805 from itertools import islice %o A246805 def c(s, slst): %o A246805 return all(isprime(int(s+t)) or isprime(int(t+s)) for t in slst) %o A246805 def agen(): %o A246805 slst, an, mink = [], 1, 2 %o A246805 while True: %o A246805 yield an; slst.append(str(an)); an += 1 %o A246805 while not c(str(an), slst): an += 1 %o A246805 print(list(islice(agen(), 10))) # _Michael S. Branicky_, Oct 17 2022 %Y A246805 Cf. A156770, A228323. %K A246805 base,nonn,more %O A246805 1,2 %A A246805 _Paul Tek_, Nov 16 2014 %E A246805 a(15) from _Michael S. Branicky_, Nov 07 2022