login
Least number of 4th powers needed to represent n.
(Formerly M0471 N0172)
30

%I M0471 N0172 #62 Jun 25 2024 10:14:14

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,

%T 15,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,3,4,5,6,7,8,9,10,11,12,

%U 13,14,15,16,17,18,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,5,1,2,3

%N Least number of 4th powers needed to represent n.

%C No terms are greater than 19, see A002804. - _Charles R Greathouse IV_, Aug 01 2013

%C Seven values of n need the maximum of 19 fourth powers. These form the arithmetic progression {79, 159, 239, 319, 399, 479, 559} each term being congruent to 79 mod 80. For n < 625 the available fourth powers are congruent to 1 or 16 mod 80, requiring 4*16 + 15*1 to sum to 79. However, 625 = 5^4 is congruent to 65 and 1*65 + 14*1 = 79. So for n > 625 and congruent to 79, only 15 fourth powers are needed to satisfy the mod 80 arithmetic. - _Peter Munn_, Apr 12 2017

%D D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 82.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A002377/b002377.txt">Table of n, a(n) for n = 1..14000</a>

%H C. A. Bretschneider, <a href="http://gdz.sub.uni-goettingen.de/dms/load/img/?PPN=PPN243919689_0046&amp;IDDOC=266941">Zerlegung der Zahlen bis 4100 in Biquadrate</a>, J. Reine Angew. Math., 46 (1853), 1-28.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BiquadraticNumber.html">Biquadratic Number</a>

%t Cnt4[n_] := Module[{k = 1}, While[Length[PowersRepresentations[n, k, 4]] == 0, k++]; k]; Array[Cnt4, 100] (* _T. D. Noe_, Apr 01 2011 *)

%t seq[n_] := Module[{v = Table[0, {n}], s, p}, s = Sum[x^(k^4), {k, 1, n^(1/4)}] + O[x]^(n+1); p=1; For[k=1, k <= 19, k++, p *= s; For[i=1, i <= n, i++, If[v[[i]]==0 && Coefficient[p, x, i] != 0, v[[i]] = k]]]; v];

%t seq[100] (* _Jean-François Alcover_, Sep 28 2019, after _Andrew Howroyd_ *)

%o (PARI) seq(n)={my(v=vector(n), s=sum(k=1, sqrtint(sqrtint(n)), x^(k^4)) + O(x*x^n), p=1); for(k=1, 19, p*=s; for(i=1, n, if(!v[i] && polcoeff(p,i), v[i]=k))); v} \\ _Andrew Howroyd_, Jul 06 2018

%o (Python)

%o from itertools import count

%o from sympy.solvers.diophantine.diophantine import power_representation

%o def A002377(n):

%o if n == 1: return 1

%o for k in count(1):

%o try:

%o next(power_representation(n,4,k))

%o except:

%o continue

%o return k # _Chai Wah Wu_, Jun 25 2024

%Y Cf. A002828, A002376, A188462, A374012.

%Y Cf. A046049, A046050, A099591.

%K nonn,nice

%O 1,2

%A _N. J. A. Sloane_

%E More terms from Arlin Anderson (starship1(AT)gmail.com)