login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A084979
Palindromes such that the product of the digits + 1 is prime.
2
1, 2, 4, 6, 11, 22, 44, 66, 111, 121, 141, 161, 212, 232, 242, 272, 292, 323, 343, 383, 414, 464, 474, 545, 565, 616, 626, 636, 656, 747, 838, 848, 878, 898, 929, 969, 1111, 1221, 1441, 1661, 2112, 2222, 2332, 2552, 2772, 2882, 3223, 3883, 4114, 4444, 4554
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
Cf. A081988.
Sequence in context: A096460 A322051 A084353 * A049914 A056763 A190071
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