|
|
A323026
|
|
Zeroless pandigital numbers that are between two twin primes.
|
|
1
|
|
|
123457968, 123459768, 123946578, 124397658, 124936578, 124953678, 125347698, 125437968, 125463798, 125674398, 126345978, 126495738, 126593478, 126597348, 126945738, 127394568, 127396458, 127453968, 127459638, 127659438, 129357648, 129635478, 129673548, 132564978, 132594768, 132769458
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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
|
|
|
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
|
Cf. A050289 (zeroless pandigital numbers), A014574 (average of twin primes).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|