%I #32 Jun 25 2024 10:15:01
%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,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,
%U 22,23,24,25,26,27,28,29,30,31,32,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,27,28,29,30,31,32,33,3,4,5,6,7,8,9,10,11,12
%N Least number of 5th powers needed to represent n.
%C Vaughan & Wooley (1995) prove that a(n) <= 17 for large enough n; in fact it is conjectured that a(n) <= 6 for large enough n. The maximum value is a(223) = 37. - _Charles R Greathouse IV_, Jul 05 2017
%H T. D. Noe, <a href="/A188462/b188462.txt">Table of n, a(n) for n = 1..10000</a>
%H R. C. Vaughan and T. D. Wooley, <a href="https://www.researchgate.net/publication/2842101_Waring's_Problem_A_Survey">Waring's problem: a survey</a>, Number theory for the millennium, III (Urbana, IL, 2000), 301-340, A K Peters, Natick, MA, 2002.
%H Robert C. Vaughan and Trevor D. Wooley, <a href="http://projecteuclid.org/euclid.acta/1485890852">Further improvements in Waring's problem</a>, Acta Mathematica 174:2 (1995), pp. 147-240.
%e 33 = 2^5 + 1^5 (least decomposition) hence a(33) = 2.
%t Cnt5[n_] := Module[{k = 1}, While[Length[PowersRepresentations[n, k, 5]] == 0, k++]; k]; Array[Cnt5, 105] (* _T. D. Noe_, Apr 01 2011 *)
%o (Python)
%o from itertools import count
%o from sympy.solvers.diophantine.diophantine import power_representation
%o def A188462(n):
%o if n == 1: return 1
%o for k in count(1):
%o try:
%o next(power_representation(n,5,k))
%o except:
%o continue
%o return k # _Chai Wah Wu_, Jun 25 2024
%Y Cf. A002828 (squares), A002376 (cubes), A002377 (4th powers), A374012 (6th powers).
%K nonn
%O 1,2
%A _Jean-François Alcover_, Apr 01 2011