%I #97 Jun 15 2019 10:32:59
%S 1,2,2,4,2,4,12,8,18,14,4,28,12,24,32,0,34,20,14,28,4,32,44,40,28,10,
%T 40,56,64,72,8,48,66,24,68,8,46,88,60,32,4,52,64,116,76,12,64,72,60,
%U 82,26,72,104,104,88,8,112,56,136,140,8,136,96,72,98,16,72,132
%N Number of solutions to x^2 + 2*y^2 + 5*z^2 + 5*w^2 = n.
%C Ramanujan (1917) claimed that there are exactly 55 possible choice for a <= b <= c <= d such that a*x^2 + b*y^2 + c*z^2 + d*w^2 represents all natural numbers, but L. E. Dickson (1927) has pointed out that Ramanujan has overlooked the fact that (1, 2, 5, 5) does not represent 15. Consequently, there are only 54 forms. This sequence is related to the form (1, 2, 5, 5). As is proven, a(n) = 0 iff n = 15.
%C There are also many (a, b, c, d) other than this such that a*x^2 + b*y^2 + c*z^2 + d*w^2 represents all but finitely many natural numbers. For example, x^2 + y^2 + 5*z^2 + 5*w^2 represents all natural numbers except for 3 (cf. A236929); x^2 + y^2 + z^2 + d*w^2 (d == 2 (mod 4) or d = 9, 17, 25, 36, 68, 100 and some others) represents all natural numbers except for those of the form 4^i*(8*j + 7) and < d; x^2 + 2*y^2 + 6*z^2 + d*w^2 (d == 2 (mod 4) or d = 11, 19 and some others) represents all natural numbers except for those of the form 4^i*(8*j + 5) and < d.
%D J. H. Conway, Universal quadratic forms and the fifteen theorem, Contemporary Mathematics 272 (1999), 23-26.
%H Seiichi Manyama, <a href="/A319822/b319822.txt">Table of n, a(n) for n = 0..10000</a>
%H L. E. Dickson, <a href="https://doi.org/10.1090/S0002-9904-1927-04312-9">Integers represented by positive ternary quadratic forms</a>, Bulletin of the American Mathematical Society, 1927, 33(1):63-70.
%H H. D. Kloosterman, <a href="https://projecteuclid.org/euclid.acta/1487102066">On the representation of numbers in the form ax^2 + by^2 + cz^2 + dt^2</a>, Acta Mathematica, 1927, 49(3-4):407-464.
%H S. Ramanujan, <a href="http://ramanujan.sirinudi.org/Volumes/published/ram20.pdf">On the expression of a number in the form ax^2 + by^2 + cz^2 + du^2</a>, Proc. Camb. Phil. Soc. 19 (1917), 11-21.
%F a(n) = Sum_{k=0..floor(n/5)} A004018(k)*A033715(n-5*k).
%F G.f.: theta_3(q)*theta_3(q^2)*theta_3(q^5)^2, where theta_3() is the Jacobi theta function.
%e a(5) = 4 because 0^2 + 2*0^2 + 5*0^2 + 5*1^2 = 0^2 + 2*0^2 + 5*0^2 + 5*(-1)^2 = 0^2 + 2*0^2 + 5*1^2 + 5*0^2 = 0^2 + 2*0^2 + 5*(-1)^2 + 5*0^2 = 5 and these are the only four solutions to x^2 + 2*y^2 + 5*z^2 + 5*w^2 = 5.
%p JT := (k, n) -> JacobiTheta3(0, x^k)^n:
%p A319822List := proc(len) series(JT(1,1)*JT(2,1)*JT(5,2), x, len+1);
%p seq(coeff(%, x, j), j=0..len) end: A319822List(67); # _Peter Luschny_, Oct 01 2018
%t CoefficientList[EllipticTheta[3, 0, q] EllipticTheta[3, 0, q^2] EllipticTheta[ 3, 0, q^5]^2 + O[q]^100, q] (* _Jean-François Alcover_, Jun 15 2019 *)
%o (PARI) A004018(n) = if(n, 4*sumdiv(n,d,kronecker(-4,d)), 1);
%o A033715(n) = if(n, 2*sumdiv(n,d,kronecker(-2,d)), 1);
%o a(n) = my(i=0); for(k=0, n\5, i+=A004018(k)*A033715(n-5*k)); i
%o (PARI) N=99; q='q+O('q^N);
%o gf = (eta(q^2)*eta(q^4))^3*eta(q^10)^10/(eta(q)*eta(q^5)^2*eta(q^8)*eta(q^20)^2)^2;
%o Vec(gf) \\ _Altug Alkan_, Oct 01 2018
%o (Sage)
%o Q = DiagonalQuadraticForm(ZZ, [1, 2, 5, 5])
%o Q.theta_series(68).list() # _Peter Luschny_, Oct 01 2018
%Y Cf. A004018, A033715, A236922-A236933.
%Y From _Seiichi Manyama_, Oct 07 2018: (Start)
%Y 54 possible choice:
%Y k | a, b, c, d | Number of solutions
%Y ------+-----------------+--------------------
%Y 1 | 1, 1, 1, 1 | A000118
%Y 2 | 1, 1, 1, 2 | A236928
%Y 3 | 1, 1, 1, 3 | A236926
%Y 4 | 1, 1, 1, 4 | A236923
%Y 5 | 1, 1, 1, 5 | A236930
%Y 6 | 1, 1, 1, 6 | A236931
%Y 7 | 1, 1, 1, 7 | A236932
%Y 8 | 1, 1, 2, 2 | A097057
%Y 9 | 1, 1, 2, 3 | A320124
%Y 10 | 1, 1, 2, 4 | A320125
%Y 11 | 1, 1, 2, 5 | A320126
%Y 12 | 1, 1, 2, 6 | A320127
%Y 13 | 1, 1, 2, 7 | A320128
%Y 14 | 1, 1, 2, 8 | A320130
%Y 15 | 1, 1, 2, 9 | A320131
%Y 16 | 1, 1, 2, 10 | A320132
%Y 17 | 1, 1, 2, 11 | A320133
%Y 18 | 1, 1, 2, 12 | A320134
%Y 19 | 1, 1, 2, 13 | A320135
%Y 20 | 1, 1, 2, 14 | A320136
%Y 21 | 1, 1, 3, 3 | A034896
%Y 22 | 1, 1, 3, 4 | A272364
%Y 23 | 1, 1, 3, 5 | A320147
%Y 24 | 1, 1, 3, 6 | A320148
%Y 25 | 1, 2, 2, 2 | A320149
%Y 26 | 1, 2, 2, 3 | A320150
%Y 27 | 1, 2, 2, 4 | A236924
%Y 28 | 1, 2, 2, 5 | A320151
%Y 29 | 1, 2, 2, 6 | A320152
%Y 30 | 1, 2, 2, 7 | A320153
%Y 31 | 1, 2, 3, 3 | A320138
%Y 32 | 1, 2, 3, 4 | A320139
%Y 33 | 1, 2, 3, 5 | A320140
%Y 34 | 1, 2, 3, 6 | A033712
%Y 35 | 1, 2, 3, 7 | A320188
%Y 36 | 1, 2, 3, 8 | A320189
%Y 37 | 1, 2, 3, 9 | A320190
%Y 38 | 1, 2, 3, 10 | A320191
%Y 39 | 1, 2, 4, 4 | A320193
%Y 40 | 1, 2, 4, 5 | A320194
%Y 41 | 1, 2, 4, 6 | A320195
%Y 42 | 1, 2, 4, 7 | A320196
%Y 43 | 1, 2, 4, 8 | A033720
%Y 44 | 1, 2, 4, 9 | A320197
%Y 45 | 1, 2, 4, 10 | A320198
%Y 46 | 1, 2, 4, 11 | A320199
%Y 47 | 1, 2, 4, 12 | A320200
%Y 48 | 1, 2, 4, 13 | A320201
%Y 49 | 1, 2, 4, 14 | A320202
%Y 50 | 1, 2, 5, 6 | A320163
%Y 51 | 1, 2, 5, 7 | A320164
%Y 52 | 1, 2, 5, 8 | A320165
%Y 53 | 1, 2, 5, 9 | A320166
%Y 54 | 1, 2, 5, 10 | A033722
%Y (End)
%K nonn
%O 0,2
%A _Jianing Song_, Sep 28 2018