A159292 Pandigital emirps.
10124389567, 10124563789, 10124597683, 10124635897, 10124673859, 10124687359, 10124695783, 10124735689, 10124795683, 10124867359, 10124958673, 10124965387, 10124965783, 10125364897, 10125693847, 10125749863, 10125784639, 10125938467, 10126387549, 10126457893, 10126498573
Offset: 1
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)
Programs
-
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
Formula
Extensions
Erroneous terms corrected and more terms from M. F. Hasler, Apr 05 2024
Comments