cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 41-50 of 199 results. Next

A301391 Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and y even such that x^2 - (6*y)^2 = 4^k for some k = 0,1,2,....

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 1, 4, 1, 1, 2, 1, 1, 2, 1, 3, 4, 1, 1, 8, 2, 2, 2, 3, 2, 6, 1, 2, 2, 1, 1, 11, 3, 2, 4, 4, 3, 3, 1, 6, 10, 6, 2, 7, 2, 3, 2, 6, 3, 8, 2, 7, 7, 2, 1, 11, 4, 4, 2, 2, 1, 6, 1, 3, 11, 3, 3, 16, 3, 5, 4, 8, 5, 2, 3, 11, 5, 8, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 20 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 11, 13, 19, 2^k*m (k = 0,1,2,... and m = 1, 5, 7, 31).
We have verified a(n) > 0 for all n = 1..10^7.
See also A301376 for a similar conjecture.

Examples

			a(2) = 1 since 2^2 = 2^2 + 0^2 + 0^2 + 0^2 with 2^2 - (6*0)^2 = 4^1.
a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4^2 - (6*0)^2 = 4^2.
a(7) = 1 since 7^2 = 2^2 + 0^2 + 3^2 + 6^2 with 2^2 - (6*0)^2 = 4^1.
a(11) = 1 since 11 = 2^2 + 0^2 + 6^2 + 9^2 with 2^2 - (6*0)^2 = 4^1.
a(13) = 1 since 13 = 4^2 + 0^2 + 3^2 + 12^2 with 4^2 - (6*0)^2 = 4^2.
a(19) = 1 since 19 = 1^2 + 0^2 + 6^2 + 18^2 with 1^2 - (6*0)^2 = 4^0.
a(31) = 1 since 31^2 = 20^2 + 2^2 + 14^2 + 19^2 with 20^2 - (6*2)^2 = 4^4.
a(75) = 2 since 75^2 = 68^2 + 10^2 + 1^2 + 30^2 = 68^2 + 10^2 + 15^2 + 26^2 with 68^2 - (6*10)^2 = 4^5.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1]-3,4]==0&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=n==0||(n>0&&g[n]);
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[4^k+144m^2]&&QQ[n^2-4^k-148m^2], Do[If[SQ[n^2-(4^k+148m^2)-z^2],r=r+1],{z,0,Sqrt[(n^2-4^k-148m^2)/2]}]],{k,0,Log[2,n]},{m,0,Sqrt[(n^2-4^k)/148]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A260625 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (x+3*y+13*z)*x*y*z a square, where x is a positive integer, and y,z,w are nonnegative integers with y >= z.

Original entry on oeis.org

1, 2, 1, 1, 4, 4, 1, 2, 4, 5, 3, 1, 4, 7, 2, 1, 7, 6, 5, 6, 6, 5, 4, 4, 6, 11, 4, 3, 10, 7, 2, 2, 7, 7, 8, 4, 4, 10, 1, 5, 13, 7, 3, 5, 10, 6, 1, 1, 8, 13, 7, 5, 10, 13, 5, 7, 7, 6, 9, 3, 10, 13, 3, 1, 15, 13, 5, 10, 12, 8, 3, 6, 8, 16, 8, 8, 14, 8, 2, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 30 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 7, 39, 47, 95, 191, 239, 327, 439, 871, 1167, 1199, 1367, 1487, 1727, 1751, 2063, 2351, 2471, 4647, 4^k*m (k = 0,1,2,... and m = 1, 3).
(ii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that (a*x+b*y+c*z)*x*y*z is a square, whenever (a,b,c) is among the triples (1,3,7), (1,5,7), (1,5,11), (1,13,23), (2,4,6), (2,4,8), (2,6,8), (2,8,26), (3,5,21), (3,7,15), (3,9,43), (3,9,69), (3,9,141), (3,21,27), (3,27,39), (3,33,45), (3,39,123), (6,8,12), (6,8,18), (6,8,22), (6,8,28), (6,12,48), (6,18,132), (6,24,34), (6,24,36), (6,42,72), (7,13,29), (7,19,23), (12,18,24), (12,18,30), (12,26,48), (13,15,21), (13,17,19), (13,33,39), (14,28,58), (15,45,51), (16,22,62), (18,22,24), (21,27,33), (21,27,57), (23,37,61), (24,54,66), (33,57,79), (38,48,66), (42,58,84), (46,92,118).
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.

Examples

			a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1 > 0 and (1+3*1+13*0)*1*1*0 =0^2.
a(4) = 1 since 4 = 2^2 + 0^2 + 0^2 + 0^2 with 2 > 0, 0 = 0 and (2+3*0+13*0)*2*0*0 = 0^2.
a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 2 > 0, 1 = 1 and
(2+3*1+13*1)*2*1*1 = 6^2.
a(39) = 1 since 39 = 2^2 + 3^2 + 1^2 + 5^2 with 2 > 0, 3 > 1 and (2+3*3+13*1)*2*3*1 = 12^2.
a(47) = 1 since 47 = 2^2 + 3^2 + 3^2 + 5^2 with 2 > 0, 3 = 3 and (2+3*3+13*3)*2*3*3 = 30^2.
a(95) = 1 since 95 = 2^2 + 3^2 + 1^2 + 9^2 with 2 > 0, 3 > 1 and (2+3*3+13*1)*2*3*1 = 12^2.
a(191) = 1 since 191 = 2^2 + 3^2 + 3^2 + 13^2 with 2 > 0, 3 = 3 and (2+3*3+13*3)*2*3*3 = 30^2.
a(239) = 1 since 239 = 2^2 + 3^2 + 1^2 + 15^2 with 2 > 0, 3 > 1 and (2+3*3+13*1)*2*3*1 = 12^2.
a(327) = 1 since 327 = 11^2 + 3^2 + 1^2 + 14^2 with 11 > 0, 3 > 1 and (11+3*3+13*1)*11*3*1 = 33^2.
a(439) = 1 since 439 = 10^2 + 5^2 + 5^2 + 17^2 with 10 > 0, 5 = 5 and (10+3*5+13*5)*10*5*5 = 150^2.
a(871) = 1 since 871 = 21^2 + 15^2 + 3^2 + 14^2 with 21 > 0, 15 > 3 and (21+3*15+13*3)*21*15*3 = 315^2.
a(1167) = 1 since 1167 = 22^2 + 11^2 + 11^2 + 21^2 with 22 > 0, 11 = 11 and (22+3*11+13*11)*22*11*11 = 726^2.
a(1199) = 1 since 1199 = 14^2 + 21^2 + 21^2 + 11^2 with 14 > 0, 21 = 21 and (14+3*21+13*21)*14*21*21 = 1470^2.
a(1367) = 1 since 1367 = 14^2 + 21^2 + 21^2 + 17^2 with 14 > 0, 21 = 21 and (14+3*21+13*21)*14*21*21 = 1470^2.
a(1487) = 1 since 1487 = 9^2 + 29^2 + 6^2 + 23^2 with 9 > 0, 29 > 6 and (9+3*29+13*6)*9*29*6 = 522^2.
a(1727) = 1 since 1727 = 2^2 + 21^2 + 21^2 + 29^2 with 2 > 0, 21 = 21 and (2+3*21+13*21)*2*21*21 = 546^2.
a(1751) = 1 since 1751 = 9^2 + 17^2 + 15^2 + 34^2 with 9 > 0, 17 > 15 and (9+3*17+13*15)*9*17*15 = 765^2.
a(2063) = 1 since 2063 = 18^2 + 19^2 + 3^2 + 37^2 with 18 > 0, 19 > 3 and (18+3*19+13*3)*18*19*3 = 342^2.
a(2351) = 1 since 2351 = 15^2 + 35^2 + 15^2 + 26^2 with 15 > 0, 35 > 15 and (15+3*35+13*15)*15*35*15 = 1575^2.
a(2471) = 1 since 2471 = 1^2 + 18^2 + 11^2 + 45^2 with 1 > 0, 18 > 11 and (1+3*18+13*11)*1*18*11 = 198^2.
a(4647) = 1 since 4647 = 10^2 + 45^2 + 29^2 + 41^2 with 10 > 0, 45 > 29 and (10+3*45+13*29)*10*45*29 = 2610^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(x+3y+13z)x*y*z], r=r+1],{x,1,Sqrt[n]},{z,0,Sqrt[(n-x^2)/2]},{y,z,Sqrt[n-x^2-z^2]}];Print[n," ",r];Label[aa];Continue,{n,1,80}]

A272620 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w + x + y - z a square, where w is an integer and x,y,z are nonnegative integers with |w| <= x >= y <= z < x + y.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 1, 4, 1, 1, 3, 3, 2, 3, 1, 7, 1, 2, 3, 2, 1, 3, 3, 7, 2, 3, 1, 7, 1, 1, 4, 5, 3, 2, 1, 9, 2, 5, 3, 6, 5, 3, 3, 7, 2, 2, 5, 6, 3, 3, 5, 9, 4, 4, 4, 9, 4, 4, 5, 6, 6, 1, 6, 12, 2, 2, 7, 4, 4, 6, 5, 11, 7, 3, 5, 9, 4, 5
Offset: 1

Views

Author

Zhi-Wei Sun, May 03 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
In contrast, the author has proved that any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that x + y + z is a square. See arXiv:1604.06723.
Yu-Chen Sun and the author proved in arXiv:1605.03074 that any nonnegative integer can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that w + x + y + z is a square. - Zhi-Wei Sun, May 10 2016

Examples

			a(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 0 < 1 > 0 = 0 < 1 + 0 and 0 + 1 + 0 - 0 = 1^2.
a(2) = 1 since 2 = (-1)^2 + 1^2 + 0^2 + 0^2 with 1 = 1 > 0 = 0 < 1 + 0 and -1 + 1 + 0 - 0 = 0^2.
a(3) = 1 since 3 = 0^2 + 1^2 + 1^2 + 1^2 with 0 < 1 = 1 = 1 < 1 + 1 and 0 + 1 + 1 - 1 = 1^2.
a(4) = 1 since 4 = (-1)^2 + 1^2 + 1^2 + 1^2 with 1 = 1 = 1 = 1 < 1 + 1 and -1 + 1 + 1 - 1 = 0^2.
a(6) = 1 since 6 = (-1)^2 + 2^2 + 0^2 + 1^2 with 1 < 2 > 0 < 1 < 2 + 0 and -1 + 2 + 0 - 1 = 0^2.
a(7) = 1 since 7 = (-1)^2 + 2^2 + 1^2 + 1^2 with 1 < 2 > 1 = 1 < 2 + 1 and -1 + 2 + 1 - 1 = 1^2.
a(9) = 1 since 9 = 0^2 + 2^2 + 1^2 + 2^2 with 0 < 2 > 1 < 2 < 2 + 1 and 0 + 2 + 1 - 2 = 1^2.
a(11) = 1 since 11 = (-1)^2 + 3^2 + 0^2 + 1^2 with 1 < 3 > 0 < 1 < 3 + 0 and -1 + 3 + 0 - 1 = 1^2.
a(12) = 1 since 12 = 1^2 + 3^2 + 1^2 + 1^2 with 1 < 3 > 1 = 1 < 3 + 1 and 1 + 3 + 1 - 1 = 2^2.
a(17) = 1 since 17 = 0^2 + 2^2 + 2^2 + 3^2 with 0 < 2 = 2 < 3 < 2 + 2 and 0 + 2 + 2 - 3 = 1^2.
a(19) = 1 since 19 = 0^2 + 3^2 + 1^2 + 3^2 with 0 < 3 > 1 < 3 < 3 + 1 and 0 + 3 + 1 - 3 = 1^2.
a(23) = 1 since 23 = (-1)^2 + 3^2 + 2^2 + 3^2 with 1 < 3 > 2 < 3 < 3 + 2 and -1 + 3 + 2 - 3 = 1^2.
a(29) = 1 since 29 = 0^2 + 3^2 + 2^2 + 4^2 with 0 < 3 > 2 < 4 < 3 + 2 and 0 + 3 + 2 - 4 = 1^2.
a(31) = 1 since 31 = (-2)^2 + 3^2 + 3^2 + 3^2 with 2 < 3 = 3 = 3 < 3 + 3 and -2 + 3 + 3 - 3 = 1^2.
a(37) = 1 since 37 = (-1)^2 + 4^2 + 2^2 + 4^2 with 1 < 4 > 2 < 4 < 4 + 2 and -1 + 4 + 2 - 4 = 1^2.
a(92) = 1 since 92 = 3^2 + 5^2 + 3^2 + 7^2 with 3 < 5 > 3 < 7 < 5 + 3 and 3 + 5 + 3 - 7 = 2^2.
a(284) = 1 since 284 = 3^2 + 9^2 + 5^2 + 13^2 with 3 < 9 > 5 < 13 < 9 + 5 and 3 + 9 + 5 - 13 = 2^2.
a(572) = 1 since 572 = 3^2 + 11^2 + 9^2 + 19^2 with 3 < 11 > 9 < 19 < 11 + 9 and 3 + 11 + 9 - 19 = 2^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[Sqrt[n-x^2-y^2-z^2]<=x&&SQ[n-x^2-y^2-z^2]&&SQ[x+y-z+(-1)^k*Sqrt[n-x^2-y^2-z^2]],r=r+1],{y,0,Sqrt[n/3]},{x,y,Sqrt[n-y^2]},{z,y,Min[x+y-1,Sqrt[n-x^2-y^2]]},{k,0,Min[1,Sqrt[n-x^2-y^2-z^2]]}];Print[n," ",r];Continue,{n,1,80}]

Extensions

Rick L. Shepherd, May 27 2016: I checked all the statements in each example.

A004011 Theta series of D_4 lattice; Fourier coefficients of Eisenstein series E_{gamma,2}.

Original entry on oeis.org

1, 24, 24, 96, 24, 144, 96, 192, 24, 312, 144, 288, 96, 336, 192, 576, 24, 432, 312, 480, 144, 768, 288, 576, 96, 744, 336, 960, 192, 720, 576, 768, 24, 1152, 432, 1152, 312, 912, 480, 1344, 144, 1008, 768, 1056, 288, 1872, 576, 1152, 96, 1368, 744, 1728, 336
Offset: 0

Views

Author

Keywords

Comments

D_4 is also the Barnes-Wall lattice in 4 dimensions.
E_{gamma,2} is the unique normalized modular form for Gamma_0(2) of weight 2.
Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).
Ramanujan's Eisenstein series: P(q) (see A006352), Q(q) (A004009), R(q) (A013973).
Convolution square is A008658. - Michael Somos, Aug 21 2014
Expansion of 2*P(x^2) - P(x) in powers of x where P() is a Ramanujan Eisenstein series. - Michael Somos, Feb 16 2015
a(n) is the number of Hurwitz quaternions of norm n. - Michael Somos, Feb 16 2015

Examples

			G.f. = 1 + 24*x + 24*x^2 + 96*x^3 + 24*x^4 + 144*x^5 + 96*x^6 + 192*x^7 + 24*x^8 + ...
G.f. = 1 + 24*q^2 + 24*q^4 + 96*q^6 + 24*q^8 + 144*q^10 + 96*q^12 + 192*q^14 + 24*q^16 + ...
		

References

  • Bruce C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, 1998, see p. 148 Eq. (9.11).
  • Harvey Cohn, Advanced Number Theory, Dover Publications, Inc., 1980, p. 89. Eq. (1).
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 119.
  • S. Ramanujan, Notebooks, Tata Institute of Fundamental Research, Bombay 1957 Vol. 1, see page 214.
  • N. J. A. Sloane, Seven Staggering Sequences, in Homage to a Pied Puzzler, E. Pegg Jr., A. H. Schoen and T. Rodgers (editors), A. K. Peters, Wellesley, MA, 2009, pp. 93-110.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums give A046949.
Cf. A108092 (convolution fourth root).

Programs

  • Magma
    Basis( ModularForms( Gamma0(2), 2), 54) [1]; /* Michael Somos, May 27 2014 */
    
  • Maple
    readlib(ifactors): with(numtheory): for n from 1 to 100 do if n mod 2 = 0 then m := n/ifactors(n)[2][1][1]^ifactors(n)[2][1][2] else m := n fi: printf(`%d,`,24*sigma(m)) od: # James Sellers, Dec 07 2000
  • Mathematica
    a[ n_] := If[ n < 0, 0, With[ {m = Floor @ Sqrt[4 n]}, SeriesCoefficient[ Sum[ q^( x^2 + y^2 + z^2 + t^2 + (x + y + z) t ), {x, -m, m}, {y, -m, m}, {z, -m, m}, {t, -m, m}] + O[q]^(n + 1), n]]]; (* Michael Somos, Jan 11 2011 *)
    a[n_] := 24*Total[ Select[ Divisors[n], OddQ]]; a[0]=1; Table[a[n], {n, 0, 52}] (* Jean-François Alcover, Sep 12 2012 *)
    a[ n_] := With[{m = InverseEllipticNomeQ @q}, SeriesCoefficient[ (1 + m) (EllipticK[ m] / (Pi/2))^2, {q, 0, n}]]; (* Michael Somos, Jun 04 2013 *)
    a[ n_] := With[{m = InverseEllipticNomeQ @q}, SeriesCoefficient[ (1 - m/2) (EllipticK[ m] / (Pi/2))^2, {q, 0, 2 n}]]; (* Michael Somos, Jun 04 2013 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^4 + EllipticTheta[ 2, 0, q]^4, {q, 0, n}]; (* Michael Somos, Jun 04 2013 *)
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q]^4 + EllipticTheta[ 4, 0, q]^4) / 2, {q, 0, 2 n}]; (* Michael Somos, Jun 04 2013 *)
  • PARI
    {a(n) = if( n<1, n==0, 24 * sumdiv( n, d, d%2 * d))}; /* Michael Somos, Apr 17 2000 */
    
  • PARI
    {a(n) = my(G); if( n<0, 0, G = [2, 1, 1, 1; 1, 2, 0, 0; 1, 0, 2, 0; 1, 0, 0, 2]; polcoeff( 1 + 2 * x * Ser(qfrep( G, n, 1)), n))}; /* Michael Somos, Sep 11 2007 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^20 / (eta(x + A) * eta(x^4 + A))^8 + 16 * x * eta(x^4 + A)^8 / eta(x^2 + A)^4, n))}; /* Michael Somos, Oct 21 2017 */
    
  • Python
    from sympy import divisors
    def a(n): return 1 if n==0 else 24*sum(d for d in divisors(n) if d%2)
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 24 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A004011(n): return 24*prod((p**(e+1)-1)//(p-1) for p, e in factorint(n).items() if p > 2) if n else 1 # Chai Wah Wu, Nov 13 2022
  • Sage
    ModularForms( Gamma0(2), 2, prec=54).0; # Michael Somos, Jun 04 2013
    

Formula

a(0) = 1; if n>0 then a(n) = 24 (Sum_{d|n, d odd, d>0} d) = 24 * A000593(n).
G.f.: 1 + 24 Sum_{n>0} n x^n /(1 + x^n). a(n) = A000118(2*n) = A096727(2*n).
G.f.: (1/2) * (theta_3(z)^4 + theta_4(z)^4) = theta_3(2z)^4 + theta_2(2z)^4 = Sum_{k>=0} a(k) * x^(2*k).
G.f.: Sum_{a, b, c, d in Z} x^(a^2 + b^2 + c^2 + d^2 + a*d + b*d + c*d). - Michael Somos, Jan 11 2011
Expansion of (1 + k^2) * K(k^2)^2 / (Pi/2)^2 in powers of nome q. - Michael Somos, Jun 10 2006
Expansion of (1 - k^2/2) * K(k^2)^2 / (Pi/2)^2 in powers of nome q^2. - Michael Somos, Mar 14 2012
Expansion of b(x) * b(x^2) + 3 * c(x) * c(x^2) in powers of x where b(), c() are cubic AGM theta functions. - Michael Somos, Jan 11 2011
Expansion of b(x) * b(x^2) + c(x) * c(x^2) / 3 in powers of x^3 where b(), c() are cubic AGM theta functions. - Michael Somos, Mar 14 2012
G.f. is a period 1 Fourier series which satisfies f(-1 / (2 t)) = 2 (t/i)^2 f(t) where q = exp(2 Pi i t). - Michael Somos, Sep 11 2007
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - 2*u*v - 7*v^2 - 8*v*w + 16*w^2. - Michael Somos, May 29 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u1^2 + 4*u2^2 + 9*u3^2 + 36*u6^2 - 2*u1*u2 - 10*u1*u3 + 10*u1*u6 + 10*u2*u3 - 40*u2*u6 - 18*u3*u6. - Michael Somos, Sep 11 2007
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2 = 9.869604... (A002388). - Amiram Eldar, Dec 29 2023

Extensions

Additional comments from Barry Brent (barryb(AT)primenet.com)

A261876 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (5*x^2+7*y^2+9*z^2)*y*z a square, where x,y,z,w are nonnegative integers with z > 0.

Original entry on oeis.org

1, 3, 2, 1, 4, 5, 1, 3, 5, 5, 4, 2, 4, 7, 2, 1, 9, 9, 4, 4, 7, 5, 1, 5, 6, 12, 7, 1, 10, 9, 2, 3, 10, 9, 7, 5, 4, 11, 3, 5, 14, 10, 4, 4, 10, 9, 3, 2, 8, 17, 10, 4, 11, 18, 6, 7, 9, 6, 11, 2, 10, 15, 4, 1, 15, 17, 4, 9, 13, 10
Offset: 1

Views

Author

Zhi-Wei Sun, May 01 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m (k = 0,1,2,... and m = 1, 7, 23, 647, 863).
(ii) For each triple (a,b,c) = (1,8,20), (3,5,15), (6,14,4), (7,29,5), (18,38,18), (39,81,51), (42,98,14), any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x*y*(a*x^2+b*y^2+c*z^2) is a square.
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.

Examples

			a(4) = 1 since 4 = 0^2 + 0^2 + 2^2 + 0^2 with 2 > 0 and (5*0^2+7*0^2+9*2^2)*0*2 = 0^2.
a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 1 > 0 and (5*2^2+7*1^2+9*1^2)*1*1 = 6^2.
a(23) = 1 since 23 = 2^2 + 1^2 + 3^2 + 3^2 with 3 > 0 and (5*2^2+7*1^2+9*3^2)*1*3 = 18^2.
a(647) = 1 since 647 = 13^2 + 1^2 + 6^2 + 21^2 with 6 > 0 and (5*13^2+7*1^2+9*6^2)*1*6 = 84^2.
a(863) = 1 since 863 = 1^2 + 23^2 + 18^2 + 3^2 with 18 > 0 and (5*1^2+7*23^2+9*18^2)*23*18 = 1656^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[y*z(5x^2+7y^2+9z^2)],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,1,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,70}]

A267121 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x*y*z*(x+9*y+11*z+10*w) a square, where x is a positive integer and y,z,w are nonnegative integers.

Original entry on oeis.org

1, 3, 2, 1, 6, 7, 1, 3, 7, 7, 6, 2, 6, 12, 1, 1, 12, 10, 7, 6, 13, 7, 2, 7, 8, 19, 8, 1, 18, 12, 2, 3, 14, 15, 13, 7, 7, 18, 1, 7, 25, 14, 6, 6, 19, 13, 2, 2, 14, 22, 12, 6, 18, 27, 4, 12, 13, 9, 19, 1, 18, 25, 5, 1, 24, 26, 6, 12, 26, 14, 2, 10, 16, 31, 16, 7, 24, 13, 4, 6
Offset: 1

Views

Author

Zhi-Wei Sun, May 01 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m (k = 0,1,2,... and m = 1, 7, 15, 39, 119, 127, 159, 239, 359, 391, 527, 543, 863, 5791).
(ii) Any positive integer can be written as x^2 + y^2 + z^2 + w^2 with 2*x*y*(x+2y+z+2w) (or 2*x*y*(x+6y+z+2w), or x*y*(x+11y+z+2w)) a square, where x,y,z,w are nonnegative integers with z > 0 (or w > 0).
(iii) Any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers such that w*(a*w+b*x+c*y+d*z) is a square, provided that (a,b,c,d) is among the following quadruples (1,1,2,3), (1,1,4,5), (1,1,6,9), (1,2,6,34), (1,3,6,m) (m = 12, 21, 27, 36), (1,3,9,18), (1,3,9,36), (1,3,18,27), (1,3,24,117), (1,3,90,99), (1,6,6,18), (1,6,6,30), (1,8,16,24).
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.

Examples

			a(4) = 1 since 4 = 2^2 + 0^2 + 0^2 + 0^2 with 2 > 0 and 2*0*0*(2+9*0+11*0+10*0) = 0^2.
a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 2 > 0 and 2*1*1*(2+9*1+11*1+10*1) = 8^2.
a(15) = 1 since 15 = 2^2 + 1^2 + 3^2 + 1^2 with 2 > 0 and 2*1*3*(2+9*1+11*3+10*1) = 18^2.
a(39) = 1 since 39 = 1^2 + 1^2 + 1^2 + 6^2 with 1 > 0 and 1*1*1*(1+9*1+11*1+10*6) = 9^2.
a(119) = 1 since 119 = 1^2 + 1^2 + 9^2 + 6^2 with 1 > 0 and 1*1*9*(1+9*1+11*9+10*6) = 39^2.
a(127) = 1 since 127 = 5^2 + 1^2 + 1^2 + 10^2 with 5 > 0 and 5*1*1*(5+9*1+11*1+10*10) = 25^2.
a(159) = 1 since 159 = 3^2 + 1^2 + 7^2 + 10^2 with 3 > 0 and 3*1*7*(3+9*1+11*7+10*10) = 63^2.
a(239) = 1 since 239 = 3^2 + 3^2 + 10^2 + 11^2 with 3 > 0 and 3*3*10*(3+9*3+11*10+10*11) = 150^2.
a(359) = 1 since 359 = 9^2 + 11^2 + 11^2 + 6^2 with 9 > 0 and 9*11*11*(9+9*11+11*11+10*6) = 561^2.
a(391) = 1 since 391 = 19^2 + 5^2 + 1^2 + 2^2 with 19 > 0 and 19*5*1*(19+9*5+11*1+10*2) = 95^2.
a(527) = 1 since 527 = 21^2 + 6^2 + 7^2 + 1^2 with 21 > 0 and 21*6*7*(21+9*6+11*7+10*1) = 378^2.
a(543) = 1 since 543 = 15^2 + 13^2 + 10^2 + 7^2 with 15 > 0 and 15*13*10*(15+9*13+11*10+10*7) = 780^2.
a(863) = 1 since 863 = 9^2 + 9^2 + 5^2 + 26^2 with 9 > 0 and 9*9*5*(9+9*9+11*5+10*26) = 405^2.
a(5791) = 1 since 5791 = 57^2 + 38^2 + 33^2 + 3^2 with 57 > 0 and 57*38*33*(57+9*38+11*33+10*3) = 7524^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[x*y*z(x+9y+11z+10*Sqrt[n-x^2-y^2-z^2])],r=r+1],{x,1,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A000143 Number of ways of writing n as a sum of 8 squares.

Original entry on oeis.org

1, 16, 112, 448, 1136, 2016, 3136, 5504, 9328, 12112, 14112, 21312, 31808, 35168, 38528, 56448, 74864, 78624, 84784, 109760, 143136, 154112, 149184, 194688, 261184, 252016, 246176, 327040, 390784, 390240, 395136, 476672, 599152, 596736, 550368, 693504, 859952
Offset: 0

Views

Author

Keywords

Comments

The relevant identity for the o.g.f. is theta_3(x)^8 = 1 + 16*Sum_{j >= 1} j^3*x^j/(1 - (-1)^j*x^j). See the Hardy-Wright reference, p. 315. - Wolfdieter Lang, Dec 08 2016

Examples

			1 + 16*q + 112*q^2 + 448*q^3 + 1136*q^4 + 2016*q^5 + 3136*q^6 + 5504*q^7 + ...
		

References

  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 77, Eq. (31.61); p. 79 Eq. (32.32).
  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 121.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, pp. 314 - 315.

Crossrefs

8th column of A286815. - Seiichi Manyama, May 27 2017
Row d=8 of A122141.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cf. A004018, A000118, A000141 for the expansion of the powers of 2, 4, 6 of theta_3(x).

Programs

  • Julia
    # JacobiTheta3 is defined in A000122.
    A000143List(len) = JacobiTheta3(len, 8)
    A000143List(37) |> println # Peter Luschny, Mar 12 2018
    
  • Maple
    (sum(x^(m^2),m=-10..10))^8;
    with(numtheory); rJ := n-> if n=0 then 1 else 16*add((-1)^(n+d)*d^3, d in divisors(n)); fi; [seq(rJ(n),n=0..100)]; # N. J. A. Sloane, Sep 15 2018
  • Mathematica
    Table[SquaresR[8, n], {n, 0, 33}] (* Ray Chandler, Dec 06 2006 *)
    SquaresR[8,Range[0,50]] (* Harvey P. Dale, Aug 26 2011 *)
    QP = QPochhammer; s = (QP[q^2]^5/(QP[q]*QP[q^4])^2)^8 + O[q]^40; CoefficientList[s, q] (* Jean-François Alcover, Dec 01 2015, adapted from PARI *)
  • PARI
    {a(n) = if( n<1, n==0, 16 * (-1)^n * sumdiv( n, d, (-1)^d * d^3))}
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^5 / (eta(x + A) * eta(x^4 + A))^2)^8, n))} /* Michael Somos, Sep 25 2005 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A000143(n): return prod((p**(3*(e+1))-(1 if p&1 else 15))//(p**3-1) for p, e in factorint(n).items())<<4 if n else 1 # Chai Wah Wu, Jun 21 2024
  • SageMath
    Q = DiagonalQuadraticForm(ZZ, [1]*8)
    Q.representation_number_list(60) # Peter Luschny, Jun 20 2014
    

Formula

Expansion of theta_3(z)^8. Also a(n)=16*(-1)^n*Sum_{0
Expansion of phi(q)^8 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Mar 21 2008
Expansion of (eta(q^2)^5 / (eta(q) * eta(q^4))^2)^8 in powers of q. - Michael Somos, Sep 25 2005
G.f.: s(2)^40/(s(1)*s(4))^16, where s(k) := subs(q=q^k, eta(q)) and eta(q) is Dedekind's function, cf. A010815. [Fine]
Euler transform of period 4 sequence [16, -24, 16, -8, ...]. - Michael Somos, Apr 10 2005
a(n) = 16 * b(n) and b(n) is multiplicative with b(p^e) = (p^(3*e+3) - 1) / (p^3 - 1) -2[p<3]. - Michael Somos, Sep 25 2005
G.f.: 1 + 16 * Sum_{k>0} k^3 * x^k / (1 - (-x)^k). - Michael Somos, Sep 25 2005
A035016(n) = (-1)^n * a(n). 16 * A008457(n) = a(n) unless n=0.
Dirichlet g.f.: Sum_{n>=1} a(n)/n^s = 16*(1 - 2^(1-s) + 4^(2-s))*zeta(s)*zeta(s-3). [Borwein and Choi], R. J. Mathar, Jul 02 2012
a(n) = (16/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
Sum_{k=1..n} a(k) ~ Pi^4 * n^4 /24. - Vaclav Kotesovec, Jul 12 2024

A097057 Number of integer solutions to a^2 + b^2 + 2*c^2 + 2*d^2 = n.

Original entry on oeis.org

1, 4, 8, 16, 24, 24, 32, 32, 24, 52, 48, 48, 96, 56, 64, 96, 24, 72, 104, 80, 144, 128, 96, 96, 96, 124, 112, 160, 192, 120, 192, 128, 24, 192, 144, 192, 312, 152, 160, 224, 144, 168, 256, 176, 288, 312, 192, 192, 96, 228, 248, 288, 336, 216, 320, 288, 192, 320, 240, 240
Offset: 0

Author

N. J. A. Sloane, Sep 15 2004

Keywords

Comments

a^2 + b^2 + 2*c^2 + 2*d^2 is another (cf. A000118) of Ramanujan's 54 universal quaternary quadratic forms. - Michael Somos, Apr 01 2008

Examples

			1 + 4*q + 8*q^2 + 16*q^3 + 24*q^4 + 24*q^5 + 32*q^6 + 32*q^7 + 24*q^8 + ...
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 373 Entry 31.
  • Jesse Ira Deutsch, Bumby's technique and a result of Liouville on a quadratic form, Integers 8 (2008), no. 2, A2, 20 pp. MR2438287 (2009g:11047).
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.29).
  • S. Ramanujan, Collected Papers, Chap. 20, Cambridge Univ. Press 1927 (Proceedings of the Camb. Phil. Soc., 19 (1917), 11-21).

Crossrefs

a^2 + b^2 + 2*c^2 + m*d^2 = n: this sequence (m=2), A320124 (m=3), A320125 (m=4), A320126 (m=5), A320127 (m=6), A320128 (m=7), A320130 (m=8), A320131 (m=9), A320132 (m=10), A320133 (m=11), A320134 (m=12), A320135 (m=13), A320136 (m=14).

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^2])^2, {q, 0, n}] (* Michael Somos, Jul 05 2011 *)
    f[p_, e_] := (p^(e+1)-1)/(p-1); f[2, 1] = 2; f[2, e_] := 6; a[0] = 1; a[1] = 4; a[n_] := 4 * Times @@ f @@@ FactorInteger[n]; Array[a, 100, 0] (* Amiram Eldar, Aug 22 2023 *)
  • PARI
    {a(n) = local(t); if( n<1, n>=0, t = 2^valuation( n, 2); 4 * sigma(n/t) * if( t>2, 6, t))} \\ Michael Somos, Sep 17 2004
    
  • PARI
    {a(n) = local(A = x * O(x^n)); polcoeff( (eta(x^2 + A) * eta(x^4 + A))^6 / (eta(x + A) * eta(x^8 + A))^4, n)} \\ Michael Somos, Sep 17 2004
    
  • PARI
    {a(n) = if( n<1, n==0, 2 * qfrep([ 1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 2, 0; 0, 0, 0, 2], n)[n])} \\ Michael Somos, Oct 29 2005
    
  • PARI
    A097057(n)=if(n,sigma(n>>n=valuation(n,2))*if(n>1,24,4<M. F. Hasler, May 07 2018

Formula

Euler transform of period 8 sequence [4, -2, 4, -8, 4, -2, 4, -4, ...]. - Michael Somos, Sep 17 2004
Multiplicative with a(n) = 4*b(n), b(2) = 2, b(2^e) = 6 if e > 1, b(p^e) = (p^(e+1) - 1) / (p - 1) if p > 2. - Michael Somos, Sep 17 2004
Expansion of (eta(q^2) * eta(q^4))^6 / (eta(q) * eta(q^8))^4 in powers of q.
G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 8 (t/i)^2 f(t) where q = exp(2 Pi i t). - Michael Somos, Jul 05 2011
G.f.: (theta_3(q) * theta_3(q^2))^2.
G.f.: Product_{k>0} ((1-x^(2k))(1-x^(4k)))^6/((1-x^k)(1-x^(8k)))^4.
G.f.: 1 + Sum_{k>0} 8 * x^(4*k) / (1 + x^(4*k))^2 + 4 * x^(2*k-1) / (1 - x^(2*k-1))^2 = 1 + Sum_{k>0} (2 + (-1)^k) * 4*k * x^(2*k) / (1 + x^(2*k)) + 4*(2*k - 1) * x^(2*k-1) / (1 - x^(2*k - 1)). - Michael Somos, Oct 22 2005
a(2*n) = A000118(n). a(2*n + 1) = 4 * A008438(n). a(4*n) = A004011(n). a(4*n + 1) = 4 * A112610(n). a(4*n + 2) = 8 * A008438(n). a(4*n + 3) = 16 * A097723(n). - Michael Somos, Jul 05 2011

Extensions

Added keyword mult and minor edits by M. F. Hasler, May 07 2018

A268197 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w*(25*w + 24*x + 48*y + 96*z) a square, where w is a positive integer and x,y,z are nonnegative integers.

Original entry on oeis.org

1, 2, 1, 1, 2, 2, 1, 2, 3, 2, 2, 3, 3, 3, 1, 1, 4, 5, 2, 2, 3, 4, 1, 2, 2, 4, 8, 3, 4, 4, 1, 2, 5, 1, 5, 4, 2, 7, 3, 2, 6, 7, 1, 4, 7, 7, 3, 3, 8, 5, 4, 5, 6, 6, 1, 3, 8, 3, 6, 3, 2, 8, 5, 1, 5, 6, 5, 7, 6, 6
Offset: 1

Author

Zhi-Wei Sun, May 04 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 3, 7, 15, 23, 43, 55, 463, 4^k*m (k = 0,1,2,... and m = 1, 31, 34).
(ii) For each triple (a,b,c) = (1,3,4), (2,3,4), (2,4,6), any positive integer can be written as w^2 + x^2 + y^2 + z^2 with w*(25*w + 24*(a*x+b*y+c*z)) a square, where w is a positive integer and x,y,z are nonnegative integers.
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.

Examples

			a(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1 > 0 and 1*(25*1 + 24*0 + 48*0 + 96*0) = 5^2.
a(2) = 2 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 1 > 0 and 1*(25*1 + 24*0 + 48*0 + 96*1) = 11^2, and also 2 = 1^2 + 1^2 + 0^2 + 0^2 with 1 > 0 and 1*(25*1 + 24*1 + 48*0 + 96*0) = 7^2.
a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 1 > 0 and 1*(25*1 + 24*0 + 48*1 + 96*1) = 13^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 > 0 and 1*(25*1 + 24*1 + 48*1 + 96*2) = 17^2.
a(15) = 1 since 15 = 1^2 + 3^2 + 2^2 + 1^2 with 1 > 0 and 1*(25*1 + 24*3 + 48*2 + 96*1) = 17^2.
a(23) = 1 since 23 = 3^2 + 2^2 + 3^2 + 1^2 with 3 > 0 and 3*(25*3 + 24*2 + 48*3 + 96*1) = 33^2.
a(31) = 1 since 31 = 1^2 + 1^2 + 2^2 + 5^2 with 1 > 0 and 1*(25*1 + 24*1 + 48*2 + 96*5) = 25^2.
a(34) = 1 since 34 = 1^2 + 1^2 + 4^2 + 4^2 with 1 > 0 and 1*(25*1 + 24*1 + 48*4 + 96*4) = 25^2.
a(43) = 1 since 43 = 3^2 + 3^2 + 3^2 + 4^2 with 3 > 0 and 3*(25*3 + 24*3 + 48*3 + 96*4) = 45^2.
a(55) = 1 since 55 = 3^2 + 1^2 + 6^2 + 3^2 with 3 > 0 and 3*(25*3 + 24*1 + 48*6 + 96*3) = 45^2.
a(463) = 1 since 463 = 3^2 + 18^2 + 11^2 + 3^2 with 3 > 0 and 3*(25*3 + 24*18 + 48*11 + 96*3) = 63^2.
		

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[25x^2+24x(y+2z+4*Sqrt[n-x^2-y^2-z^2])],r=r+1],{x,1,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,70}]

A270073 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x*y + 2*z*w a square, where x,y,z are nonnegative integers and w is an integer with x <= y and z >= |w|.

Original entry on oeis.org

1, 2, 2, 1, 2, 3, 2, 2, 2, 4, 3, 1, 2, 3, 1, 1, 2, 4, 4, 2, 4, 4, 2, 1, 2, 5, 4, 3, 2, 3, 3, 2, 2, 4, 3, 1, 4, 4, 3, 4, 3, 4, 3, 1, 2, 7, 2, 3, 2, 4, 5, 2, 4, 4, 6, 4, 1, 3, 2, 2, 3, 6, 1, 4, 2, 8, 4, 1, 5, 7, 4, 3, 4, 7, 3, 4, 2, 3, 2, 1, 4
Offset: 0

Author

Zhi-Wei Sun, May 07 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 3, 11, 15, 23, 43, 67, 79, 155, 211, 331, 347, 403, 427, 659, 899, 1443, 1955, 2^k*m (k = 0,1,2,... and m = 14, 35, 62, 158, 382).
(ii) Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x*y + z*w/2 a square, where x,y,z are nonnegative integers and w is an integer with 2 | z*w and x <= y >= |w| <= z.
We have verified that a(n) > 0 for all n = 0,...,10^5.
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.

Examples

			a(3) = 1 since 3 = 1^2 + 1^2 + 1^2 + 0^2 with 1 = 1, 1 > 0 and 1*1 + 2*1*0 = 1^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 3^2 + 0^2 with 1 = 1, 3 > 0 and 1*1 + 2*3*0 = 1^2.
a(14) = 1 since 14 = 0^2 + 3^2 + 2^2 + 1^2 with 0 < 3, 2 > 1 and 0*3 + 2*2*1 = 2^2.
a(15) = 1 since 15 = 2^2 + 3^2 + 1^2 + (-1)^2 with 2 < 3, 1 = |-1| and 2*3 + 2*1*(-1) = 2^2.
a(23) = 1 since 23 = 2^2 + 3^2 + 3^2 + (-1)^2 with 2 < 3, 3 > |-1| and 2*3 + 2*3*(-1) = 0^2.
a(35) = 1 since 35 = 3^2 + 3^2 + 4^2 + (-1)^2 with 3 = 3, 4 > |-1| and 3*3 + 2*4*(-1) = 1^2.
a(43) = 1 since 43 = 3^2 + 3^2 + 5^2 + 0^2 with 3 = 3, 5 > 0 and 3*3 + 2*5*0 = 3^2.
a(62) = 1 since 62 = 3^2 + 4^2 + 6^2 + (-1)^2 with 3 < 4, 6 > |-1| and 3*4 + 2*6*(-1) = 0^2.
a(67) = 1 since 67 = 3^2 + 3^2 + 7^2 + 0^2 with 3 = 3, 7 > 0 and 3*3 + 2*7*0 = 3^2.
a(79) = 1 since 79 = 2^2 + 7^2 + 5^2 + (-1)^2 with 2 < 7, 5 > |-1| and 2*7 + 2*5*(-1) = 2^2.
a(155) = 1 since 155 = 3^2 + 11^2 + 4^2 + (-3)^2 with 3 < 11, 4 > |-3| and 3*11 + 2*4*(-3) = 3^2.
a(158) = 1 since 158 = 1^2 + 12^2 + 3^2 + (-2)^2 with 1 < 12, 3 > |-2| and 1*12 + 2*3*(-2) = 0^2.
a(211) = 1 since 211 = 9^2 + 9^2 + 7^2 + 0^2 with 9 = 9, 7 > 0 and 9*9 + 2*7*0 = 9^2.
a(331) = 1 since 331 = 9^2 + 9^2 + 13^2 + 0^2 with 9 = 9, 13 > 0 and 9*9 + 2*13*0 = 9^2.
a(347) = 1 since 347 = 13^2 + 13^2 + 3^2 + 0^2 with 13 = 13, 3 > 0 and 13*13 + 2*3*0 = 13^2.
a(382) = 1 since 382 = 5^2 + 16^2 + 10^2 + 1^2 with 5 < 16, 10 > 1 and 5*16 + 2*10*1 = 10^2.
a(403) = 1 since 403 = 13^2 + 13^2 + 7^2 + 4^2 with 13 = 13, 7 > 4 and 13*13 + 2*7*4 = 15^2.
a(427) = 1 since 427 = 11^2 + 11^2 + 13^2 + 4^2 with 11 = 11, 13 > 4 and 11*11 + 2*13*4 = 15^2.
a(659) = 1 since 659 = 17^2 + 17^2 + 9^2 + 0^2 with 17 = 17, 9 > 0 and 17*17 + 2*9*0 = 17^2.
a(899) = 1 since 899 = 7^2 + 15^2 + 24^2 + 7^2 with 7 < 15, 24 > 7 and 7*15 + 2*24*7 = 21^2.
a(1443) = 1 since 1443 = 7^2 + 31^2 + 17^2 + 12^2 with 7 < 31, 17 > 12 and 7*31 + 2*17*12 = 25^2.
a(1955) = 1 since 1955 = 19^2 + 27^2 + 28^2 + (-9)^2 with 19 < 27, 28 > |-9| and 19*27 + 2*28*(-9) = 3^2.
		

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&SQ[x*y+2*z*Sqrt[n-x^2-y^2-z^2]], r=r+1], {x, 0, Sqrt[n/2]}, {y, x, Sqrt[n-x^2]},{z, Ceiling[-Sqrt[(n-x^2-y^2)/2]], Sqrt[(n-x^2-y^2)/2]}]; Print[n, " ", r]; Continue, {n, 0, 80}]

Extensions

All statements in the examples checked by Rick L. Shepherd, May 27 2016
Previous Showing 41-50 of 199 results. Next