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.

Showing 1-9 of 9 results.

A005875 Theta series of simple cubic lattice; also number of ways of writing a nonnegative integer n as a sum of 3 squares (zero being allowed).

Original entry on oeis.org

1, 6, 12, 8, 6, 24, 24, 0, 12, 30, 24, 24, 8, 24, 48, 0, 6, 48, 36, 24, 24, 48, 24, 0, 24, 30, 72, 32, 0, 72, 48, 0, 12, 48, 48, 48, 30, 24, 72, 0, 24, 96, 48, 24, 24, 72, 48, 0, 8, 54, 84, 48, 24, 72, 96, 0, 48, 48, 24, 72, 0, 72, 96, 0, 6, 96, 96, 24, 48, 96, 48, 0, 36, 48, 120
Offset: 0

Views

Author

Keywords

Comments

Number of ordered triples (i, j, k) of integers such that n = i^2 + j^2 + k^2.
The Madelung Coulomb energy for alternating unit charges in the simple cubic lattice is Sum_{n>=1} (-1)^n*a(n)/sqrt(n) = -A085469. - R. J. Mathar, Apr 29 2006
a(A004215(k))=0 for k=1,2,3,... but no other elements of {a(n)} are zero. - Graeme McRae, Jan 15 2007

Examples

			Order and signs are taken into account: a(1) = 6 from 1 = (+-1)^2 + 0^2 + 0^2, a(2) = 12 from 2 = (+-1)^2 + (+-1)^2 + 0^2; a(3) = 8 from 3 = (+-1)^2 + (+-1)^2 + (+-1)^2, etc.
G.f. =  1 + 6*q + 12*q^2 + 8*q^3 + 6*q^4 + 24*q^5 + 24*q^6 + 12*q^8 + 30*q^9 + 24*q^10 + ...
		

References

  • H. Cohen, Number Theory, Vol. 1: Tools and Diophantine Equations, Springer-Verlag, 2007, p. 317.
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 107.
  • H. Davenport, The Higher Arithmetic. Cambridge Univ. Press, 7th ed., 1999, Chapter V.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 3, p. 109.
  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 54.
  • L. Kronecker, Crelle, Vol. LVII (1860), p. 248; Werke, Vol. IV, p. 188.
  • C. J. Moreno and S. S. Wagstaff, Jr., Sums of Squares of Integers, Chapman and Hall, 2006, p. 43.
  • T. Nagell, Introduction to Number Theory, Wiley, 1951, p. 194.
  • W. Sierpiński, 1925. Teorja Liczb. pp. 1-410 (p.61).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • H. J. S. Smith, Report on the Theory of Numbers, reprinted in Vol. 1 of his Collected Math. Papers, Chelsea, NY, 1979, see p. 338, Eq. (B').

Crossrefs

Row d=3 of A122141 and of A319574, 3rd column of A286815.
Cf. A074590 (primitive solutions), A117609 (partial sums), A004215 (positions of zeros).
Analog for 4 squares: A000118.
x^2+y^2+k*z^2: A005875, A014455, A034933, A169783, A169784.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Programs

  • Julia
    # JacobiTheta3 is defined in A000122.
    A005875List(len) = JacobiTheta3(len, 3)
    A005875List(75) |> println # Peter Luschny, Mar 12 2018
    
  • Magma
    Basis( ModularForms( Gamma1(4), 3/2), 75) [1]; /* Michael Somos, Jun 25 2014 */
    
  • Maple
    (sum(x^(m^2),m=-10..10))^3; seq(coeff(%,x,n), n=0..50);
    Alternative:
    A005875list := proc(len) series(JacobiTheta3(0, x)^3, x, len+1);
    seq(coeff(%, x, j), j=0..len-1) end: A005875list(75); # Peter Luschny, Oct 02 2018
  • Mathematica
    SquaresR[3,Range[0,80]] (* Harvey P. Dale, Jul 21 2011 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^3, {q, 0, n}]; (* Michael Somos, Jun 25 2014 *)
    a[ n_] := Length @ FindInstance[ n == x^2 + y^2 + z^2, {x, y, z}, Integers, 10^9]; (* Michael Somos, May 21 2015 *)
    QP = QPochhammer; CoefficientList[(QP[q^2]^5/(QP[q]*QP[q^4])^2)^3 + O[q]^80, q] (* Jean-François Alcover, Nov 24 2015 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum( k=1, sqrtint(n), 2 * x^k^2, 1 + x * O(x^n))^3, n))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^5 / (eta(x + A) * eta(x^4 + A))^2)^3, n))}; /* Michael Somos, Jun 03 2012 */
    
  • PARI
    {a(n) = my(G); if( n<0, 0, G = [ 1, 0, 0; 0, 1, 0; 0, 0, 1]; polcoeff( 1 + 2 * x * Ser( qfrep( G, n)), n))}; /* Michael Somos, May 21 2015 */
    
  • Python
    # uses Python code for A004018
    from math import isqrt
    def A005875(n): return A004018(n)+(sum(A004018(n-k**2) for k in range(1,isqrt(n)+1))<<1) # Chai Wah Wu, Jun 21 2024
  • Sage
    Q = DiagonalQuadraticForm(ZZ, [1]*3)
    Q.representation_number_list(75) # Peter Luschny, Jun 20 2014
    

Formula

A number n is representable as the sum of 3 squares iff n is not of the form 4^a (8k+7) (cf. A000378).
There is a classical formula (essentially due to Gauss):
For sums of 3 squares r_3(n): write (uniquely) -n=D(2^vf)^2, with D<0 fundamental discriminant, f odd, v>=-1. Then r_3(n) = 12L((D/.),0)(1-(D/2)) Sum_{d | f} mu(d)(D/d)sigma(f/d).
Here mu is the Moebius function, (D/2) and (D/d) are Kronecker-Legendre symbols, sigma is the sum of divisors function, L((D/.),0)=h(D)/(w(D)/2) is the value at 0 of the L function of the quadratic character (D/.), equal to the class number h(D) divided by 2 or 3 in the special cases D=-4 and -3. - Henri Cohen (Henri.Cohen(AT)math.u-bordeaux1.fr), May 12 2010
a(n) = 3*T(n) if n == 1,2,5,6 mod 8, = 2*T(n) if n == 3 mod 8, = 0 if n == 7 mod 8 and = a(n/4) if n == 0 mod 4, where T(n) = A117726(n). [Moreno-Wagstaff].
"If 12E(n) is the number of representations of n as a sum of three squares, then E(n) = 2F(n) - G(n) where G(n) = number of classes of determinant -n, F(n) = number of uneven classes." - Dickson, quoting Kronecker. [Cf. A117726.]
a(n) = Sum_{d^2|n} b(n/d^2), where b() = A074590() gives the number of primitive solutions.
Expansion of phi(q)^3 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Oct 25 2006.
Euler transform of period 4 sequence [ 6, -9, 6, -3, ...]. - Michael Somos, Oct 25 2006
G.f.: (Sum_{k in Z} x^(k^2))^3.
a(8*n + 7) = 0. a(4*n) = a(n).
a(n) = A004015(2*n) = A014455(2*n) = A004013(4*n) = A169783(4*n). a(4*n + 1) = 6 * A045834(n). a(8*n + 3) = 8 * A008443(n). a(8*n + 5) = 24 * A045831(n). - Michael Somos, Jun 03 2012
a(4*n + 2) = 12 * A045828(n). - Michael Somos, Sep 03 2014
a(n) = (-1)^n * A213384(n). - Michael Somos, May 21 2015
a(n) = (6/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
a(n) = A004018(n) + 2*Sum_{k=1..floor(sqrt(n))} A004018(n - k^2). - Daniel Suteu, Aug 27 2021
Convolution cube of A000122. Convolution of A004018 and A000122. - R. J. Mathar, Aug 03 2025

Extensions

More terms from James Sellers, Aug 22 2000

A025428 Number of partitions of n into 4 nonzero squares.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Records occur at n= 4, 28, 52, 82, 90, 130, 162, 198, 202, 210,.... - R. J. Mathar, Sep 15 2015

Crossrefs

Cf. A000414, A000534, A025357-A025375, A216374, A025416 (greedy inverse).
Column k=4 of A243148.

Programs

  • Maple
    A025428 := proc(n)
        local a,i,j,k,lsq ;
        a := 0 ;
        for i from 1 do
            if 4*i^2 > n then
                return a;
            end if;
            for j from i do
                if i^2+3*j^2 > n then
                    break;
                end if;
                for k from j do
                    if i^2+j^2+2*k^2 > n then
                        break;
                    end if;
                    lsq := n-i^2-j^2-k^2 ;
                    if lsq >= k^2 and issqr(lsq) then
                        a := a+1 ;
                    end if;
                end do:
            end do:
        end do:
    end proc:
    seq(A025428(n),n=1..40) ; # R. J. Mathar, Jun 15 2018
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
         `if`(i<1 or t<1, 0, b(n, i-1, t)+`if`(i^2>n, 0, b(n-i^2, i, t-1))))
        end:
    a:= n-> b(n, isqrt(n), 4):
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 14 2019
  • Mathematica
    nn = 100; lim = Sqrt[nn]; t = Table[0, {nn}]; Do[n = a^2 + b^2 + c^2 + d^2; If[n <= nn, t[[n]]++], {a, lim}, {b, a, lim}, {c, b, lim}, {d, c, lim}]; t (* T. D. Noe, Sep 28 2012 *)
    f[n_] := Length@ IntegerPartitions[n, {4}, Range[ Floor[ Sqrt[n - 1]]]^2]; Array[f, 105] (* Robert G. Wilson v, Sep 28 2012 *)
  • PARI
    A025428(n)=sum(a=1,n,sum(b=1,a,sum(c=1,b,sum(d=1,c,a^2+b^2+c^2+d^2==n))))
    
  • PARI
    A025428(n)=sum(a=1,sqrtint(max(n-3,0)), sum(b=1,min(sqrtint(n-a^2-2),a), sum(c=1,min(sqrtint(n-a^2-b^2-1),b),issquare(n-a^2-b^2-c^2,&d) & d <= c )))
    
  • PARI
    A025428(n)=sum(a=sqrtint(max(n,4)\4),sqrtint(max(n-3,0)), sum(b=sqrtint((n-a^2)\3-1)+1,min(sqrtint(n-a^2-2),a), sum(c=sqrtint((t=n-a^2-b^2)\2-1)+1, min(sqrtint(t-1),b), issquare(t-c^2) ))) \\ - M. F. Hasler, Sep 17 2012
    for(n=1,100,print1(A025428(n),","))
    
  • PARI
    T(n)={a=matrix(n,4,i,j,0);for(d=1,sqrtint(n),forstep(i=n,d*d+1,-1,for(j=2,4,a[i,j]+=sum(k=1,j,if(k0,a[i-k*d*d,j-k],if(k==j&&i-k*d*d==0,1)))));a[d*d,1]=1);for(i=1,n,print(i" "a[i,4]))} /* Robert Gerbicz, Sep 28 2012 */

Formula

For n>0, a(n) = ( A063730(n) + 6*A213024(n) + 3*A063725(n/2) + 8*A092573(n) + 6*A010052(n/4) ) / 24. - Max Alekseyev, Sep 30 2012
a(n) = ( A000118(n) - 4*A005875(n) - 6*A004018(n) - 12*A000122(n) - 15*A000007(n) + 12*A014455(n) - 24*A033715(n) - 12*A000122(n/2) + 12*A004018(n/2) + 32*A033716(n) - 32*A000122(n/3) + 48*A000122(n/4) ) / 384. - Max Alekseyev, Sep 30 2012
a(n) = [x^n y^4] Product_{k>=1} 1/(1 - y*x^(k^2)). - Ilya Gutkovskiy, Apr 19 2019
a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} A010052(i) * A010052(j) * A010052(k) * A010052(n-i-j-k). - Wesley Ivan Hurt, Apr 19 2019

Extensions

Values of a(0..10^4) double-checked by M. F. Hasler, Sep 17 2012

A072070 Number of integer solutions to the equation 4*x^2 + y^2 + 8*z^2 = n.

Original entry on oeis.org

1, 2, 0, 0, 4, 4, 0, 0, 6, 6, 0, 0, 8, 12, 0, 0, 12, 8, 0, 0, 8, 8, 0, 0, 8, 14, 0, 0, 16, 4, 0, 0, 6, 16, 0, 0, 12, 20, 0, 0, 24, 8, 0, 0, 8, 20, 0, 0, 24, 18, 0, 0, 24, 12, 0, 0, 0, 16, 0, 0, 16, 20, 0, 0, 12, 8, 0, 0, 16, 16, 0, 0, 30, 32, 0, 0, 24, 16, 0, 0, 24, 18, 0, 0, 16, 24, 0, 0, 24, 16
Offset: 0

Views

Author

T. D. Noe, Jun 13 2002

Keywords

Comments

Related to primitive congruent numbers A006991.
Assuming the Birch and Swinnerton-Dyer conjecture, the even number 2n is a congruent number if it is squarefree and a(n) = 2 A072071(n).
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			a(4) = 4 because (1, 0, 0), (-1, 0, 0), (0, 2, 0) and (0, -2, 0) are solutions.
G.f. = 1 + 2*q + 4*q^4 + 4*q^5 + 6*q^8 + 6*q^9 + 8*q^12 + 12*q^13 + 12*q^16 + 8*q^17 + ...
		

References

  • J. B. Tunnell, A classical Diophantine problem and modular forms of weight 3/2, Invent. Math., 72 (1983), 323-334.

Crossrefs

Programs

  • Mathematica
    maxN=128; soln3=Table[0, {maxN/2}]; xMax=Ceiling[Sqrt[maxN/8]]; yMax=Ceiling[Sqrt[maxN/2]]; zMax=Ceiling[Sqrt[maxN/16]]; Do[n=4x^2+y^2+8z^2; If[n>0&&n<=maxN/2, s=8; If[x==0, s=s/2]; If[y==0, s=s/2]; If[z==0, s=s/2]; soln3[[n]]+=s], {x, 0, xMax}, {y, 0, yMax}, {z, 0, zMax}]
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^4] EllipticTheta[ 3, 0, q^8], {q, 0, n}]; (* Michael Somos, Jul 23 2018 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A)^-2 * eta(x^2 + A)^5 * eta(x^4 + A)^-4 * eta(x^8 + A)^3 * eta(x^16 + A)^3 * eta(x^32 + A)^-2, n))}; /* Michael Somos, Feb 11 2003 */

Formula

Expansion of phi(q) * phi(q^4) * phi(q^8) in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Jun 09 2012
Euler transform of period 32 sequence [2, -3, 2, 1, 2, -3, 2, -2, 2, -3, 2, 1, 2, -3, 2, -5, 2, -3, 2, 1, 2, -3, 2, -2, 2, -3, 2, 1, 2, -3, 2, -3, ...]. - Michael Somos, Feb 11 2003
a(4*n + 2) = a(4*n + 3) = 0. a(4*n) = A014455(n). - Michael Somos, Jun 08 2012
G.f. is a period 1 Fourier series which satisfies f(-1 / (32 t)) = 2^(7/2) (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A080917. - Michael Somos, Jul 23 2018

A033717 Number of integer solutions to the equation x^2 + 2*y^2 + 4*z^2 = n.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 8, 8, 6, 6, 8, 4, 8, 12, 0, 8, 12, 8, 10, 12, 8, 8, 24, 8, 8, 14, 8, 16, 16, 4, 0, 16, 6, 16, 16, 8, 12, 20, 24, 8, 24, 8, 16, 20, 8, 20, 0, 16, 24, 18, 10, 8, 24, 12, 32, 24, 0, 16, 24, 12, 16, 20, 0, 24, 12, 8, 16, 28, 16, 16, 48, 8, 30, 32, 8, 20, 24, 16, 0, 16, 24, 18
Offset: 0

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + 2*q + 2*q^2 + 4*q^3 + 4*q^4 + 4*q^5 + 8*q^6 + 8*q^7 + 6*q^8 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p 102 eq 9.

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(16), 3/2), 82); A[1] + 2*A[2] + 2*A[3] + 4*A[4] + 4*A[5] + 4*A[6] + 8*A[7] + 8*A[8] + 6*A[9] + 8*A[10] + 4*A[11]; /* Michael Somos, Sep 03 2014 */
  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^2] EllipticTheta[ 3, 0, q^4], {q, 0, n}]; (* Michael Somos, Sep 03 2014 *)
  • PARI
    {a(n) = my(G); if( n<0, 0, G = [1, 0, 0; 0, 2, 0; 0, 0, 4]; polcoeff( 1 + 2 * x * Ser(qfrep( G, n)), n))}; /* Michael Somos, Sep 03 2014 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^3 * eta(x^4 + A) * eta(x^8 + A)^3 / (eta(x + A)^2 * eta(x^16 + A)^2), n))}; /* Michael Somos, Sep 03 2014 */
    

Formula

Expansion of phi(q) * phi(q^2) * phi(q^4) in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Sep 03 2014
Euler transform of period 16 sequence [2, -1, 2, -2, 2, -1, 2, -5, 2, -1, 2, -2, 2, -1, 2, -3, ...]. - Michael Somos, Sep 03 2014
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 8 (t/i)^(3/2) f(t) where q = exp(2 Pi i t). - Michael Somos, Sep 03 2014
a(2*n + 1) = 2 * A045828(n). a(4*n) = A014455(n). a(4*n + 1) = 2 * A213625(n). a(4*n + 2) = 2 * A246811(n). a(4*n + 3) = 4 * A213624(n). - Michael Somos, Sep 03 2014
a(8*n) = A005875(n). a(8*n + 1) = 2 * A213622(n). a(8*n + 2) = 2 * A045834(n). a(8*n + 7) = 8 * A033763(n). - Michael Somos, Sep 03 2014
a(16*n) = A004015(n). a(16*n + 2) = 2 * A213022(n). a(16*n + 6) = 8 *
A008443(n). a(16*n + 8) = 2 * A045826(n). a(16*n + 10) = 8 * A045831(n). a(16*n + 14) = 0. - Michael Somos, Sep 03 2014
G.f.: theta_3(q) * theta_3(q^2) * theta_3(q^4).

A169784 Number of solutions to a^2 + b^2 + 5*c^2 = n.

Original entry on oeis.org

1, 4, 4, 0, 4, 10, 8, 8, 4, 12, 24, 0, 0, 16, 8, 16, 4, 8, 20, 0, 10, 16, 24, 8, 8, 44, 8, 0, 8, 16, 40, 16, 4, 16, 24, 0, 12, 32, 8, 16, 24, 16, 16, 0, 0, 50, 40, 8, 0, 28, 44, 0, 16, 16, 32, 40, 8, 32, 40, 0, 16, 32, 16, 24, 4, 48, 16, 0, 8, 16, 80, 16, 20, 40, 24, 0, 0, 16, 32, 32, 10, 36
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2010

Keywords

Comments

a(n) = 0 for n of the form 4^i*(8*j+3), A055046. [Zak Seidov, May 12 2010]

Crossrefs

x^2+y^2+k*z^2: A005875, A014455, A034933, A169783.

Formula

G.f.: theta_3(q)^2*theta_3(q^5), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 01 2018

A156384 The number of solutions to x^2 + y^2 + 2*z^2 = n in nonnegative integers x,y,z.

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 2, 2, 2, 4, 4, 2, 4, 4, 0, 2, 3, 4, 6, 4, 4, 2, 4, 2, 2, 6, 4, 6, 6, 2, 0, 4, 2, 6, 8, 2, 7, 6, 4, 2, 4, 4, 6, 6, 4, 6, 0, 4, 4, 6, 6, 4, 10, 4, 6, 6, 0, 6, 10, 4, 6, 6, 0, 6, 3, 4, 8, 8, 8, 4, 6, 2, 6, 10, 4, 6, 10, 4, 0, 4, 4, 8, 14, 6, 6, 8, 4, 6, 4, 6, 10, 6, 6, 6, 0, 2, 2, 12, 8, 8
Offset: 0

Views

Author

R. H. Hardin Feb 09 2009

Keywords

Comments

Also, the number of 4X4 matrices composed of squares of integers, symmetric under 90 degree rotation, with all rows summing to n. Such matrices have the form:
z^2 x^2 y^2 z^2
y^2 z^2 z^2 x^2
x^2 z^2 z^2 y^2
z^2 y^2 x^2 z^2
with x^2 + y^2 + 2*z^2 = n.

Examples

			All matrices for n=9:
...0.0.9.0...0.9.0.0...4.0.1.4...4.1.0.4
...9.0.0.0...0.0.0.9...1.4.4.0...0.4.4.1
...0.0.0.9...9.0.0.0...0.4.4.1...1.4.4.0
...0.9.0.0...0.0.9.0...4.1.0.4...4.0.1.4
		

Crossrefs

Formula

a(n) = ( A014455(n) + 2*A033715(n) + A004018(n) + A000122(n/2) + 2*A000122(n) + A000007(n) )/8. - Max Alekseyev, Sep 29 2012
G.f.: (1 + theta_3(q))^2*(1 + theta_3(q^2))/8, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 01 2018

Extensions

More general definition from Max Alekseyev, Sep 29 2012

A169783 Number of solutions to a^2 + b^2 + 4*c^2 = n.

Original entry on oeis.org

1, 4, 4, 0, 6, 16, 8, 0, 12, 20, 8, 0, 8, 16, 16, 0, 6, 32, 12, 0, 24, 32, 8, 0, 24, 20, 24, 0, 0, 48, 16, 0, 12, 32, 16, 0, 30, 16, 24, 0, 24, 64, 16, 0, 24, 48, 16, 0, 8, 36, 28, 0, 24, 48, 32, 0, 48, 32, 8, 0, 0, 48, 32, 0, 6, 64, 32, 0, 48, 64, 16, 0, 36, 32, 40, 0, 24, 64, 16, 0, 24, 68
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2010

Keywords

Crossrefs

x^2+y^2+k*z^2: A005875, A014455, A034933, A169784.

Programs

  • Maple
    t0:=Array(0..10000,0); M:=15;
    for i from -M to M do for j from -M to M do for k from -M to M do
    t1:=i^2+j^2+4*k^2; t0[t1]:=t0[t1]+1; od: od: od:
    [seq(t0[i],i=0..100)];

Formula

G.f.: theta_3(q)^2*theta_3(q^4), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 01 2018

A213024 The number of solutions to x^2 + y^2 + 2*z^2 = n in positive integers x,y,z.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, 2, 2, 0, 2, 1, 0, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 6, 0, 0, 4, 0, 2, 4, 2, 3, 4, 2, 2, 2, 0, 6, 4, 2, 4, 0, 4, 2, 4, 2, 0, 8, 2, 2, 6, 0, 2, 8, 2, 6, 4, 0, 6, 1, 0, 4, 6, 4, 4, 6, 2, 2, 6, 2, 4, 8, 4, 0, 4, 2, 2, 10, 4, 6, 4, 2, 6, 2, 2, 8, 6, 6, 6, 0, 2, 0, 8, 6, 2, 9
Offset: 0

Views

Author

Max Alekseyev, Sep 29 2012

Keywords

Crossrefs

Programs

  • PARI
    N=166; x='x+O('x^N);
    T(x)=sum(k=1, 1+sqrtint(N), x^(k*k) );
    gf=T(x)^2 * T(x^2);
    v=Vec('a0 + gf );  v[1]=0;  v
    /* Joerg Arndt, Oct 01 2012 */

Formula

a(n) = ( A014455(n) - 2*A033715(n) - A004018(n) + A000122(n/2) + 2*A000122(n) - A000007(n) )/8.
G.f.: T(x)^2 * T(x^2) where T(x) = sum(k>=1, x^(k^2)). [Joerg Arndt, Oct 01 2012]

A246631 Number of integer solutions to x^2 + 2*y^2 + 2*z^2 = n.

Original entry on oeis.org

1, 2, 4, 8, 6, 8, 8, 0, 12, 10, 8, 24, 8, 8, 16, 0, 6, 16, 12, 24, 24, 16, 8, 0, 24, 10, 24, 32, 0, 24, 16, 0, 12, 16, 16, 48, 30, 8, 24, 0, 24, 32, 16, 24, 24, 24, 16, 0, 8, 18, 28, 48, 24, 24, 32, 0, 48, 16, 8, 72, 0, 24, 32, 0, 6, 32, 32, 24, 48, 32, 16, 0
Offset: 0

Views

Author

Michael Somos, Aug 31 2014

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + 2*q + 4*q^2 + 8*q^3 + 6*q^4 + 8*q^5 + 8*q^6 + 12*q^8 + 10*q^9 + ...
		

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma0(8), 3/2), 80); A[1] + 2*A[2];
  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^2]^2, {q, 0, n}];
  • PARI
    {a(n) = if( n<1, n==0, 2 * qfrep([ 1, 0, 0; 0, 2, 0; 0, 0, 2], n)[n])};
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) * eta(x^4 + A)^8 / (eta(x + A)^2 * eta(x^8 + A)^4), n))};
    

Formula

Theta series of quadratic form with Gram matrix [ 1, 0, 0; 0, 2, 0; 0, 0, 2 ].
Expansion of phi(q) * phi(q^2)^2 = phi(-q^4)^4 / phi(-q) in powers of q where phi() is a Ramanujan theta function.
Expansion of eta(q^2) * eta(q^4)^8 / (eta(q)^2 * eta(q^8)^4) in powers of q.
Euler transform of period 8 sequence [ 2, 1, 2, -7, 2, 1, 2, -3, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 4 (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A014455.
G.f.: theta_3(q) * theta_3(q^2)^2.
G.f.: Product{k>0} (1 - x^(2*k)) * (1 - x^(4*k))^8 / ((1 - x^k)^2 * (1 - x^(8*k))^4).
G.f.: Product{k>0} (1 + x^(2*k)) * (1 + x^k)^2 * (1 - x^(4*k))^3 / (1 + x^(4*k))^4.
a(n) = (-1)^floor((n+1) / 2) * A212885(n) = abs(A212885(n)).
a(n) = A033717(2*n). a(2*n) = A014455(n). a(2*n + 1) = 2 * A246811(n).
a(4*n) = A005875(n). a(4*n + 1) = 2 * A045834(n). a(4*n + 2) = 4 * A045828(n).
a(8*n) = A004015(n). a(8*n + 1) = 2 * A213022(n). a(8*n + 2) = 4 * A213625(n). a(8*n + 3) = 8 * A008443(n). a(8*n + 4) = 2 * A045826(n). a(8*n + 5) = 8 * A045831(n). a(8*n + 6) = 8 * A213624(n). a(8*n + 7) = 0.
Showing 1-9 of 9 results.