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-10 of 71 results. Next

A145377 a(n) = A002324(n) mod 2.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Mar 12 2009

Keywords

Crossrefs

Essentially same as A195198.

Programs

Formula

a(n) = A195198(n) for n >= 1.
a(n) = Sum_{ m: m^2|n } A154272(n/m^2). - Andrey Zabolotskiy, May 07 2018

Extensions

More terms from Antti Karttunen, Nov 05 2017

A344472 Record values in A002324.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 32, 36, 48, 64, 72, 96, 108, 128, 144, 160, 192, 216, 256, 288, 320, 384, 432, 512, 576, 640, 768, 864, 1024, 1152, 1280, 1536, 1728, 2048, 2304, 2560, 3072, 3456, 3840, 4096, 4608, 5120, 5184, 6144, 6912, 7680, 8192, 9216
Offset: 1

Views

Author

Jianing Song, May 20 2021

Keywords

Comments

Also numbers k such that A343771(m) > A343771(k) for all m > k.

Examples

			8 is a term because the circle with radius sqrt(1729) centered at the origin hits exactly 6*8 = 48 points in the A_2 lattice, and any circle with radius < sqrt(1729) centered at the origin hits fewer than 48 points.
		

Crossrefs

Records of Sum_{d|n} kronecker(m, d): this sequence (m=-3), A344470 (m=-4), A279542 (m=-6).

Programs

  • PARI
    my(v=list_A344473(10^15), rec=0); for(n=1, #v, if(numdiv(v[n])>rec, rec=numdiv(v[n]); print1(rec, ", "))) \\ see program for A344473

Formula

a(n) = A344471(n+1)/6.
a(n) = A000005(A230655(n+1)) = A002324(A230655(n+1)).

A109083 Convolution of A002324 and A010815.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jun 18 2005

Keywords

Comments

Ramanujan theta functions: f(q) := Prod_{k>=1} (1-(-q)^k) (see A121373), phi(q) := theta_3(q) := Sum_{k=-oo..oo} q^(k^2) (A000122), psi(q) := Sum_{k=0..oo} q^(k*(k+1)/2) (A010054), chi(q) := Prod_{k>=0} (1+q^(2k+1)) (A000700).

Examples

			G.f. satisfies 6*A(x^3) = eta(x)^3 - eta(x^3) + 3*x*eta(x^9)^3, where eta(x) = 1 + Sum_{n>=1} (-1)^n*[x^(n*(3*n-1)/2) + x^(n*(3*n+1)/2)] = 1 - x - x^2 + x^5 + x^7 - x^12 - x^15 + x^22 + x^26 +... and eta(x)^3 = 1 - 3*x + 5*x^3 - 7*x^6 + 9*x^10 +... + (-1)^n*(2*n+1)*x^(n*(n+1)/2) + ... is the Jacobi triple product identity.
		

Programs

  • Mathematica
    a:= CoefficientList[Series[Sum[(-1)^(n-1)*n*(x^(n*(3*n - 1)/2) - x^(n*(3*n + 1)/2)), {n,1,50}], {x,0,50}], x]; Drop[Table[a[[n]], {n, 1, 50}], 1] (* G. C. Greubel, May 09 2018 *)
  • PARI
    {a(n)=local(X=x+x*O(x^(3*n))); polcoeff((eta(X)^3-eta(X^3)+3*x*eta(X^9)^3)/6,3*n)}
    
  • PARI
    {a(n)= local(A); if(n<1, 0, A=x*O(x^n); polcoeff( eta(x+A)/ eta(x^3+A)* (eta(x+A)^3 -eta(x^3+A) +9*x* eta(x^9+A)^3)/6, n))} /* Michael Somos, Jun 11 2006 */

Formula

G.f.: A(x) = Sum_{n>=1} (-1)^(n-1)*n*[x^(n*(3*n-1)/2) - x^(n*(3*n+1)/2)] = x - x^2 - 2*x^5 + 2*x^7 + 3*x^12 - 3*x^15 - 4*x^22 + 4*x^26 + 5*x^35 - 5*x^40 - 6*x^51 + 6*x^57 +...
Expansion of f(-q)* (g(q)-1)/6 in powers of q where f(-q) = g.f. of A010815, g(q) = g.f. of A004016.
Expansion of (f(-q)/ f(-q^3))*(f(-q)^3 -f(-q^3) +9*q*f(-q^9)^3)/6 in powers of q where f() is a Ramanujan theta function. - Michael Somos, Jun 11 2006

A004016 Theta series of planar hexagonal lattice A_2.

Original entry on oeis.org

1, 6, 0, 6, 6, 0, 0, 12, 0, 6, 0, 0, 6, 12, 0, 0, 6, 0, 0, 12, 0, 12, 0, 0, 0, 6, 0, 6, 12, 0, 0, 12, 0, 0, 0, 0, 6, 12, 0, 12, 0, 0, 0, 12, 0, 0, 0, 0, 6, 18, 0, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 12, 0, 12, 6, 0, 0, 12, 0, 0, 0, 0, 0, 12, 0, 6, 12, 0, 0, 12, 0
Offset: 0

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
a(n) is the number of integer solutions to x^2 + x*y + y^2 = n (or equivalently x^2 - x*y + y^2 = n). - Michael Somos, Sep 20 2004
a(n) is the number of integer solutions to x^2 + y^2 + z^2 = 2*n where x + y + z = 0. - Michael Somos, Mar 12 2012
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cubic AGM theta functions: a(q) (the present sequence), b(q) (A005928), c(q) (A005882).
a(n) = 6*A002324(n) if n>0, and A002324 is multiplicative, thus a(1)*a(m*n) = a(n)*a(m) if n>0, m>0 are relatively prime. - Michael Somos, Mar 17 2019
The first occurrence of a(n)= 6, 12, 18, 24, ... (multiples of 6) is at n= 1, 7, 49, 91, 2401, 637, 117649, ... (see A002324). - R. J. Mathar, Sep 21 2024

Examples

			G.f. = 1 + 6*x + 6*x^3 + 6*x^4 + 12*x^7 + 6*x^9 + 6*x^12 + 12*x^13 + 6*x^16 + ...
Theta series of A_2 on the standard scale in which the minimal norm is 2:
1 + 6*q^2 + 6*q^6 + 6*q^8 + 12*q^14 + 6*q^18 + 6*q^24 + 12*q^26 + 6*q^32 + 12*q^38 + 12*q^42 + 6*q^50 + 6*q^54 + 12*q^56 + 12*q^62 + 6*q^72 + 12*q^74 + 12*q^78 + 12*q^86 + 6*q^96 + 18*q^98 + 12*q^104 + 12*q^114 + 12*q^122 + 12*q^126 + 6*q^128 + 12*q^134 + 12*q^146 + 6*q^150 + 12*q^152 + 12*q^158 + ...
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 171, Entry 28.
  • Harvey Cohn, Advanced Number Theory, Dover Publications, Inc., 1980, p. 89. Ex. 18.
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 111.
  • M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996; p. 236.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See also A035019.
Cf. A000007, A000122, A004015, A008444, A008445, A008446, A008447, A008448, A008449 (Theta series of lattices A_0, A_1, A_3, A_4, ...), A186706.

Programs

  • Magma
    Basis( ModularForms( Gamma1(3), 1), 81) [1]; /* Michael Somos, May 27 2014 */
    
  • Magma
    L := Lattice("A",2); A := ThetaSeries(L, 161); A; /* Michael Somos, Nov 13 2014 */
    
  • Maple
    A004016 := proc(n)
        local a,j ;
        a := A033716(n) ;
        for j from 0 to n/3 do
            a := a+A089800(n-1-3*j)*A089800(j) ;
        end do:
        a;
    end proc:
    seq(A004016(n),n=0..49) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    a[ n_] := If[ n < 1, Boole[ n == 0 ], 6 DivisorSum[ n, KroneckerSymbol[ #, 3] &]]; (* Michael Somos, Nov 08 2011 *)
    a[ n_] := SeriesCoefficient[ (QPochhammer[ q]^3 + 9 q QPochhammer[ q^9]^3) / QPochhammer[ q^3], {q, 0, n}]; (* Michael Somos, Nov 13 2014 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^3] + EllipticTheta[ 2, 0, q] EllipticTheta[ 2, 0, q^3], {q, 0, n}]; (* Michael Somos, Nov 13 2014 *)
    a[ n_] := Length @ FindInstance[ x^2 + x y + y^2 == n, {x, y}, Integers, 10^9]; (* Michael Somos, Sep 14 2015 *)
    terms = 81; f[q_] = LatticeData["A2", "ThetaSeriesFunction"][-I Log[q]/Pi]; s = Series[f[q], {q, 0, 2 terms}]; CoefficientList[s, q^2][[1 ;; terms]] (* Jean-François Alcover, Jul 04 2017 *)
  • PARI
    {a(n) = my(A, p, e); if( n<1, n==0, A = factor(n); 6 * prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==3, 1, p%3==1, e+1, 1-e%2)))}; /* Michael Somos, May 20 2005 */ /* Editor's note: this is the most efficient program */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 + 6 * sum( k=1,n, x^k / (1 + x^k + x^(2*k)), x * O(x^n)), n))}; /* Michael Somos, Oct 06 2003 */
    
  • PARI
    {a(n) = if( n<1, n==0, 6 * sumdiv( n,d, kronecker( d, 3)))}; /* Michael Somos, Mar 16 2005 */
    
  • PARI
    {a(n) = if( n<1, n==0, 6 * sumdiv( n,d, (d%3==1) - (d%3==2)))}; /* Michael Somos, May 20 2005 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, n*=3; A = x * O(x^n); polcoeff( (eta(x + A)^3  + 3 * x * eta(x^9 + A)^3) / eta(x^3 + A), n))}; /* Michael Somos, May 20 2005 */
    
  • PARI
    {a(n) = if( n<1, n==0, qfrep([ 2, 1; 1, 2], n, 1)[n] * 2)}; /* Michael Somos, Jul 16 2005 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 + 6 * sum( k=1, n, x^(3*k - 2) / (1 - x^(3*k - 2)) - x^(3*k - 1) / (1 - x^(3*k - 1)), x * O(x^n)), n))} /* Paul D. Hanna, Jul 03 2011 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A004016(n): return 6*prod(e+1 if p%3==1 else int(not e&1) for p, e in factorint(n).items() if p != 3) if n else 1 # Chai Wah Wu, Nov 17 2022
  • Sage
    ModularForms( Gamma1(3), 1, prec=81).0 ; # Michael Somos, Jun 04 2013
    

Formula

Expansion of a(q) in powers of q where a(q) is the first cubic AGM theta function.
Expansion of theta_3(q) * theta_3(q^3) + theta_2(q) * theta_2(q^3) in powers of q.
Expansion of phi(x) * phi(x^3) + 4 * x * psi(x^2) * psi(x^6) in powers of x where phi(), psi() are Ramanujan theta functions.
Expansion of (1 / Pi) integral_{0 .. Pi/2} theta_3(z, q)^3 + theta_4(z, q)^3 dz in powers of q^2. - Michael Somos, Jan 01 2012
Expansion of coefficient of x^0 in f(x * q, q / x)^3 in powers of q^2 where f(,) is Ramanujan's general theta function. - Michael Somos, Jan 01 2012
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - 3*v^2 - 2*u*w + 4*w^2. - Michael Somos, Jun 11 2004
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-u3) * (u3-u6) - (u2-u6)^2. - Michael Somos, May 20 2005
G.f. is a period 1 Fourier series which satisfies f(-1 / (3 t)) = 3^(1/2) (t/i) f(t) where q = exp(2 Pi i t). - Michael Somos, Sep 11 2007
G.f. A(x) satisfies A(x) + A(-x) = 2 * A(x^4), from Ramanujan.
G.f.: 1 + 6 * Sum_{k>0} x^k / (1 + x^k + x^(2*k)). - Michael Somos, Oct 06 2003
G.f.: Sum_( q^(n^2+n*m+m^2) ) where the sum (for n and m) extends over the integers. - Joerg Arndt, Jul 20 2011
G.f.: theta_3(q) * theta_3(q^3) + theta_2(q) * theta_2(q^3) = (eta(q^(1/3))^3 + 3 * eta(q^3)^3) / eta(q).
G.f.: 1 + 6*Sum_{n>=1} x^(3*n-2)/(1-x^(3*n-2)) - x^(3*n-1)/(1-x^(3*n-1)). - Paul D. Hanna, Jul 03 2011
a(3*n + 2) = 0, a(3*n) = a(n), a(3*n + 1) = 6 * A033687(n). - Michael Somos, Jul 16 2005
a(2*n + 1) = 6 * A033762(n), a(4*n + 2) = 0, a(4*n) = a(n), a(4*n + 1) = 6 * A112604(n), a(4*n + 3) = 6 * A112595(n). - Michael Somos, May 17 2013
a(n) = 6 * A002324(n) if n>0. a(n) = A005928(3*n).
Euler transform of A192733. - Michael Somos, Mar 12 2012
a(n) = (-1)^n * A180318(n). - Michael Somos, Sep 14 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2*Pi/sqrt(3) = 3.627598... (A186706). - Amiram Eldar, Oct 15 2022

A049347 Period 3: repeat [1, -1, 0].

Original entry on oeis.org

1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0
Offset: 0

Views

Author

Keywords

Comments

G.f. 1/cyclotomic(3, x) (the third cyclotomic polynomial).
Self-convolution yields (-1)^n*A099254(n). - R. J. Mathar, Apr 06 2008
Hankel transform of A099324. - Paul Barry, Aug 10 2009
A057083(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0..n. - Michael Somos, Apr 29 2012
a(n) appears, together with b(n) = A099837(n+3) in the formula 2*exp(2*Pi*n*I/3) = b(n) + a(n)*sqrt(3)*I, n >= 0, with I = sqrt(-1). See A164116 for the case N=5. - Wolfdieter Lang, Feb 27 2014
The binomial transform is 1, 0, -1, -1, 0, 1, 1, 0, -1, -1.. (see A010891). The inverse binom. transform is 1, -2, 3, -3, 0, 9, -27, 54, -81.. (see A057682). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 - x + x^3 - x^4 + x^6 - x^7 + x^9 - x^10 + x^12 - x^13 + x^15 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 175.

Crossrefs

Alternating row sums of A049310 (Chebyshev-S). [Wolfdieter Lang, Nov 04 2011]

Programs

Formula

G.f.: 1/(1+x+x^2).
a(n) = +1 if n mod 3 = 0, a(n) = -1 if n mod 3 = 1, else 0.
a(n) = S(n, -1) = U(n, -1/2) (Chebyshev's U(n, x) polynomials.)
a(n) = 2*sqrt(3)*cos(2*Pi*n/3 + Pi/6)/3. - Paul Barry, Mar 15 2004
a(n) = Sum_{k >= 0} (-1)^(n-k)*C(n-k, k).
Given g.f. A(x), then B(x) = x * A(x) satisfies 0 = f(B(x), B(x^2)) where f(u, v) = u^2 - v + 2*u*v. - Michael Somos, Oct 03 2006
Euler transform of length 3 sequence [-1, 0, 1]. - Michael Somos, Oct 03 2006
a(n) = b(n+1) where b(n) is multiplicative with b(3^e) = 0^e, b(p^e) = 1 if p == 1 (mod 3), b(p^e) = (-1)^e if p == 2 (mod 3). - Michael Somos, Oct 03 2006
From Michael Somos, Oct 03 2006: (Start)
G.f.: (1 - x) /(1 - x^3).
a(n) = -a(1-n) = -a(n-1) - a(n-2) = a(n-3). (End)
From Michael Somos, Apr 29 2012: (Start)
G.f.: 1 / (1 + x / ( 1 - x / (1 + x))).
a(n) = (-1)^n * A010892(n).
a(n) * n! = A194770(n+1).
Revert transform of A001006. Convolution inverse of A130716. MOBIUS transform of A002324. EULER transform is A111317. BIN1 transform of itself. STIRLING transform is A143818(n+2). (End)
a(-n) = A057078(n). a(n) = A106510(n+1) unless n=0. - Michael Somos, Oct 15 2008
G.f. A(x) = 1/(1+x+x^2) = Q(0); Q(k) = 1- x/(1 - x^2/(x^2 - 1 + x/(x - 1 + x^2/(x^2 - 1/Q(k+1))))); (continued fraction 3 kind, 5-step ). - Sergei N. Gladkovskii, Jun 19 2012
a(n) = -1 + floor(67/333*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = -1 + floor(19/26*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 03 2013
a(n) = ceiling((n-1)/3) - ceiling(n/3) + floor(n/3) - floor((n-1)/3). - Wesley Ivan Hurt, Dec 06 2013
a(n) = n + 1 - 3*floor((n+2)/3). - Mircea Merca, Feb 04 2014
a(n) = A102283(n+1) for all n in Z. - Michael Somos, Sep 24 2019
E.g.f.: exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Oct 26 2022

Extensions

Edited by Charles R Greathouse IV, Mar 23 2010

A002654 Number of ways of writing n as a sum of at most two nonzero squares, where order matters; also (number of divisors of n of form 4m+1) - (number of divisors of form 4m+3).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Glaisher calls this E(n) or E_0(n). - N. J. A. Sloane, Nov 24 2018
Number of sublattices of Z X Z of index n that are similar to Z X Z; number of (principal) ideals of Z[i] of norm n.
a(n) is also one fourth of the number of integer solutions of n = x^2 + y^2 (order and signs matter, and 0 (without signs) is allowed). a(n) = N(n)/4, with N(n) from p. 147 of the Niven-Zuckermann reference. See also Theorem 5.12, p. 150, which defines a (strongly) multiplicative function h(n) which coincides with A056594(n-1), n >= 1, and N(n)/4 = sum(h(d), d divides n). - Wolfdieter Lang, Apr 19 2013
a(2+8*N) = A008441(N) gives the number of ways of writing N as the sum of 2 (nonnegative) triangular numbers for N >= 0. - Wolfdieter Lang, Jan 12 2017
Coefficients of Dedekind zeta function for the quadratic number field of discriminant -4. See A002324 for formula and Maple code. - N. J. A. Sloane, Mar 22 2022

Examples

			4 = 2^2, so a(4) = 1; 5 = 1^2 + 2^2 = 2^2 + 1^2, so a(5) = 2.
x + x^2 + x^4 + 2*x^5 + x^8 + x^9 + 2*x^10 + 2*x^13 + x^16 + 2*x^17 + x^18 + ...
2 = (+1)^2 + (+1)^2 = (+1)^2 + (-1)^2  = (-1)^2 + (+1)^2 = (-1)^2 + (-1)^2. Hence there are 4 integer solutions, called N(2) in the Niven-Zuckerman reference, and a(2) = N(2)/4 = 1.  4 = 0^1 + (+2)^2 = (+2)^2 + 0^2 = 0^2 + (-2)^2 = (-2)^2 + 0^2. Hence N(4) = 4 and a(4) = N(4)/4 = 1. N(5) = 8, a(5) = 2. - _Wolfdieter Lang_, Apr 19 2013
		

References

  • J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 194.
  • George Chrystal, Algebra: An elementary text-book for the higher classes of secondary schools and for colleges, 6th ed., Chelsea Publishing Co., New York, 1959, Part II, p. 346 Exercise XXI(17). MR0121327 (22 #12066)
  • Emil Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 15.
  • Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers, New York: John Wiley, 1980, pp. 147 and 150.
  • Günter Scheja and Uwe Storch, Lehrbuch der Algebra, Tuebner, 1988, p. 251.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 89.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 340.

Crossrefs

Equals 1/4 of A004018. Partial sums give A014200.
Cf. A002175, A008441, A121444, A122856, A122865, A022544, A143574, A000265, A027748, A124010, A025426 (two squares, order does not matter), A120630 (Dirichlet inverse), A101455 (Mobius transform), A000089, A241011.
If one simply reads the table in Glaisher, PLMS 1884, which omits the zero entries, one gets A213408.
Dedekind zeta functions for imaginary quadratic number fields of discriminants -3, -4, -7, -8, -11, -15, -19, -20 are A002324, A002654, A035182, A002325, A035179, A035175, A035171, A035170, respectively.
Dedekind zeta functions for real quadratic number fields of discriminants 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 40 are A035187, A035185, A035194, A035195, A035199, A035203, A035188, A035210, A035211, A035215, A035219, A035192, respectively.

Programs

  • Haskell
    a002654 n = product $ zipWith f (a027748_row m) (a124010_row m) where
       f p e | p `mod` 4 == 1 = e + 1
             | otherwise      = (e + 1) `mod` 2
       m = a000265 n
    -- Reinhard Zumkeller, Mar 18 2013
    
  • Maple
    with(numtheory):
    A002654 := proc(n)
        local count1, count3, d;
        count1 := 0:
        count3 := 0:
        for d in numtheory[divisors](n) do
            if d mod 4 = 1 then
                count1 := count1+1
            elif d mod 4 = 3 then
                count3 := count3+1
            fi:
        end do:
        count1-count3;
    end proc:
    # second Maple program:
    a:= n-> add(`if`(d::odd, (-1)^((d-1)/2), 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 04 2020
  • Mathematica
    a[n_] := Count[Divisors[n], d_ /; Mod[d, 4] == 1] - Count[Divisors[n], d_ /; Mod[d, 4] == 3]; a/@Range[105] (* Jean-François Alcover, Apr 06 2011, after R. J. Mathar *)
    QP = QPochhammer; CoefficientList[(1/q)*(QP[q^2]^10/(QP[q]*QP[q^4])^4-1)/4 + O[q]^100, q] (* Jean-François Alcover, Nov 24 2015 *)
    f[2, e_] := 1; f[p_, e_] := If[Mod[p, 4] == 1, e + 1, Mod[e + 1, 2]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
    Rest[CoefficientList[Series[EllipticTheta[3, 0, q]^2/4, {q, 0, 100}], q]] (* Vaclav Kotesovec, Mar 10 2023 *)
  • PARI
    direuler(p=2,101,1/(1-X)/(1-kronecker(-4,p)*X))
    
  • PARI
    {a(n) = polcoeff( sum(k=1, n, x^k / (1 + x^(2*k)), x * O(x^n)), n)}
    
  • PARI
    {a(n) = sumdiv( n, d, (d%4==1) - (d%4==3))}
    
  • PARI
    {a(n) = local(A); A = x * O(x^n); polcoeff( eta(x^2 + A)^10 / (eta(x + A) * eta(x^4 + A))^4 / 4, n)} \\ Michael Somos, Jun 03 2005
    
  • PARI
    a(n)=my(f=factor(n>>valuation(n,2))); prod(i=1,#f~, if(f[i,1]%4==1, f[i,2]+1, (f[i,2]+1)%2)) \\ Charles R Greathouse IV, Sep 09 2014
    
  • PARI
    my(B=bnfinit(x^2+1)); vector(100,n,#bnfisintnorm(B,n)) \\ Joerg Arndt, Jun 01 2024
    
  • Python
    from math import prod
    from sympy import factorint
    def A002654(n): return prod(1 if p == 2 else (e+1 if p % 4 == 1 else (e+1) % 2) for p, e in factorint(n).items()) # Chai Wah Wu, May 09 2022

Formula

Dirichlet series: (1-2^(-s))^(-1)*Product (1-p^(-s))^(-2) (p=1 mod 4) * Product (1-p^(-2s))^(-1) (p=3 mod 4) = Dedekind zeta-function of Z[ i ].
Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m, p)+1)*p^(-s)+Kronecker(m, p)*p^(-2s))^(-1) for m = -16.
If n=2^k*u*v, where u is product of primes 4m+1, v is product of primes 4m+3, then a(n)=0 unless v is a square, in which case a(n) = number of divisors of u (Jacobi).
Multiplicative with a(p^e) = 1 if p = 2; e+1 if p == 1 (mod 4); (e+1) mod 2 if p == 3 (mod 4). - David W. Wilson, Sep 01 2001
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = (u - v)^2 - (v - w) * (4*w + 1). - Michael Somos, Jul 19 2004
G.f.: Sum_{n>=1} ((-1)^floor(n/2)*x^((n^2+n)/2)/(1+(-x)^n)). - Vladeta Jovovic, Sep 15 2004
Expansion of (eta(q^2)^10 / (eta(q) * eta(q^4))^4 - 1)/4 in powers of q.
G.f.: Sum_{k>0} x^k / (1 + x^(2*k)) = Sum_{k>0} -(-1)^k * x^(2*k - 1) / (1 - x^(2*k - 1)). - Michael Somos, Aug 17 2005
a(4*n + 3) = a(9*n + 3) = a(9*n + 6) = 0. a(9*n) = a(2*n) = a(n). - Michael Somos, Nov 01 2006
a(4*n + 1) = A008441(n). a(3*n + 1) = A122865(n). a(3*n + 2) = A122856(n). a(12*n + 1) = A002175(n). a(12*n + 5) = 2 * A121444(n). 4 * a(n) = A004018(n) unless n=0.
a(n) = Sum_{k=1..n} A010052(k)*A010052(n-k). a(A022544(n)) = 0; a(A001481(n)) > 0.
- Reinhard Zumkeller, Sep 27 2008
a(n) = A001826(n) - A001842(n). - R. J. Mathar, Mar 23 2011
a(n) = Sum_{d|n} A056594(d-1), n >= 1. See the above comment on A056594(d-1) = h(d) of the Niven-Zuckerman reference. - Wolfdieter Lang, Apr 19 2013
Dirichlet g.f.: zeta(s)*beta(s) = zeta(s)*L(chi_2(4),s). - Ralf Stephan, Mar 27 2015
G.f.: (theta_3(x)^2 - 1)/4, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018
a(n) = Sum_{ m: m^2|n } A000089(n/m^2). - Andrey Zabolotskiy, May 07 2018
a(n) = A053866(n) + 2 * A025441(n). - Andrey Zabolotskiy, Apr 23 2019
a(n) = Im(Sum_{d|n} i^d). - Ridouane Oudra, Feb 02 2020
a(n) = Sum_{d|n} sin((1/2)*d*Pi). - Ridouane Oudra, Jan 22 2021
Sum_{n>=1} (-1)^n*a(n)/n = Pi*log(2)/4 (Covo, 2010). - Amiram Eldar, Apr 07 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/4 = 0.785398... (A003881). - Amiram Eldar, Oct 11 2022
From Vaclav Kotesovec, Mar 10 2023: (Start)
Sum_{k=1..n} a(k)^2 ~ n * (log(n) + C) / 4, where C = A241011 =
4*gamma - 1 + log(2)/3 - 2*log(Pi) + 8*log(Gamma(3/4)) - 12*Zeta'(2)/Pi^2 = 2.01662154573340811526279685971511542645018417752364748061...
The constant C, published by Ramanujan (1916, formula (22)), 4*gamma - 1 + log(2)/3 - log(Pi) + 4*log(Gamma(3/4)) - 12*Zeta'(2)/Pi^2 = 2.3482276258576... is wrong! (End)

A033687 Theta series of hexagonal lattice A_2 with respect to deep hole divided by 3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
a(n)=0 if and only if A000731(n)=0 (see the Han-Ono paper). - Emeric Deutsch, May 16 2008
Number of 3-core partitions of n (denoted c_3(n) in Granville and Ono, p. 340). - Brian Hopkins, May 13 2008
Denoted by g_1(q) in Cynk and Hulek in Remark 3.4 on page 12 (but not explicitly listed).
This is a member of an infinite family of integer weight modular forms. g_1 = A033687, g_2 = A030206, g_3 = A130539, g_4 = A000731. - Michael Somos, Aug 24 2012
Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + x + 2*x^2 + 2*x^4 + x^5 + 2*x^6 + x^8 + 2*x^9 + 2*x^10 + 2*x^12 + 2*x^14 + ...
G.f. = q + q^4 + 2*q^7 + 2*q^13 + q^16 + 2*q^19 + q^25 + 2*q^28 + 2*q^31 + 2*q^37 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 111.
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 79, Eq. (32.35) and (32.351).

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma1(9), 1), 316) [2]; /* Michael Somos, May 06 2015 */
  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ 3 n + 1, KroneckerSymbol[ -3, #] &]]; (* Michael Somos, Sep 23 2013 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x^3]^3 / QPochhammer[ x], {x, 0, n}]; (* Michael Somos, Sep 01 2015 *)
  • PARI
    {a(n) = if( n<0, 0, sumdiv( 3*n + 1, d, kronecker( -3, d)))}; /* Michael Somos, Nov 03 2005 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^3 + A)^3 / eta(x + A), n))};
    
  • PARI
    {a(n) = my(A, p, e); if( n<0, 0, A = factor( 3*n + 1); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==3, 0, p%6==1, e+1, 1-e%2)))}; /* Michael Somos, May 06 2015 */
    

Formula

Euler transform of period 3 sequence [1, 1, -2, ...].
Expansion of q^(-1/3) * eta(q^3)^3 / eta(q) in powers of q.
a(4*n + 1) = a(n). - Michael Somos, Dec 06 2004
a(n) = b(3*n + 1) where b(n) is multiplicative and b(p^e) = 0^e if p = 3, b(p^e) = e+1 if p == 1 (mod 6), b(p^e) = (1+(-1)^e)/2 if p == 2, 5 (mod 6). - Michael Somos, May 20 2005
Given g.f. A(x), B(q) = q * A(q^3) satisfies 0 = f(B(q), B(q^2), B(q^4)) where f(u, v, w) = u^2*w - 2*u*w^2 - v^3. - Michael Somos, Dec 06 2004
Given g.f. A(x), B(q)= q * A(q^3) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1*u3^2 + u1*u6^2 - u1*u3*u6 - u2^2*u3. - Michael Somos, May 20 2005
Given g.f. A(x), B(q) = q * A(q^3) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u2*u3^2 + 2*u2*u3*u6 + 4*u2*u6^2 - u1^2*u6. - Michael Somos, May 20 2005
G.f.: Product_{k>0} (1 - x^(3*k))^3 / (1 - x^k).
G.f.: Sum_{k in Z} x^k / (1 - x^(3*k + 1)) = Sum_{k in Z} x^k / (1 - x^(6*k + 2)). - Michael Somos, Nov 03 2005
Expansion of q^(-1) * c(q^3) / 3 = q^(-1) * (a(q) - b(q)) / 9 in powers of q^3 where a(), b(), c() are cubic AGM theta functions. - Michael Somos, Dec 25 2007
G.f. is a period 1 Fourier series which satisfies f(-1 / (27 t)) = 3^(1/2) (t/i) g(t) where q = exp(2 Pi i t) and g(t) is the g.f. for A005928.
a(n) = Sum_{d|3n+1} LegendreSymbol{d,3} - Brian Hopkins, May 13 2008
q-series for a(n): Sum_{n >= 0} q^(n^2+n)(1-q)(1-q^2)...(1-q^n)/((1-q^(n+1))(1-q^(n+2))...(1-q^(2n+1))). [From Jeremy Lovejoy, Jun 12 2009]
a(n) = A002324(3*n + 1). 3*a(n) = A005882(n) = A033685(3*n + 1). - Michael Somos, Apr 04 2003
G.f.: (2 * psi(x^2) * f(x^2, x^4) + phi(x) * f(x^1, x^5)) / 3 where phi(), psi() are Ramanujan theta functions and f(, ) is Ramanujan's general theta function. - Michael Somos, Sep 07 2018
Sum_{k=1..n} a(k) ~ 2*Pi*n/3^(3/2). - Vaclav Kotesovec, Dec 17 2022

A102283 Period 3: repeat [0, 1, -1].

Original entry on oeis.org

0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1
Offset: 0

Views

Author

N. J. A. Sloane, Nov 02 2008

Keywords

Comments

The sequence is the non-principal Dirichlet character of the reduced residue system mod 3. (The other is A011655.) Associated Dirichlet L-functions are L(1, chi) = Sum_{n >= 1} a(n)/n = A073010, L(2, chi)= Sum_{n >= 1} a(n)/n^2 = A086724, or L(3, chi)= Sum_{n >= 1} a(n)/n^3 = A129404. [Jolley eq 310] - R. J. Mathar, Jul 15 2010
a(n) = 2*D(n) - L(n), where L(n) denotes the n-th Lucas number and D(n) denotes the so-called n-th quadrapell number -- defined and discussed by Dursun Tasci in his paper (see References below). We have D(n) = D(n-2) + 2*D(n-3) + D(n-4), D(0) = D(1) = D(2) = 1, D(3) = 2. G.f. D(x) = (1+x-x^3)/((1-x-x^2)(1+x+x^2)). - Roman Witula, Jul 31 2012
This is a strong elliptic divisibility sequence t_n as given in [Kimberling, p. 16] where x = -1, y = 0, z = -1. - Michael Somos, Nov 27 2019

Examples

			G.f. = x - x^2 + x^4 - x^5 + x^7 - x^8 + x^10 - x^11 + ... - _Michael Somos_, Nov 27 2019
		

References

  • M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996; p. 236.
  • L. B. W. Jolley, Summation of Series, Dover Publications (1961).
  • Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer-Verlag, NY, 2000, p. 6.

Crossrefs

Cf. A011655, A049347, A073010, A086724, A129404, A002324 (Mobius transform).

Programs

Formula

a(n) = A049347(n-1).
a(n) = -a(n-1) - a(n-2); a(0) = 0, a(1) = 1. G.f.: x/(1+x+x^2). - Philippe Deléham, Nov 03 2008
a(n) = -2*sin(4*Pi*n/3)/sqrt(3) = 2*sin(8*Pi*n/3)/sqrt(3). - Jaume Oliver Lafont, Dec 05 2008
a(n) = 2*sin(2*Pi*n/3)/sqrt(3). - Roman Witula, Jul 31 2012
a(n) = Legendre(n, 3), the Legendre symbol for p = 3. - Alonso del Arte, Feb 06 2013
a(n) = (-3/n), where (k/n) is the Kronecker symbol. See the Eric Weisstein and Wikipedia links. - Wolfdieter Lang, May 29 2013
Dirichlet g.f.: L(chi_2(3),s), with chi_2(3) the nontrivial Dirichlet character modulo 3. - Ralf Stephan, Mar 27 2015
a(n) = a(n-3) for n > 2. - Wesley Ivan Hurt, Jul 02 2016
E.g.f.: 2*sin(sqrt(3)*x/2)*exp(-x/2)/sqrt(3). - Ilya Gutkovskiy, Jul 02 2016
a(n) = H(2*n, 1, 1/2) for n > 0 where H(n, a, b) = hypergeom([a - n/2, b - n/2], [1 - n], 4). - Peter Luschny, Sep 03 2019
Euler transform of length 3 sequence [-1, 0, 1]. - Michael Somos, Nov 27 2019
a(n) = n - 3*floor((n+1)/3). - Wolfdieter Lang, Oct 07 2021

A002325 Glaisher's J numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of integer solutions to the equation x^2 + 2*y^2 = n when (-x, -y) and (x, y) are counted as the same solution.
For n nonzero, a(n) is nonzero if and only if n is in A002479. - Michael Somos, Dec 15 2011
Coefficients of Dedekind zeta function for the quadratic number field of discriminant -8. See A002324 for formula and Maple code. - N. J. A. Sloane, Mar 22 2022

Examples

			x + x^2 + 2*x^3 + x^4 + 2*x^6 + x^8 + 3*x^9 + 2*x^11 + 2*x^12 + x^16 + ...
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 114 Entry 8(iii).
  • 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. 19.
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.24).
  • J. W. L. Glaisher, Table of the excess of the number of (8k+1)- and (8k+3)-divisors of a number over the number of (8k+5)- and (8k+7)-divisors, Messenger Math., 31 (1901), 82-91.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Dedekind zeta functions for imaginary quadratic number fields of discriminants -3, -4, -7, -8, -11, -15, -19, -20 are A002324, A002654, A035182, A002325, A035179, A035175, A035171, A035170, respectively.
Dedekind zeta functions for real quadratic number fields of discriminants 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 40 are A035187, A035185, A035194, A035195, A035199, A035203, A035188, A035210, A035211, A035215, A035219, A035192, respectively.

Programs

  • Maple
    S:= series( (JacobiTheta3(0,q)*JacobiTheta3(0,q^2)-1)/2, q, 1001):
    seq(coeff(S,q,j), j=1..1000); # Robert Israel, Dec 01 2015
  • Mathematica
    a[n_] := Total[ KroneckerSymbol[-8, #] & /@ Divisors[n]]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Nov 25 2011, after Michael Somos *)
    QP = QPochhammer; s = ((QP[q^2]^3*QP[q^4]^3)/(QP[q]^2*QP[q^8]^2)-1)/(2q) + O[q]^105; CoefficientList[s, q] (* Jean-François Alcover, Dec 01 2015, adapted from PARI *)
  • PARI
    a(n) = if( n<1, 0, issquare(n)-issquare(2*n) + 2*sum(i=1,sqrtint(n\2), issquare(n-2*i^2)))
    
  • PARI
    {a(n) = if( n<1, 0, qfrep([ 1, 0; 0, 2],n)[n])} \\ Michael Somos, Jun 05 2005
    
  • PARI
    {a(n) = if( n<1, 0, direuler(p=2, n, 1 / (1 - X) / (1 - kronecker( -2, p) * X))[n])} \\ Michael Somos, Jun 05 2005
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, kronecker( -2, d)))} \\ Michael Somos, Aug 23 2005
    
  • PARI
    {a(n) = local(A, p, e); if( n<1, 0, A = factor(n); prod( k=1, matsize(A)[1], if( p=A[k, 1], e=A[k, 2]; if( p==2, 1, if( p%8<4, e+1, !(e%2))))))} \\ Michael Somos, Oct 23 2006
    
  • PARI
    {a(n) = local(A); if( n<1, 0, A = x * O(x^n); polcoeff( eta(x + A)^-2 * eta(x^2 + A)^3 * eta(x^4 + A)^3 * eta(x^8 + A)^-2, n) / 2)}
    
  • PARI
    a(n) = my(f=factor(n>>valuation(n,2)), e); prod(i=1, #f~, e=f[i, 2]; if( f[i, 1]%8<4, e+1, 1 - e%2)) \\ Charles R Greathouse IV, Sep 09 2014

Formula

Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m, p)+1)*p^(-s) + Kronecker(m, p)*p^(-2s))^(-1) for m = -2.
Moebius transform is period 8 sequence [ 1, 0, 1, 0, -1, 0, -1, 0, ...]. - Michael Somos, Aug 23 2005
G.f.: (theta_3(q) * theta_3(q^2) - 1) / 2 = Sum_{k>0} Kronecker( -2, n) * x^k / (1 - x^k) = Sum_{k>0} (x^k + x^(3*k)) / (1 + x^(4*k)).
Multiplicative with a(2^e) = 1, a(p^e) = e+1 if p == 1, 3 (mod 8), a(p^e) = (1+(-1)^e)/2 if p == 5, 7 (mod 8). - Michael Somos, Oct 23 2006
A033715(n) = 2 * a(n) unless n=0.
a(n) = A188169(n) + A188170(n) - A188171(n) - A188172(n) [Hirschhorn]. - R. J. Mathar, Mar 23 2011
G.f.: A(x) = 2*(1+x^2)/(G(0)-2*x*(1+x^2)); G(k) = 1+x+x^(2*k)*(1+x^3+x^(2*k+1)+x^(2*k+4)+x^(4*k+3)+x^(4*k+4)) - x*(1+x^(2*k))*(1+x^(2*k+4))*(1+x^(4*k+4))^2/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Jan 03 2012
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(2*sqrt(2)) = 1.110720... (A093954). - Amiram Eldar, Oct 11 2022

A033762 Product t2(q^d); d | 3, where t2 = theta2(q) / (2 * q^(1/4)).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of solutions of 8*n + 4 = x^2 + 3*y^2 in positive odd integers. - Michael Somos, Sep 18 2004
Half the number of integer solutions of 4*n + 2 = x^2 + y^2 + z^2 where 0 = x + y + z and x and y are odd. - Michael Somos, Jul 03 2011
Given g.f. A(x), then q^(1/2) * 2 * A(q) is denoted phi_1(z) where q = exp(Pi i z) in Conway and Sloane.
Half of theta series of planar hexagonal lattice (A2) with respect to an edge.
Bisection of A002324. Number of ways of writing n as a sum of a triangular plus three times a triangular number [Hirschhorn]. - R. J. Mathar, Mar 23 2011
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).

Examples

			G.f. = 1 + x + 2*x^3 + x^4 + 2*x^6 + 2*x^9 + 2*x^10 + x^12 + x^13 + 2*x^15 + ...
G.f. = q + q^3 + 2*q^7 + q^9 + 2*q^13 + 2*q^19 + 2*q^21 + q^25 + q^27 + 2*q^31 + ...
a(6) = 2 since 8*6 + 4 = 52 = 5^2 + 3*3^2 = 7^2 + 3*1^2.
		

References

  • Burce C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, 1991, see p. 223 Entry 3(i).
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, 1999, p. 103. See Eq. (13).
  • Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.27).

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(12), 1), 202); A[2] + A[4]; /* Michael Somos, Jul 25 2014 */
  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ 2 n + 1, Mod[(3 - #)/2, 3, -1] &]]; (* Michael Somos, Jul 03 2011 *)
    QP = QPochhammer; s = (QP[q^2]*QP[q^6])^2/(QP[q]*QP[q^3]) + O[q]^100; CoefficientList[s, q] (* Jean-François Alcover, Nov 27 2015, adapted from PARI *)
    a[ n_] := If[ n < 1, Boole[n == 0], Times @@ (Which[# < 2, 0^#2, Mod[#, 6] == 5, 1 - Mod[#2, 2], True, #2 + 1] & @@@ FactorInteger@(2 n + 1))]; (* Michael Somos, Mar 06 2016 *)
    %t A033762 a[ n_] := SeriesCoefficient[ (1/4) x^(-1/2) EllipticTheta[ 2, 0, x^(1/2)] EllipticTheta[ 2, 0, x^(3/2)], {x, 0, n}]; (* Michael Somos, Mar 06 2016 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) * eta(x^6 + A))^2 / (eta(x + A) * eta(x^3 + A)), n))}; /* Michael Somos, Sep 18 2004 */
    
  • PARI
    {a(n) = if( n<0, 0, n = 2*n + 1; sumdiv( n, d, kronecker( -12, d) * (n / d % 2)))}; /* Michael Somos, Nov 04 2005 */
    
  • PARI
    {a(n) = if( n<0, 0, n = 8*n + 4; sum( j=1, sqrtint( n\3), (j%2) * issquare(n - 3*j^2)))} /* Michael Somos, Nov 04 2005 */
    
  • PARI
    {a(n) = if( n<0, 0, sumdiv(2*n + 1, d, kronecker(-3, d)))}; /* Michael Somos, Mar 06 2016 */
    

Formula

Expansion of q^(-1/2) * (eta(q^2) * eta(q^6))^2 / (eta(q) * eta(q^3)) in powers of q. - Michael Somos, Apr 18 2004
Expansion of q^(-1) * (a(q) - a(q^4)) / 6 in powers of q^2 where a() is a cubic AGM theta function. - Michael Somos, Oct 24 2006
Expansion of psi(x) * psi(x^3) in powers of x where psi() is a Ramanujan theta function. - Michael Somos, Jul 03 2011
Euler transform of period 6 sequence [ 1, -1, 2, -1, 1, -2, ...]. - Michael Somos, Apr 18 2004
From Michael Somos, Sep 18 2004: (Start)
Given g.f. A(x), then B(x) = (x * A(x^2))^2 satisfies 0 = f(B(x), B(x^2), B(x^4)) where f(u, v, w) = v^3 + 4*u*v*w + 16*v*w^2 - 8*w*v^2 - w*u^2.
a(n) = b(2*n + 1) where b() is multiplicative with b(2^e) = 0^e, b(3^e) = 1, b(p^e) = (1 + (-1)^e) / 2 if p==5 (mod 6) otherwise b(p^e) = e+1. (Clarification: the g.f. A(x) is not the primary function of interest, but rather B(x) = x * A(x^2), which is an eta-quotient and is the generating function of a multiplicative sequence.)
G.f.: (Sum_{j>0} x^((j^2 - j) / 2)) * (Sum_{k>0} x^(3(k^2 - k) / 2)) = Product_{k>0} (1 + x^k) * (1 - x^(2*k)) * (1 + x^(3*k)) * (1 - x^(6*k)).
G.f.: Sum_{k>=0} a(k) * x^(2*k + 1) = Sum_{k>0} x^k * (1 - x^k) * (1 - x^(4*k)) * (1 - x^(5*k)) / (1 - x^(12*k)). (End)
G.f.: s(4)^2*s(12)^2/(s(2)*s(6)), where s(k) := subs(q=q^k, eta(q)), where eta(q) is Dedekind's function, cf. A010815. [Fine]
G.f.: Sum_{k>=0} a(k) * x^(2*k + 1) = Sum_{k>0} x^k / (1 + x^k + x^(2*k)) - x^(4*k) / (1 + x^(4*k) + x^(8*k)). - Michael Somos, Nov 04 2005
a(n) = A002324(2*n + 1) = A035178(2*n + 1) = A091393(2*n + 1) = A093829(2*n + 1) = A096936(2*n + 1) = A112298(2*n + 1) = A113447(2*n + 1) = A113661(2*n + 1) = A113974(2*n + 1) = A115979(2*n + 1) = A122860(2*n + 1) = A123331(2*n + 1) = A123484(2*n + 1) = A136748(2*n + 1) = A137608(2*n + 1). A005881(n) = 2*a(n).
6 * a(n) = A004016(6*n + 3). - Michael Somos, Mar 06 2016
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(2*sqrt(3)) = 0.906899... (A093766). - Amiram Eldar, Nov 23 2023

Extensions

Corrected by Charles R Greathouse IV, Sep 02 2009
Showing 1-10 of 71 results. Next