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.

A344338 Smallest number that is the sum of two or more consecutive positive n-th powers in more than one way.

Original entry on oeis.org

9, 365, 33075
Offset: 1

Views

Author

Ilya Gutkovskiy, May 15 2021

Keywords

Comments

a(4) > 10^24. - Bert Dobbelaere, May 16 2021
Conjecture: no terms exist for n >= 4. - Jon E. Schoenfield, May 16 2021

Examples

			9 = 2 + 3 + 4 = 4 + 5.
365 = 10^2 + 11^2 + 12^2 = 13^2 + 14^2.
33075 = 11^3 + 12^3 + 13^3 + 14^3 + 15^3 + 16^3 + 17^3 + 18^3 + 19^3 = 15^3 + 16^3 + 17^3 + 18^3 + 19^3 + 20^3.
		

Crossrefs

Programs

  • Python
    N=3 # <== Adapt here
    import heapq
    sigma=1+2**N
    h=[(sigma,1,2)]
    nextcount=3
    oldv,olds,oldl=0,0,0
    while True:
        (v,s,l)=heapq.heappop(h)
        if v==oldv:
            break
        if v>=sigma:
            sigma += nextcount**N
            heapq.heappush(h, (sigma,1,nextcount))
            nextcount+=1
        oldv,olds,oldl = v,s,l
        v-=s**N ; s+=1 ; l+=1 ;    v+=l**N
        heapq.heappush(h,(v,s,l))
    print("a(%d) = %d = sum(i^%d, i=%d..%d) = sum(i^%d, i=%d..%d)"%
        (N,v,N,olds,oldl,N,s,l))
    # Bert Dobbelaere, May 16 2021