A124888 Primes with prime number of only prime digits (i.e., 2, 3, 5, 7).
23, 37, 53, 73, 223, 227, 233, 257, 277, 337, 353, 373, 523, 557, 577, 727, 733, 757, 773, 22273, 22277, 22573, 22727, 22777, 23227, 23327, 23333, 23357, 23537, 23557, 23753, 23773, 25237, 25253, 25357, 25373, 25523, 25537, 25577, 25733, 27253, 27277
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
- József Bölcsföldi, György Birkás, and Miklós Ferenczi, Bölcsföldi-Birkás-Ferenczi prime numbers (Full prime numbers), International Journal of Mathematics and Statistics Invention (IJMSI), Volume 5, Issue 2, February 2017, pp. 4-7.
Programs
-
Mathematica
Select[Prime[Range[3000]],ContainsOnly[IntegerDigits[#],{2,3,5,7}]&&PrimeQ[Length[IntegerDigits[#]]]&] (* James C. McMahon, Dec 14 2024 *)
-
PARI
isok(p) = isprime(p) && (d=digits(p)) && isprime(#d) && vecmin(vector(#d, k, isprime(d[k]))); \\ Michel Marcus, Sep 21 2017
-
Python
from sympy import isprime, prime from itertools import count, islice, product def agen(): yield from filter(isprime, (int("".join(s)+e) for i in count(1) for s in product("2357", repeat=prime(i)-1) for e in "37")) print(list(islice(agen(), 42))) # Michael S. Branicky, Jun 23 2022
Extensions
Terms 773, 23753 inserted by Georg Fischer, Jun 23 2022