OFFSET
1,2
COMMENTS
Up to 10^12, there are only 43 perfect powers which are palindromic.
The sequence is infinite, for instance it contains (10^k+1)^2. - Emmanuel Vantieghem, Sep 29 2017
Conjecture: there are no palindromic perfect powers with prime exponent > 3. - Chai Wah Wu, Aug 26 2021
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2001 (n = 1..176 from Michael S. Branicky, n = 177..504 from David A. Corneth)
EXAMPLE
343 = 7^3 is a term as it is a palindrome and a perfect power. - David A. Corneth, Mar 23 2021
MATHEMATICA
a = {}; Do[q = IntegerDigits[n]; p = FromDigits[ Join[ q, Reverse[ Drop[q, -1]]]]; If[ Apply[ GCD, Last[ Transpose[ FactorInteger[p]]]] > 1, a = Append[a, p]]; p = FromDigits[ Join[ q, Reverse[q]]]; If[ Apply[ GCD, Last[ Transpose[ FactorInteger[p]]]] > 1, a = Append[a, p]], {n, 1, 10^5}]
PROG
(Python)
from math import isqrt
def ispal(n): s = str(n); return s == s[::-1]
def athrough(digits):
found, limit = {1}, 10**digits
for k in range(2, isqrt(limit) + 1):
kpow = k*k
while kpow < limit:
if ispal(kpow): found.add(kpow)
kpow *= k
return sorted(found)
print(athrough(9)) # Michael S. Branicky, Mar 23 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Oct 10 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Oct 11 2002
More terms from David A. Corneth, Mar 24 2021
b-file corrected and extended by Chai Wah Wu, Aug 26 2021
STATUS
approved