login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A265449
Palindromes that are the sums of consecutive fourth powers.
0
0, 1, 353, 979, 14641, 16561, 998899, 2138312, 104060401, 1004006004001, 10004000600040001, 85045192129154058, 100004000060000400001, 1000004000006000004000001, 10000004000000600000040000001
OFFSET
1,3
COMMENTS
Subsequence of A217844 and supersequence of A186080.
EXAMPLE
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
PROG
(Python)
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
CROSSREFS
Sequence in context: A054825 A304385 A142565 * A142785 A259958 A126657
KEYWORD
nonn,base,more
AUTHOR
Chai Wah Wu, Jan 29 2016
EXTENSIONS
a(13)-a(15) from Giovanni Resta, Aug 27 2019
STATUS
approved