OFFSET
1,1
COMMENTS
This sequence is a subsequence of A062936. If you multiply a member of this sequence by its reversal you get a number fixed under TITO algorithm (see A161594).
Conjecture: except for a(2) which equals 3, all terms can only be composed of the digits 0, 1 or 2. - Chai Wah Wu, Jan 07 2015
Conjecture: the digit 2 can only appear once in each term. - Robert G. Wilson v, Jan 07 2015
Number of terms less than 10^n: 2, 3, 4, 6, 6, 8, 18, 28, 37, 65, 97, 153, 230, 304, 414, 556, 756, 960, 1255, ... - Robert G. Wilson v, Jan 07 2015
A proper subset of A007500. - Robert G. Wilson v, Jan 07 2015
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1255 (first 97 terms from Chai Wah Wu)
T. Khovanova, Turning Numbers Inside Out [From Tanya Khovanova, Jul 07 2009]
EXAMPLE
1021 is a prime number, its reversal is 1201, which is also a prime. The product 1021*1201 = 1226221 is a palindrome.
MAPLE
rev := proc (n) local nn: nn := convert(n, base, 10): add(nn[j]*10^(nops(nn)-j), j = 1 .. nops(nn)) end proc: a := proc (n) local p: p := ithprime(n): if isprime(rev(p)) = true and rev(p*rev(p)) = p*rev(p) then p else end if end proc: seq(a(n), n = 1 .. 800000); # Emeric Deutsch, Jun 26 2009
MATHEMATICA
rev[n_]:=FromDigits[Reverse[IntegerDigits[n]]]; t={}; Do[p=Prime[n]; If[PrimeQ[q=rev[p]] && rev[p*q]==p*q, AppendTo[t, p]], {n, 8*10^5}]; t (* Jayanta Basu, May 11 2013 *)
PROG
(Python)
from sympy import isprime
A161721_list = [2]
for i in range(3, 10**6, 2):
....j = int(str(i)[::-1])
....if j == i:
........s = str(i**2)
........if s == s[::-1] and isprime(i):
............A161721_list.append(i)
....elif j > i:
........s = str(i*j)
........if s == s[::-1] and isprime(i) and isprime(j):
............A161721_list.extend([i, j])
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Tanya Khovanova, Jun 17 2009
EXTENSIONS
Edited by N. J. A. Sloane, Jun 23 2009
More terms from Emeric Deutsch, Jun 26 2009
STATUS
approved