%I #30 Aug 17 2015 09:36:09
%S 32,26,19,18,14,12,9,11,9,13,6,12,8,10,9,8,10,10,9,10,10,7,6,9,7,9,8,
%T 9,6,9,6,8,7,7,6,8,7,8,7,7,7,9,8,9,7,8,6,7,8,7,7,7,7,7,7,7,7,7,6,7,7,
%U 7,6,8,8,6,7,7,7,7,5,7,7,7,7,8,6,7,7,7,7,7,6,7,7,7,7,7,6,7,7,7,5,7,6,7,7,6,7
%N Smallest k such that n^5 = a_1^5+...+a_k^5 and all a_i are positive integers less than n.
%C Based on Fermat's Last Theorem: 2 never occurs in this sequence. It is not known whether 3 occurs in this sequence. The first time 4 occurs is for 144^5=27^5+84^5+110^5+133^5.
%C The first time 5, 6, 7, 8, 9, 10 occur is for n=73, 12, 23, 14, 8, 15; see sequence A252485. - _M. F. Hasler_, Dec 17 2014
%H Giovanni Resta, <a href="/A161885/b161885.txt">Table of n, a(n) for n = 2..400</a>
%H Jean-Charles Meyrignac, <a href="http://euler.free.fr/">Computing Minimal Equal Sums Of Like Powers</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DiophantineEquation5thPowers.html">Diophantine Equation 5th Powers</a>
%e a(29) = 9 since 29^5 = 5^5 + 9^5 + 10^5 + 10^5 + 10^5 + 15^5 + 15^5 + 17^5 + 28^5, and there is no sum of less than 9 fifth powers equal to 26^5;
%e a(30) = 6 since 30^5 = 5^5 + 10^5 + 11^5 + 16^5 + 19^5 + 29^5;
%e a(72) = 5 since 72^5 = 19^5 + 43^5 + 46^5 + 47^5 + 67^5. - _M. F. Hasler_, Dec 17 2014
%o (PARI) a(n,verbose=0,m=5)={N=n^m;for(k=3,32,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))} \\ _M. F. Hasler_, Dec 17 2014
%o (PARI) a(n)={
%o my(N=n^5,k=3);
%o while(1,
%o my(v=vector(k-1,i,[sqrtnint(max((N-(k-i)*(n-1)^5-1)\i,0),5)+1,sqrtnint((N-i+1)\(k-i+1),5)]));
%o forvec(x=v,
%o my(s=N-sum(i=1,#x,x[i]^5));
%o if(s>0 && ispower(s,5), return(k))
%o ,
%o 1
%o );
%o k++
%o );
%o }; \\ _Charles R Greathouse IV_, Dec 18 2014
%Y Cf. A161882, A161883, A161884.
%K nonn
%O 2,1
%A _Dmitry Kamenetsky_, Jun 21 2009
%E a(43)-a(83) from _M. F. Hasler_, Dec 17 2014
%E a(77) corrected by _Charles R Greathouse IV_, Dec 19 2014
%E a(84)-a(100) from _Charles R Greathouse IV_, Dec 19 2014