A032685 Numbers k such that k surrounded by digit '9' is a prime.
1, 2, 10, 19, 20, 23, 31, 34, 41, 43, 47, 53, 61, 62, 64, 67, 68, 71, 73, 74, 76, 82, 83, 85, 92, 94, 100, 101, 107, 109, 112, 113, 115, 119, 122, 124, 130, 136, 145, 149, 152, 163, 190, 193, 196, 200, 211, 217, 218, 221, 226, 236, 239, 241, 245
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Select[Range[300],PrimeQ[FromDigits[Join[{9},IntegerDigits[#],{9}]]]&] (* Harvey P. Dale, Jul 20 2012 *)
-
Python
from sympy import isprime def ok(n): return isprime(int('9' + str(n) + '9')) print([k for k in range(250) if ok(k)]) # Michael S. Branicky, Sep 04 2022