OFFSET
1,1
MATHEMATICA
Select[Range[3*10^5], AllTrue[FromDigits/@Table[Join[IntegerDigits[#], IntegerDigits [#], {n}], {n, {1, 3, 7, 9}}], PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 07 2021 *)
PROG
(Python)
import numpy as np
from functools import reduce
def factors(n):
return reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
for i in range(1, 50000):
p1=int(str(i)+str(i)+"1")
p3=int(str(i)+str(i)+"3")
p7=int(str(i)+str(i)+"7")
p9=int(str(i)+str(i)+"9")
if len(factors(p1))<3 and len(factors(p3))<3 and len(factors(p7))<3 and len(factors(p9))<3:
print(i, end=', ')
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Abhiram R Devesh, Jan 26 2013
STATUS
approved