%I #24 Jun 26 2024 10:49:28
%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,
%T 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,
%U 50,51,52,53,54,55,56,57,58,59,60,61,62,63,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
%N Least number of 6th powers needed to represent n.
%C a(703) = 73.
%D Pillai, S. S. (1940) On Waring’s problem g(6) = 73. Proc. Indian Acad. Sci. 12A: 30-40
%H Seiichi Manyama, <a href="/A374012/b374012.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/WaringsProblem.html">Waring's Problem</a>.
%F a(n) <= 73.
%o (PARI) a_vector(n, k=6) = my(v=vector(n), cnt=0, d=0, p=1, s=sum(j=1, sqrtnint(n, k), x^j^k)+x*O(x^n)); while(cnt<n, d++; p*=s; for(i=1, n, if(!v[i] && polcoef(p, i), v[i]=d; cnt++))); v;
%o (Python)
%o from itertools import count
%o from sympy.solvers.diophantine.diophantine import power_representation
%o def A374012(n):
%o if n == 1: return 1
%o for k in count(1):
%o try:
%o next(power_representation(n,6,k))
%o except:
%o continue
%o return k # _Chai Wah Wu_, Jun 25 2024
%Y Cf. A002828, A002376, A002377, A188462.
%Y Cf. A002804, A018886.
%K nonn,look
%O 1,2
%A _Seiichi Manyama_, Jun 25 2024