|
|
A135066
|
|
Primes p such that p^3 is a palindrome.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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, ...}.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(3) = 11 because 11^3 = 1331 is a palindrome.
|
|
MATHEMATICA
|
Do[ p = Prime[n]; f = p^3; If[ f == FromDigits[ Reverse[ IntegerDigits[ f ] ] ], Print[ {n, p, f} ]], {n, 1, 200000} ]
|
|
PROG
|
(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)
|
|
CROSSREFS
|
Cf. A002780 (cube is a palindrome), A069748 (n and n^3 are both palindromes), A002781 (palindromic cubes), A135067 (palindromic cubes of primes).
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|