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.

A225603 Palindromic primes whose square is also a palindrome.

This page as a plain text file.
%I A225603 #13 May 22 2025 10:21:35
%S A225603 2,3,11,101,100111001,110111011,111010111,1100011100011,1100101010011,
%T A225603 1101010101011,100110101011001,101000010000101,101011000110101,
%U A225603 101110000011101,10000010101000001,10011010001011001,10100110001100101,10110010001001101,10111000000011101
%N A225603 Palindromic primes whose square is also a palindrome.
%C A225603 Subsets of A002385, A057135 and A065378.
%C A225603 Palindromes in A161721.  Conjecture: a(n) for n >=3 consists only of the digits 0,1. - _Chai Wah Wu_, Jan 06 2015
%H A225603 Chai Wah Wu, <a href="/A225603/b225603.txt">Table of n, a(n) for n = 1..27</a>
%e A225603 101 is a member since it is a palindromic prime such that 101^2=10201 is a palindrome.
%t A225603 palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; t={}; Do[If[palQ[p=Prime[n]] && palQ[p^2],AppendTo[t,p]],{n,10^7}]; t
%o A225603 (Python)
%o A225603 from __future__ import division
%o A225603 from sympy import isprime
%o A225603 def paloddgenrange(t,l,b=10): # generator of odd-length palindromes in base b of 2*t <=length <= 2*l
%o A225603     if t == 0:
%o A225603         yield 0
%o A225603     else:
%o A225603         for x in range(t+1,l+1):
%o A225603             n = b**(x-1)
%o A225603             n2 = n*b
%o A225603             for y in range(n,n2):
%o A225603                 k, m = y//b, 0
%o A225603                 while k >= b:
%o A225603                     k, r = divmod(k,b)
%o A225603                     m = b*m + r
%o A225603                 yield y*n + b*m + k
%o A225603 A225603_list = [2,3,11]
%o A225603 for i in paloddgenrange(1,10):
%o A225603     s = str(i*i)
%o A225603     if s == s[::-1] and isprime(i):
%o A225603         A225603_list.append(i) # _Chai Wah Wu_, Jan 06 2015
%Y A225603 Cf. A002385, A057135, A065378.
%K A225603 nonn,base
%O A225603 1,1
%A A225603 _Jayanta Basu_, May 11 2013
%E A225603 a(15)-a(19) from _Giovanni Resta_, May 11 2013