OFFSET
1,2
LINKS
J.W.L. (Jan) Eerland, Table of n, a(n) for n = 1..10928
FORMULA
a(n) >> n^k, where k = log_3(10) = 2.0959.... - Charles R Greathouse IV, Aug 02 2010
EXAMPLE
383 is a term since 3*8*3 = 72, 72+1 = 73 is prime.
MATHEMATICA
Select[ Range[4663], FromDigits[ Reverse[ IntegerDigits[ # ]]] == # && PrimeQ[1 + Times @@ IntegerDigits[ # ]] & ]
Parallelize[While[True, If[PalindromeQ[n]&&PrimeQ[1+Product[Part[IntegerDigits[n], k], {k, 1, Length[IntegerDigits[n]]}]], Print[n]]; n++]; n] (* J.W.L. (Jan) Eerland, Dec 27 2021 *)
PROG
(Python)
from math import prod
from sympy import isprime
from itertools import count, islice, product
def cond(n): return isprime(prod(map(int, str(n))) + 1)
def pals(): # generator of palindromes as strings
digits = "0123456789"
for d in count(1):
for p in product(digits, repeat=d//2):
if d > 1 and p[0] == "0": continue
left = "".join(p); right = left[::-1]
for mid in [[""], digits][d%2]:
yield int(left + mid + right)
def agen(): yield from filter(cond, pals())
print(list(islice(agen(), 51))) # Michael S. Branicky, Aug 22 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 21 2003
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Jun 21 2003
Formula by Charles R Greathouse IV, Aug 02 2010
STATUS
approved