A240680 Primes p such that p*10+k is prime for exactly three values of the digit k.
7, 13, 31, 43, 61, 103, 109, 199, 271, 367, 409, 421, 523, 541, 547, 787, 823, 829, 883, 1009, 1033, 1117, 1237, 1291, 1669, 1999, 2131, 2161, 2203, 2269, 2437, 2503, 2593, 2671, 2857, 3049, 3253, 3271, 3361, 3559, 3583, 3769, 3823, 4003, 4201, 4339, 4357
Offset: 1
Examples
7 is in the sequence because 71, 73 and 79 are prime, but 77 is not prime.
Links
- Bruno Berselli, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[p: p in PrimesUpTo(10^4) | {k: k in [1,3,7,9] | IsPrime(p*10+k)} in Subsets({1,3,7,9},3)]; // Bruno Berselli, Apr 10 2014
-
Mathematica
Select[Prime[Range[600]],Total[Boole[PrimeQ[10#+{1,3,7,9}]]]==3&] (* Harvey P. Dale, Apr 07 2023 *)
-
PARI
forprime(p=2, 10000, t=0; forstep(k=1, 9, 2, if(isprime(p*10+k), t++)); if(t==3, print1(p, ", ")))