OFFSET
1,1
COMMENTS
The definition permits repeated digits. - N. J. A. Sloane, May 16 2023
a(n) mod 10 is either 2 or 8. First term with a(n) mod 10 = 2 is a(27) = 134756982. - Chai Wah Wu, Jan 27 2019
There are 2595 terms that are pandigital without repeating any digit. - Harvey P. Dale, Jan 25 2021
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
PROG
(Python)
import itertools
from sympy import isprime
nmax=pow(10, 10)
r=""
li=[]
def is_pandigit_easy(n):
l=[]
s=str(n)
if '0' in s: return(False)
for ch in s:
if ch not in l: l.append(ch)
l=list(set(l))
if len(l)==9:
return(True)
else:
return(False)
t=0
tmax=50
for i in range(123456789, nmax):
if is_pandigit_easy(i):
if isprime(i-1) and isprime(i+1):
li.append(i)
t+=1
if t>tmax: break
first_elem=26
for k in li[:first_elem]:
r=r+", "+str(k)
print(r[1:])
(PARI) isok(n) = my(d=digits(n)); vecmin(d) && (#Set(d)==9) && isprime(n-1) && isprime(n+1);
for (n=123456789, 133000000, if (isok(n), print1(n, ", "))) \\ Michel Marcus, Jan 04 2019
(Python)
from itertools import permutations
from sympy import isprime
A323026_list = [n for n in (int(''.join(s)) for s in permutations('123456789')) if isprime(n-1) and isprime(n+1)] # Chai Wah Wu, Jan 27 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Pierandrea Formusa, Jan 02 2019
STATUS
approved