cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A161721 Primes p such that the reversal of p is prime and the product of p with its reversal is a palindrome.

Original entry on oeis.org

2, 3, 11, 101, 1021, 1201, 111211, 112111, 1000211, 1010201, 1020101, 1101211, 1102111, 1111021, 1112011, 1120001, 1121011, 1201111, 10011101, 10012001, 10021001, 10100201, 10111001, 10200101, 11012011, 11021011, 11100121, 12100111
Offset: 1

Views

Author

Tanya Khovanova, Jun 17 2009

Keywords

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

Examples

			1021 is a prime number, its reversal is 1201, which is also a prime. The product 1021*1201 = 1226221 is a palindrome.
		

Crossrefs

Programs

  • 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 *)
  • 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])
    A161721_list = sorted(A161721_list) # Chai Wah Wu, Jan 07 2015

Extensions

Edited by N. J. A. Sloane, Jun 23 2009
More terms from Emeric Deutsch, Jun 26 2009