A230477
Smallest number that is the sum of n positive n-th powers in >= n ways.
Original entry on oeis.org
1, 50, 5104, 236674, 9006349824, 82188309244
Offset: 1
1 = 1^1.
50 = 1^2 + 7^2 = 5^2 + 5^2.
5104 = 1^3 + 12^3 + 15^3 = 2^3 + 10^3 + 16^3 = 9^3 + 10^3 + 15^3.
236674 = 1^4 + 2^4 + 7^4 + 22^4 = 3^4 + 6^4 + 18^4 + 19^4 = 7^4 + 14^4 + 16^4 + 19^4 = 8^4 + 16^4 + 17^4 + 17^4.
9006349824 = 8^5 + 34^5 + 62^5 + 68^5 + 92^5 = 8^5 + 41^5 + 47^5 + 79^5 + 89^5 = 12^5 + 18^5 + 72^5 + 78^5 + 84^5 = 21^5 + 34^5 + 43^5 + 74^5 + 92^5 = 24^5 + 42^5 + 48^5 + 54^5 + 96^5.
82188309244 = 1^6 + 9^6 + 29^6 + 44^6 + 55^6 + 60^6 = 2^6 + 12^6 + 25^6 + 51^6 + 53^6 + 59^6 = 5^6 + 23^6 + 27^6 + 44^6 + 51^6 + 62^6 = 10^6 + 16^6 + 41^6 + 45^6 + 51^6 + 61^6 = 12^6 + 23^6 + 33^6 + 34^6 + 55^6 + 61^6 = 15^6 + 23^6 + 31^6 + 36^6 + 53^6 + 62^6.
- A. H. Beiler, Recreations in the Theory of Numbers: The Queen of Mathematics Entertains, Dover, NY, 1966, pp. 162-165, 290-291.
- R. K. Guy, Unsolved Problems in Number Theory, 3rd edition, Springer, 2004, D1.
Cf.
A146756 (smallest number that is the sum of n distinct positive n-th powers in exactly n ways),
A230561 (smallest number that is the sum of two positive n-th powers in >= n ways),
A091414 (smallest number that is the sum of n positive n-th powers in >= 2 ways).
A374256
a(n) is the smallest number which can be represented as the sum of n distinct positive n-th powers in exactly 2 ways, or -1 if no such number exists.
Original entry on oeis.org
-1, 65, 1009, 6834, 1158224, 19198660, 1518471174, 301963223843, 14599274102522, 1601155487573222
Offset: 1
a(2) = 65 = 1^2 + 8^2 = 4^2 + 7^2.
a(3) = 1009 = 1^3 + 2^3 + 10^3 = 4^3 + 6^3 + 9^3.
-
f:= proc(n) uses priqueue;
local pq,w,t,g,i,count,newt;
g:= proc(t) local i; [-add((t[i]+i)^n,i=1..n),op(t)] end proc;
w:= [0$(n+1)];
initialize(pq);
insert(g([0$n]),pq);
do
t:= extract(pq);
if t[1] = w[1] then return -t[1] fi;
w:= t;
for i from 2 to n+1 do
if t[i]=t[-1] then
newt:= g(t[2..-1] + [0$(i-2),1$(n+2-i)]);
insert(newt,pq);
fi od od;
end proc:
-1, seq(f(n),n=2..10); # Robert Israel, Jul 01 2024
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 = 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.
-
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
Showing 1-3 of 3 results.
Comments