OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
241 belongs to this sequence as 92419 is also a prime.
MAPLE
filter:= proc(n) isprime(9+10*n+9*10^(2+ilog10(n))) end proc:
select(filter, [seq(ithprime(i), i=1..1000)]); # Robert Israel, Feb 02 2021
MATHEMATICA
Select[ Range[2000], PrimeQ[ # ] && PrimeQ[ FromDigits[ Insert[ IntegerDigits[ # ], 9, {{1}, {-1}}]]] &]
Select[Prime[Range[200]], PrimeQ[FromDigits[Join[{9}, IntegerDigits[#], {9}]]]&] (* Harvey P. Dale, Nov 07 2022 *)
PROG
(Python)
from sympy import isprime, primerange
def ok(p): return isprime(int('9'+str(p)+'9'))
def aupto(lim): return [p for p in primerange(2, lim+1) if ok(p)]
print(aupto(911)) # Michael S. Branicky, Feb 19 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 06 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, May 03 2002
STATUS
approved