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.

Original entry on oeis.org

0, 1, 353, 979, 14641, 16561, 998899, 2138312, 104060401, 1004006004001, 10004000600040001, 85045192129154058, 100004000060000400001, 1000004000006000004000001, 10000004000000600000040000001
Offset: 1

Views

Author

Chai Wah Wu, Jan 29 2016

Keywords

Comments

Subsequence of A217844 and supersequence of A186080.

Examples

			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
		

Crossrefs

Programs

  • 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

Extensions

a(13)-a(15) from Giovanni Resta, Aug 27 2019