login
A032685
Numbers k such that k surrounded by digit '9' is a prime.
9
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,2
LINKS
MATHEMATICA
Select[Range[300], PrimeQ[FromDigits[Join[{9}, IntegerDigits[#], {9}]]]&] (* Harvey P. Dale, Jul 20 2012 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, May 15 1998
STATUS
approved