login
A344338
Smallest number that is the sum of two or more consecutive positive n-th powers in more than one way.
1
9, 365, 33075
OFFSET
1,1
COMMENTS
a(4) > 10^24. - Bert Dobbelaere, May 16 2021
Conjecture: no terms exist for n >= 4. - Jon E. Schoenfield, May 16 2021
EXAMPLE
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.
PROG
(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
CROSSREFS
KEYWORD
nonn,bref,more,hard
AUTHOR
Ilya Gutkovskiy, May 15 2021
STATUS
approved