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”).

A028888
Smaller of two successive primes with a palindromic product.
3
2, 7, 17, 191, 1051, 1934063
OFFSET
1,1
COMMENTS
No further terms less than 1.38 * 10^10. - Michael S. Branicky, Feb 07 2021
EXAMPLE
17 is in the sequence because 17 * 19 = 323.
19 is not in the sequence because 19 * 23 = 437.
MATHEMATICA
p = 2; t = {}; Do[q = NextPrime[p]; If[Reverse[x = IntegerDigits[p * q]] == x, AppendTo[t, p]]; p = q, {n, 150000}]; t (* Jayanta Basu, Jun 05 2013 *)
Prime[#]&/@Flatten[Position[Times@@@Partition[Prime[Range[1934100]], 2, 1], _?(PalindromeQ[#] &)]] (* Harvey P. Dale, May 14 2019 *)
PROG
(Python)
from sympy import nextprime
def ispal(n): s = str(n); return s == s[::-1]
p, q = 2, 3
while True:
if ispal(p*q): print(p)
p, q = q, nextprime(q) # Michael S. Branicky, Feb 07 2021
CROSSREFS
Sequence in context: A122382 A025554 A285810 * A082627 A160617 A279334
KEYWORD
nonn,base,more
EXTENSIONS
Edited by N. J. A. Sloane, May 04 2007
STATUS
approved