login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

Intersection of A050289 and A014574.

a(n) mod 10 is either 2 or 8. First term such as a(n) mod 10 = 2 is a(27) = 134756982. - Chai Wah Wu, Jan 27 2019

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

A303026_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).

Sequence in context: A175547 A053654 A240587 * A247187 A147647 A269119

Adjacent sequences:  A323023 A323024 A323025 * A323027 A323028 A323029

KEYWORD

nonn,base

AUTHOR

Pierandrea Formusa, Jan 02 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 15 22:25 EDT 2019. Contains 328038 sequences. (Running on oeis4.)