cp's OEIS Frontend

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.

A323026 Zeroless pandigital numbers that are between two twin primes.

This page as a plain text file.
%I A323026 #43 May 16 2023 07:48:32
%S A323026 123457968,123459768,123946578,124397658,124936578,124953678,
%T A323026 125347698,125437968,125463798,125674398,126345978,126495738,
%U A323026 126593478,126597348,126945738,127394568,127396458,127453968,127459638,127659438,129357648,129635478,129673548,132564978,132594768,132769458
%N A323026 Zeroless pandigital numbers that are between two twin primes.
%C A323026 Intersection of A050289 and A014574.
%C A323026 The definition permits repeated digits. - _N. J. A. Sloane_, May 16 2023
%C A323026 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
%C A323026 There are 2595 terms that are pandigital without repeating any digit. - _Harvey P. Dale_, Jan 25 2021
%H A323026 Chai Wah Wu, <a href="/A323026/b323026.txt">Table of n, a(n) for n = 1..10000</a>
%o A323026 (Python)
%o A323026 import itertools
%o A323026 from sympy import isprime
%o A323026 nmax=pow(10,10)
%o A323026 r=""
%o A323026 li=[]
%o A323026 def is_pandigit_easy(n):
%o A323026     l=[]
%o A323026     s=str(n)
%o A323026     if '0' in s: return(False)
%o A323026     for ch in s:
%o A323026         if ch not in l: l.append(ch)
%o A323026     l=list(set(l))
%o A323026     if len(l)==9:
%o A323026         return(True)
%o A323026     else:
%o A323026         return(False)
%o A323026 t=0
%o A323026 tmax=50
%o A323026 for i in range(123456789,nmax):
%o A323026     if is_pandigit_easy(i):
%o A323026         if isprime(i-1) and isprime(i+1):
%o A323026             li.append(i)
%o A323026             t+=1
%o A323026             if t>tmax: break
%o A323026 first_elem=26
%o A323026 for k in li[:first_elem]:
%o A323026       r=r+","+str(k)
%o A323026 print(r[1:])
%o A323026 (PARI) isok(n) = my(d=digits(n)); vecmin(d) && (#Set(d)==9) && isprime(n-1) && isprime(n+1);
%o A323026 for (n=123456789, 133000000, if (isok(n), print1(n, ", "))) \\ _Michel Marcus_, Jan 04 2019
%o A323026 (Python)
%o A323026 from itertools import permutations
%o A323026 from sympy import isprime
%o A323026 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
%Y A323026 Cf. A050289 (zeroless pandigital numbers), A014574 (average of twin primes).
%K A323026 nonn,base
%O A323026 1,1
%A A323026 _Pierandrea Formusa_, Jan 02 2019