%I #36 Oct 03 2020 09:28:14
%S 8,6,5,7,3,4,5,3,5,5,3,4,4,5,5,5,3,3,3,4,5,4,3,3,4,3,3,3,3,4,4,4,4,4,
%T 3,4,3,4,3,3,3,4,3,3,3,5,3,4,3,4,4,3,3,4,3,3,3,4,3,5,4,3,4,4,3,3,4,3,
%U 3,3,3,4,4,3,3,4,3,4,3,3,3,4,3,3,4,3,3,3,3,4,3,3,4,3,3,3
%N Smallest k such that n^3 = a_1^3+...+a_k^3 and all a_i are positive integers less than n.
%C It follows from Wieferich's result g(3) = 9 that a(n) <= 10. Theorem 2 of Bertault, Ramaré, & Zimmermann can be used to show that a(n) <= 8 (check congruence classes of cubes mod 333 with one summand of 1, 8, or 27). Probably a(2), a(3), and a(5) are the only members greater than 5 in this sequence. - _Charles R Greathouse IV_, Jul 30 2011
%H Giovanni Resta, <a href="/A161883/b161883.txt">Table of n, a(n) for n = 2..10000</a>
%H F. Bertault, O. Ramaré, and P. Zimmermann, <a href="http://dx.doi.org/10.1090/S0025-5718-99-01071-6">On sums of seven cubes</a>, Mathematics of Computation 68 (1999), pp. 1303-1310.
%H Jean-Charles Meyrignac, <a href="http://euler.free.fr/">Computing minimal equal sums of like powers</a>
%H Manfred Scheucher, <a href="/A161883/a161883.sage.txt">Sage Script</a>
%H Eric W. Weisstein, <a href="http://mathworld.wolfram.com/DiophantineEquation3rdPowers.html">Diophantine Equation 3rd Powers</a>
%H Eric W. Weisstein, <a href="http://mathworld.wolfram.com/WaringsProblem.html">Waring's Problem</a>
%t f[n_, k_] := Select[PowersRepresentations[n^3, k, 3], AllTrue[#, 0<#<n&]&];
%t a[n_] := For[k = 3, True, k++, If[f[n, k] != {}, Print[n, " ", k]; Return[k]]];
%t a /@ Range[2, 200] (* _Jean-François Alcover_, Oct 03 2020 *)
%o (PARI) A161883(n,verbose=0,m=3)={N=n^m;for(k=3,99,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&&!if(verbose,print1("/*"n" "v"*/"))&&return(k),1))} \\ _M. F. Hasler_, Dec 17 2014
%Y Cf. A161882, A161884, A161885.
%K nonn
%O 2,1
%A _Dmitry Kamenetsky_, Jun 21 2009
%E More terms from _M. F. Hasler_, Dec 17 2014