OFFSET
1,1
COMMENTS
There are 413842 11-digit terms. - Jud McCranie, Jul 03 2013 [in light of the comment below, this was independently computed and confirmed to be correct by Michael S. Branicky, Apr 06 2024]
The above statement [by Jud McCranie] is uncertain, as the contributed b-file was wrong (missing terms) from a(436) on. At this point, one has to consider permutations of 10223456789, before coming back, for n > 495, to permutations of 10123456789 starting with 10231.... - M. F. Hasler, Apr 06 2024
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..435 from Jud McCranie, terms 436..500 corrected and added by M. F. Hasler)
FORMULA
PROG
(PARI) L=List(); append(N=10123456789, M=Vecsmall([2, 3, 3]))=forperm(digits(N), p, cmp(p[3..5], M)>0 && break; isprime(P=fromdigits(Vec(p)))&& isprime(fromdigits(Vecrev(p)))&& listput(L, P))
append(); append(10223456789); #A159292=Set(L) \\ M. F. Hasler, Apr 05 2024
(Python)
from sympy import isprime
from itertools import count, islice, product
def emirp(s):
r = s[::-1]
return r != s and isprime(int(s)) and isprime(int(r))
def agen(): # generator of terms
for d in count(11):
for f in "1379":
for m in product("0123456789", repeat=d-2):
for e in "1379":
t = f + "".join(m) + e
if len(set(t)) == 10 and emirp(t):
yield int(t)
print(list(islice(agen(), 100))) # Michael S. Branicky, Apr 09 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Apr 08 2009
EXTENSIONS
Erroneous terms corrected and more terms from M. F. Hasler, Apr 05 2024
STATUS
approved