A056810
Numbers whose fourth power is a palindrome.
Original entry on oeis.org
0, 1, 11, 101, 1001, 10001, 100001, 1000001, 10000001, 100000001, 1000000001, 10000000001, 100000000001
Offset: 1
- G. J. Simmons, Palindromic powers, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy]
- G. J. Simmons, On palindromic squares of non-palindromic numbers, J. Rec. Math., 5 (No. 1, 1972), 11-19. [Annotated scanned copy]
-
palQ[n_] := Block[{}, Reverse[idn = IntegerDigits@ n] == idn]; k = 0; lst = {}; While[k < 1000000002, If[ palQ[k^4], AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Oct 23 2015 *)
-
def ispal(n): s = str(n); return s == s[::-1]
def afind(limit):
for k in range(limit+1):
if ispal(k**4): print(k, end=", ")
afind(10000001) # Michael S. Branicky, Sep 05 2021
A002108
4th powers written backwards.
Original entry on oeis.org
1, 61, 18, 652, 526, 6921, 1042, 6904, 1656, 1, 14641, 63702, 16582, 61483, 52605, 63556, 12538, 679401, 123031, 61, 184491, 652432, 148972, 677133, 526093, 679654, 144135, 656416, 182707, 18, 125329, 6758401, 1295811, 6336331, 5260051, 6169761
Offset: 1
-
FromDigits[Reverse[IntegerDigits[#]]]&/@(Range[40]^4) (* Harvey P. Dale, May 03 2012 *)
-
a(n) = fromdigits(Vecrev(digits(n^4))); \\ Michel Marcus, Jun 04 2019
A348429
Perfect powers m^k, m >= 1, k >= 2 such that m and m^k both are palindromes.
Original entry on oeis.org
1, 4, 8, 9, 121, 343, 484, 1331, 10201, 12321, 14641, 40804, 44944, 1002001, 1030301, 1234321, 1367631, 4008004, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 1003003001, 10000200001, 10221412201, 12102420121, 12345654321, 40000800004
Offset: 1
First few terms are equal to 1, 2^2, 2^3, 3^2, 11^2, 7^3, 22^2, 11^3, 101^2, 111^2, 11^4 = 121^2, 202^2, 212^2, 1001^2, 101^3, 1111^2, 111^3.
-
Block[{n = 10^6, nn, s}, s = Select[Range[2, n], PalindromeQ]; nn = Max[s]^2; {1}~Join~Union@ Reap[Table[Do[If[PalindromeQ[m^k], Sow[m^k]], {k, 2, Log[m, nn]}], {m, s}]][[-1, -1]]] (* Michael De Vlieger, Oct 18 2021 *)
-
ispal(x) = my(d=digits(x)); d == Vecrev(d); \\ A002113
isok(m) = if (m==1, return (1)); my(p); ispal(m) && ispower(m, , &p) && ispal(p); \\ Michel Marcus, Oct 19 2021
-
ispal(x) = my(d=digits(x)); d == Vecrev(d); \\ A002113
lista(nn) = {my(list = List(1)); for (k=2, sqrtint(nn), if (ispal(k), my(q = k^2); until (q > nn, if (ispal(q), listput(list, q)); q *= k;););); vecsort(list,,8);} \\ Michel Marcus, Oct 20 2021
-
# see link for faster version
def ispal(n): s = str(n); return s == s[::-1]
def aupto(limit):
aset, m, mm = {1}, 2, 4
while mm <= limit:
if ispal(m):
mk = mm
while mk <= limit:
if ispal(mk): aset.add(mk)
mk *= m
mm += 2*m + 1
m += 1
return sorted(aset)
print(aupto(10**11)) # Michael S. Branicky, Oct 18 2021
A265449
Palindromes that are the sums of consecutive fourth powers.
Original entry on oeis.org
0, 1, 353, 979, 14641, 16561, 998899, 2138312, 104060401, 1004006004001, 10004000600040001, 85045192129154058, 100004000060000400001, 1000004000006000004000001, 10000004000000600000040000001
Offset: 1
353 = 2^4 + 3^4 + 4^4
979 = 1^4 + 2^4 + 3^4 + 4^4 + 5^4
16561 = 9^4 + 10^4
998899 = 19^4 +...+ 23^4
2138312 = 10^4 +...+ 25^4
85045192129154058 = 5582^4 +...+ 5666^4
-
import heapq
def ispal(n): s = str(n); return s == s[::-1]
def afind():
print("0, ") # special case
N, T = 4, 1 # power, min number of terms
sigma = sum(i**N for i in range(1, T+1))
h = [(sigma, 1, T)]
nextcount = T + 1
while True:
(v, s, l) = heapq.heappop(h)
if ispal(v): print(f"{v}, [= Sum_{{i = {s}..{l}}} i^{N}]")
if v >= sigma:
sigma += nextcount**N
heapq.heappush(h, (sigma, 1, nextcount))
nextcount += 1
v -= s**N; s += 1; l += 1; v += l**N
heapq.heappush(h, (v, s, l))
afind() # Michael S. Branicky, May 16 2021 after Bert Dobbelaere in A344338
Showing 1-4 of 4 results.
Comments