A135066 Primes p such that p^3 is a palindrome.
2, 7, 11, 101
Offset: 1
Examples
a(3) = 11 because 11^3 = 1331 is a palindrome.
Links
- Patrick De Geest, Palindromic Cubes
Crossrefs
Programs
-
Mathematica
Do[ p = Prime[n]; f = p^3; If[ f == FromDigits[ Reverse[ IntegerDigits[ f ] ] ], Print[ {n, p, f} ]], {n, 1, 200000} ]
-
Python
from sympy import nextprime def ispal(n): s = str(n); return s == s[::-1] p = 2 while True: if ispal(p**3): print(p) p = nextprime(p) # Michael S. Branicky, Feb 07 2021
Formula
a(n) = A135067(n)^(1/3).
Comments