cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A265449 Palindromes that are the sums of consecutive fourth powers.

This page as a plain text file.
%I A265449 #17 May 16 2021 22:13:32
%S A265449 0,1,353,979,14641,16561,998899,2138312,104060401,1004006004001,
%T A265449 10004000600040001,85045192129154058,100004000060000400001,
%U A265449 1000004000006000004000001,10000004000000600000040000001
%N A265449 Palindromes that are the sums of consecutive fourth powers.
%C A265449 Subsequence of A217844 and supersequence of A186080.
%e A265449 353 = 2^4 + 3^4 + 4^4
%e A265449 979 = 1^4 + 2^4 + 3^4 + 4^4 + 5^4
%e A265449 16561 = 9^4 + 10^4
%e A265449 998899 = 19^4 +...+ 23^4
%e A265449 2138312 = 10^4 +...+ 25^4
%e A265449 85045192129154058 = 5582^4 +...+ 5666^4
%o A265449 (Python)
%o A265449 import heapq
%o A265449 def ispal(n): s = str(n); return s == s[::-1]
%o A265449 def afind():
%o A265449   print("0, ") # special case
%o A265449   N, T = 4, 1  # power, min number of terms
%o A265449   sigma = sum(i**N for i in range(1, T+1))
%o A265449   h = [(sigma, 1, T)]
%o A265449   nextcount = T + 1
%o A265449   while True:
%o A265449     (v, s, l) = heapq.heappop(h)
%o A265449     if ispal(v): print(f"{v}, [= Sum_{{i = {s}..{l}}} i^{N}]")
%o A265449     if v >= sigma:
%o A265449       sigma += nextcount**N
%o A265449       heapq.heappush(h, (sigma, 1, nextcount))
%o A265449       nextcount += 1
%o A265449     v -= s**N; s += 1; l += 1; v += l**N
%o A265449     heapq.heappush(h, (v, s, l))
%o A265449 afind() # _Michael S. Branicky_, May 16 2021 after _Bert Dobbelaere_ in A344338
%Y A265449 Cf. A186080, A217844.
%K A265449 nonn,base,more
%O A265449 1,3
%A A265449 _Chai Wah Wu_, Jan 29 2016
%E A265449 a(13)-a(15) from _Giovanni Resta_, Aug 27 2019