A075786 Palindromic perfect powers.
1, 4, 8, 9, 121, 343, 484, 676, 1331, 10201, 12321, 14641, 40804, 44944, 69696, 94249, 698896, 1002001, 1030301, 1234321, 1367631, 4008004, 5221225, 6948496, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 522808225, 617323716, 942060249
Offset: 1
Examples
343 = 7^3 is a term as it is a palindrome and a perfect power. - _David A. Corneth_, Mar 23 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)
Programs
-
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}]
-
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
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
Comments