A031991 Smallest n-digit norep emirp.
2, 13, 107, 1069, 10247, 102367, 1023487, 10235749, 102346897
Offset: 1
Links
- C. K. Caldwell, Prime Curios, Entry 102346897
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.
nde[n_]:=Module[{p=NextPrime[10^n,-1]},While[Max[Differences[ IntegerDigits[ p]]]>0 || CompositeQ[IntegerReverse[p]],p=NextPrime[ p,-1]];p]; Array[nde,17,2] (* Harvey P. Dale, Mar 13 2020 *)
from sympy import isprime from itertools import count, islice, combinations_with_replacement as mc def bgen(d): nd = ("".join(m) for m in mc("987654321", d)) yield from filter(isprime, map(int, nd)) def ok(ndp): s = str(ndp) return len(set(s)) != 1 and isprime(int(s[::-1])) def agen(): yield from (next(filter(ok, bgen(d))) for d in count(2)) print(list(islice(agen(), 20))) # Michael S. Branicky, Jun 26 2022
There are 12 norep emirps less than 100
Comments