A252487 Smallest k such that n^7 = a_1^7 + ... + a_k^7 and all a_i are positive integers less than n.
128, 28, 66, 39, 28, 26, 21, 20, 18, 22, 22, 22, 20, 21, 14, 17, 14, 14, 17, 16, 17, 14, 16, 13, 15, 13, 12, 15, 13, 15, 13, 14, 13, 14, 13, 13, 14, 12, 12, 12, 13, 12, 12, 12, 11, 13, 13, 12, 12, 13, 12, 12, 11, 12, 11, 11, 12, 12, 11, 12, 9, 12, 11, 11, 11
Offset: 2
Keywords
Links
- Giovanni Resta, Table of n, a(n) for n = 2..200
- Jean-Charles Meyrignac, Computing Minimal Equal Sums Of Like Powers
- Manfred Scheucher, Sage Script for IP-generation
- Manfred Scheucher, Sage Script for b-file generation
- Eric Weisstein's World of Mathematics, Diophantine Equation--7th Powers
- Eric Weisstein's World of Mathematics, Waring's Problem
Programs
-
Maple
M:= 10^8: R:= Vector(M,144, datatype=integer[4]): for p from 1 to floor(M^(1/7)) do p7:= p^7; if p > 1 then A[p]:= R[p7] fi; R[p7]:= 1; for j from p7+1 to M do R[j]:= min(R[j],1+R[j - p7]); od od: F:= proc(n,k,ub) local lb, m, bestyet, res; if ub <= 0 then return -1 fi; if n <= M then if n = 0 then return 0 elif R[n] > ub then return -1 else return R[n] fi fi; lb:= floor(n/k^7); if lb > ub then return -1 fi; bestyet:= ub; for m from lb to 0 by -1 do res:= procname(n-m*k^7, k-1, bestyet-m); if res >= 0 then bestyet:= res+m; fi od: return bestyet end proc: for n from floor(M^(1/7))+1 to 50 do A[n]:= F(n^7,n-1,144) od: seq(A[n],n=2..50); # Robert Israel, Aug 17 2015
-
PARI
a(n,verbose=0,m=7)={N=n^m;for(k=3,999,forvec(v=vector(k-1,i,[1,n\sqrtn(k+1-i,m)]),ispower(N-sum(i=1,k-1,v[i]^m),m,&K)&&K>0&&!(verbose&&print1("/*"n" "v"*/"))&&return(k),1))}
Extensions
More terms from Manfred Scheucher, Aug 15 2015
a(50)-a(66) from Giovanni Resta, Aug 17 2015
Comments