Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Feb 07 2021 14:58:02
%S 2,7,11,101
%N Primes p such that p^3 is a palindrome.
%C Note that all first 4 listed terms are the palindromes. Corresponding palindromic cubes a(n)^3 are listed in A135067 = {8, 343, 1331, 1030301, ...}. PrimePi[ a(n) ] = {1, 4, 5, 26, ...}.
%C No further terms less than 1.29 * 10^10. - _Michael S. Branicky_, Feb 07 2021
%H Patrick De Geest, <a href="http://www.worldofnumbers.com/cube.htm">Palindromic Cubes</a>
%F a(n) = A135067(n)^(1/3).
%e a(3) = 11 because 11^3 = 1331 is a palindrome.
%t Do[ p = Prime[n]; f = p^3; If[ f == FromDigits[ Reverse[ IntegerDigits[ f ] ] ], Print[ {n, p, f} ]], {n, 1, 200000} ]
%o (Python)
%o from sympy import nextprime
%o def ispal(n): s = str(n); return s == s[::-1]
%o p = 2
%o while True:
%o if ispal(p**3): print(p)
%o p = nextprime(p) # _Michael S. Branicky_, Feb 07 2021
%Y Cf. A002780 (cube is a palindrome), A069748 (n and n^3 are both palindromes), A002781 (palindromic cubes), A135067 (palindromic cubes of primes).
%K nonn,base,more
%O 1,1
%A _Alexander Adamchuk_, Nov 16 2007