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 30 results. Next

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)

A122856 Expansion of f(x, x^5)^2 in powers of x where f(, ) is Ramanujan's general theta function.

Original entry on oeis.org

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

Views

Author

Michael Somos, Sep 14 2006

Keywords

Comments

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

Examples

			G.f. = 1 + 2*x + x^2 + 2*x^5 + 2*x^6 + 2*x^8 + 2*x^9 + x^10 + 2*x^13 + ...
G.f. = q^2 + 2*q^5 + q^8 + 2*q^17 + 2*q^20 + 2*q^26 + 2*q^29 + q^32 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, With[ {m = 3 n + 2}, Sum[ KroneckerSymbol[ -4, d], {d, Divisors@m}]]]; (* Michael Somos, Nov 14 2011 *)
    QP = QPochhammer; s = (QP[q^2]^2*QP[q^3]*(QP[q^12]/(QP[q]*QP[q^4]*QP[q^6]) ))^2 + O[q]^105; CoefficientList[s, q] (* Jean-François Alcover, Nov 30 2015, adapted from PARI *)
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, x^(1/3)] - EllipticTheta[ 3, 0, x^3])^2 / (4 x^(2/3)), {x, 0, n}]; (* Michael Somos, Jan 19 2017 *)
    a[ n_] := SeriesCoefficient[ (QPochhammer[ -x, x^2] EllipticTheta[ 2, Pi/4, x^(3/2)])^2 / (2 x^(3/4)), {x, 0, n}]; (* Michael Somos, Jan 19 2017 *)
  • PARI
    {a(n) = if( n<0, 0, n = 3*n+2; sumdiv(n, d, (d%4==1) - (d%4==3)))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^2 * eta(x^3 + A) * eta(x^12 + A) / (eta(x + A) * eta(x^4 + A) * eta(x^6 + A)))^2, n))};

Formula

Expansion of (chi(x) * psi(-x^3))^2 in powers of x where chi(), psi() are Ramanujan theta functions.
Expansion of q^(-2/3) * (eta(q^2)^2 * eta(q^3) * eta(q^12) / (eta(q) * eta(q^4) * eta(q^6)))^2 in powers of q.
Euler transform of period 12 sequence [2, -2, 0, 0, 2, -2, 2, 0, 0, -2, 2, -2, ...].
a(4*n + 3) = a(8*n + 4) = 0. a(n) = A002654(3*n + 2) = A035154(3*n + 2) = A113446(3*n + 2). a(2*n) = A122865(n). a(4*n + 1) = 2 * A121444(n). a(4*n + 2) = A122856(n).
a(n) = (-1)^n * A258278(n). Convolution square of A089801.

A002175 Excess of number of divisors of 12n+1 of form 4k+1 over those of form 4k+3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Number of ways to write n as an ordered sum of 2 generalized pentagonal numbers. - Ilya Gutkovskiy, Aug 14 2017

Examples

			G.f. = 1 + 2*x + 3*x^2 + 2*x^3 + x^4 + 2*x^5 + 2*x^6 + 4*x^7 + 2*x^8 + 2*x^9 + ...
G.f. = q + 2*q^13 + 3*q^25 + 2*q^37 + q^49 + 2*q^61 + 2*q^73 + 4*q^85 + 2*q^97 + ...
		

References

  • 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

Programs

  • Maple
    series(mul( ( (1 + q^n)*(1 - q^(3*n))/(1 + q^(3*n)) )^2, n = 1..100), q, 101):
    seq(coeftayl(%, q = 0, n), n = 0..100); # Peter Bala, Jan 05 2025
  • Mathematica
    ed[n_]:=Module[{divs=Divisors[12n+1]},Count[divs,?(Mod[#,4] == 1&)]- Count[divs,?(Mod[#,4]==3&)]]; Array[ed,110,0] (* Harvey P. Dale, Jul 01 2012 *)
    a[ n_] := If[ n < 0, 0, With[ {m = 12 n + 1}, Sum[ KroneckerSymbol[ 4, d], {d, Divisors[m]}]]]; (* Michael Somos, Apr 23 2014 *)
    a[ n_] := SeriesCoefficient[ (QPochhammer[ x^2] QPochhammer[ x^3]^2 / (QPochhammer[ x] QPochhammer[ x^6]))^2, {x, 0, n}]; (* Michael Somos, Apr 23 2014 *)
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 4, 0, x^3] / QPochhammer[ x, x^2])^2, {x, 0, n}]; (* Michael Somos, May 25 2015 *)
  • PARI
    {a(n) = if( n<0, 0, n = 12*n + 1; sumdiv( n, d, (d%4==1) - (d%4==3)))}; /* Michael Somos, Sep 19 2005 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) * eta(x^3 + A)^2 / (eta(x + A) * eta(x^6 + A)))^2, n))}; /* Michael Somos, Jun 02 2012 */

Formula

Expansion of (phi(-x^3) / chi(-x))^2 in powers of x where phi(), chi() are Ramanujan theta functions.
Expansion of q^(-1/12) * (eta(q^2) * eta(q^3)^2 / (eta(q) * eta(q^6)))^2 in powers of q. - Michael Somos, Sep 19 2005
Euler transform of period 6 sequence [ 2, 0, -2, 0, 2, -2, ...]. - Michael Somos, Sep 19 2005
G.f. is a period 1 Fourier series which satisfies f(-1 / (72 t)) = 2 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A258279. - Michael Somos, May 25 2015
From Michael Somos, Jun 02 2012: (Start)
a(n) = A008441(3*n) = A121363(3*n) = A122865(4*n) = A122856(8*n).
a(n) = A116604(6*n) = A125079(6*n) = A129447(6*n) = A138741(6*n).
From Michael Somos, May 25 2015: (Start)
a(n) = A258277(4*n) = A258278(8*n) = A258291(3*n).
a(n) = - A258210(12*n + 1) = A258228(12*n + 1) = A258256(12*n + 1).
2*a(n) = A258279(12*n + 1) = - A258292(12*n + 1). (End)
G.f.: (Sum_{k = -oo..oo} x^(k*(3*k-1)/2))^2. - Ilya Gutkovskiy, Aug 14 2017
G.f.: ( Product_{n >= 1} (1 + q^n)*(1 - q^(3*n))/(1 + q^(3*n)) )^2. - Peter Bala, Jan 05 2025

A258277 Expansion of chi(-q) * phi(-q^3) * psi(q^3) in powers of q where chi(), phi(), psi() are Ramanujan theta functions.

Original entry on oeis.org

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

Views

Author

Michael Somos, May 25 2015

Keywords

Comments

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

Examples

			G.f. = 1 - x - 2*x^3 + 2*x^4 - x^5 + 3*x^8 - 2*x^11 + 2*x^12 - 2*x^13 + ...
G.f. = q - q^4 - 2*q^10 + 2*q^13 - q^16 + 3*q^25 - 2*q^34 + 2*q^37 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ x^3] QPochhammer[ x^6] / QPochhammer[ -x, x], {x, 0, n}];
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A) * eta(x^3 + A) * eta(x^6 + A) / eta(x^2 + A), n))};

Formula

Expansion of q^(-1/3) * eta(q) * eta(q^3) * eta(q^6) / eta(q^2) in powers of q.
Euler transform of period 6 sequence [ -1, 0, -2, 0, -1, -2, ...].
G.f.: Product_{k>0} (1 - x^(3*k)) * (1 - x^(6*k)) / (1 + x^k).
a(n) = (-1)^n * A122865(n).
a(2*n + 1) = - A122856(n). a(4*n) = A002175(n). a(4*n + 1) = - A122865(n). a(4*n + 2) = a(8*n + 7) = 0. a(8*n + 3) = -2 * A121444(n). a(8*n + 5) = - A122856(n).
a(n) = -A258210(3*n + 1). - Michael Somos, May 01 2016

A258278 Expansion of f(-x, -x^5)^2 in powers of x where f(,) is Ramanujan's general theta function.

Original entry on oeis.org

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

Views

Author

Michael Somos, May 25 2015

Keywords

Comments

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

Examples

			G.f. = 1 - 2*x + x^2 - 2*x^5 + 2*x^6 + 2*x^8 - 2*x^9 + x^10 - 2*x^13 + ...
G.f. = q^2 - 2*q^5 + q^8 - 2*q^17 + 2*q^20 + 2*q^26 - 2*q^29 + q^32 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ x, x^2]^2 EllipticTheta[ 2, 0, x^(3/2)]^2 / (4 x^(3/4)), {x, 0, n}];
  • PARI
    {a(n) = if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x + A) * eta(x^6 + A)^2 / (eta(x^2 + A) * eta(x^3 + A)))^2, n))};

Formula

Expansion of (chi(-x) * psi(x^3))^2 in powers of x where chi(), psi() are Ramanujan theta functions.
Expansion of q^(-2/3) * (eta(q) * eta(q^6)^2 / (eta(q^2) * eta(q^3)))^2 in powers of q.
Euler transform of period 6 sequence [ -2, 0, 0, 0, -2, -2, ...].
a(n) = (-1)^n * A122856(n). Convolution square of A089802.
a(2*n) = A122865(n). a(4*n +1) = -2 * A121444(n). a(4*n + 2) = A122856(n). a(4*n + 3) = a(8*n + 4) = 0. a(8*n) = A002175(n). a(8*n + 2) = A122856(n).
2 * a(n) = -A258210(3*n + 2). - Michael Somos, May 01 2016

A035154 a(n) = Sum_{d|n} Kronecker(-36, d).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

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

References

  • Bruce C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, 1994, see p. 197, Entry 44.

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 1, 0, Sum[ KroneckerSymbol[ -36, d], { d, Divisors[ n]}]]; (* Michael Somos, Jun 24 2011 *)
    a[ n_] := SeriesCoefficient[ (-2 + EllipticTheta[ 3, 0, q]^2 + EllipticTheta[ 3, 0, q^3]^2) / 4, {q, 0, n}]; (* Michael Somos, Jul 09 2013 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, kronecker( -36, d)))}; /* Michael Somos, Jul 30 2006 */
    
  • PARI
    {a(n) = if( n<1, 0, direuler(p=2, n, 1 / ((1 - X) * (1 - kronecker( -36, p) * X))) [n])}; /* Michael Somos, Jul 30 2006 */
    
  • PARI
    {a(n)=polcoeff(sum(m=0,n\6+1,(-1)^m*(x^(6*m+1)/(1-x^(6*m+1)+x*O(x^n)) + x^(6*m+5)/(1-x^(6*m+5)+x*O(x^n)))),n)} /* Paul D. Hanna */

Formula

Expansion of -1 + (theta_3(q)^2 + theta_3(q^3)^2) / 2 in powers of q. - Michael Somos, Jul 09 2013
From Michael Somos, Jul 30 2006: (Start)
Moebius transform is period 12 sequence [1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, ...].
Multiplicative with a(2^e) = a(3^e) = 1, a(p^e) = e+1 if p == 1(mod 4), a(p^e) = (1 + (-1)^e) / 2 if p == 3(mod 4). (End)
Dirichlet g.f.: zeta(s) * L(chi,s) where chi(n) = Kronecker( -36, n). Sum_{n>0} a(n) / n^s = Product_{p prime} 1 / ((1 - p^-s) * (1 - Kronecker( -36, p) * p^-s)). - Michael Somos, Jun 24 2011
a(2*n) = a(3*n) = a(n). a(2*n + 1) = A125079(n). a(3*n + 1) = A122865(n). a(3*n + 2) = A122856(n). a(4*n + 1) = A008441(n).
2 * a(n) = A122857(n) unless n=0. - Michael Somos, Jul 09 2013
G.f.: Sum_{n>=0} (-1)^n*( x^(6*n+1)/(1-x^(6*n+1)) + x^(6*n+5)/(1-x^(6*n+5)) ). - Paul D. Hanna, Dec 14 2011
G.f.: x/(1-x) + x^5/(1-x^5) - x^7/(1-x^7) - x^11/(1-x^11) + x^13/(1-x^13) + x^17/(1-x^17) --++ ...
a(n) = A002654(n) + A002654(3*n). - Michael Somos, Jan 25 2017
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/3 = 1.0471975... (A019670). - Amiram Eldar, Nov 17 2023

A104794 Expansion of theta_4(q)^2 in powers of q.

Original entry on oeis.org

1, -4, 4, 0, 4, -8, 0, 0, 4, -4, 8, 0, 0, -8, 0, 0, 4, -8, 4, 0, 8, 0, 0, 0, 0, -12, 8, 0, 0, -8, 0, 0, 4, 0, 8, 0, 4, -8, 0, 0, 8, -8, 0, 0, 0, -8, 0, 0, 0, -4, 12, 0, 8, -8, 0, 0, 0, 0, 8, 0, 0, -8, 0, 0, 4, -16, 0, 0, 8, 0, 0, 0, 4, -8, 8, 0, 0, 0, 0, 0, 8
Offset: 0

Views

Author

Michael Somos, Mar 26 2005

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Quadratic AGM theta functions: a(q) (see A004018), b(q) (A104794), c(q) (A005883).
In the Arithmetic-Geometric Mean, if a = theta_3(q)^2, b = theta_4(q)^2 then a' := (a+b)/2 = theta_3(q^2)^2, b' := sqrt(a*b) = theta_4(q^2)^2.

Examples

			G.f. = 1 - 4*q + 4*q^2 + 4*q^4 - 8*q^5 + 4*q^8 - 4*q^9 + 8*q^10 - 8*q^13 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 576.
  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987.

Crossrefs

Programs

  • Julia
    # JacobiTheta4 is defined in A002448.
    A104794List(len) = JacobiTheta4(len, 2)
    A104794List(102) |> println # Peter Luschny, Mar 12 2018
  • Magma
    A := Basis( ModularForms( Gamma1(8), 1), 100); A[1] - 4*A[2] + 4*A[3]; /* Michael Somos, Jan 31 2015 */
    
  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, q]^2, {q, 0, n}];
    a[ n_] := With[ {m = InverseEllipticNomeQ @ q}, SeriesCoefficient[ Sqrt[1 - m] EllipticK[m] / (Pi/2), {q, 0, n}]];
    a[ n_] := With[ {m = InverseEllipticNomeQ @ q}, SeriesCoefficient[ (1 - m)^(1/4) EllipticK[m] / (Pi/2), {q, 0, 2 n}]];
    a[ n_] := With[ {m = InverseEllipticNomeQ @ -q}, SeriesCoefficient[ EllipticK[ m] / (Pi/2), {q, 0, n}]]; (* Michael Somos, Jun 06 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], (-1)^n 4 DivisorSum[ n, KroneckerSymbol[ -4, #] &]]; (* Michael Somos, Jun 06 2015 *)
  • PARI
    {a(n) = if( n<1, n==0, (-1)^n * 4 * sumdiv(n, d, (d%4==1) - (d%4==3)))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A)^4 / eta(x^2 + A)^2, n ))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 + 4 * sum( k=1, n, (-x)^k / (1 + x^(2*k)), x * O(x^n)), n))};
    

Formula

Expansion of phi(-q)^2 = 2 * phi(q^2)^2 - phi(q)^2 = (phi(q) - 2*phi(q^4))^2 = f(-q)^3 / psi(q) = phi(-q^2)^4 / phi(q)^2 = psi(-q)^4 / psi(q^2)^2 = psi(q)^2 * chi(-q)^6 in powers of q where phi(), psi(), chi(), f() are Ramanujan theta functions.
Expansion of (1-k^2)^(1/2) K(k^2) / (Pi/2) in powers of q where q is Jacobi's nome, k is the elliptic modulus and K() is the complete elliptic integral of the first kind.
Expansion of K(k^2) / (Pi/2) in powers of -q where q is Jacobi's nome, k is the elliptic modulus and K() is the complete elliptic integral of the first kind. - Michael Somos, Jun 08 2015
Expansion of eta(q)^4 / eta(q^2)^2 in powers of q.
Euler transform of period 2 sequence [ -4, -2, ...].
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = v * (u^2 + v^2) - 2*u*w^2.
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 - 2*u1*u3 + 4*u2*u6 - 3*u3^2.
Moebius transform is period 8 sequence [ -4, 8, 4, 0, -4, -8, 4, 0, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 16 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A008441.
G.f.: theta_4(q)^2 = (Sum_{k in Z} (-q)^(k^2))^2 = (Product_{k>0} (1 - q^(2*k)) * (1 - q^(2*k - 1))^2)^2.
G.f.: 1 + 4 * Sum_{k>0} (-x)^k / (1 + x^(2*k)). - Michael Somos, Jun 08 2015
a(4*n + 3) = 0. a(n) = (-1)^n * A004018(n) = a(2*n). a(4*n + 1) = -4 * A008441(n). a(n) = -4 * A113652(n) unless n=0. a(6*n + 2) = 4 * A122865(n). a(6*n + 4) = 4 * A122856(n). a(8*n + 1) = -4 * A113407(n). a(8*n + 5) = -8 * A053692(n).
a(n) = a(9*n) = A204531(8*n) = A246950(8*n) = A256014(9*n) = A258210(n). - Michael Somos, Jun 08 2015
Convolution inverse of A001934. Convolution with A000729 is A227695. - Michael Somos, Jun 08 2015
G.f.: 2 * Sum_{k in Z} (-1)^k * x^(k*(k + 1)/2) / (1 + x^k). - Michael Somos, Nov 05 2015
a(0) = 1, a(n) = -(4/n)*Sum_{k=1..n} A002131(k)*a(n-k) for n > 0. - Seiichi Manyama, May 02 2017
G.f.: exp(2*Sum_{k>=1} (sigma(k) - sigma(2*k))*x^k/k). - Ilya Gutkovskiy, Sep 19 2018

A258210 Expansion of f(-q) * f(-q^2) * chi(-q^3) in powers of q where chi(), f() are Ramanujan theta functions.

Original entry on oeis.org

1, -1, -2, 0, 1, 4, 0, 0, -2, -4, 2, 0, 0, -2, 0, 0, 1, 4, 4, 0, -4, 0, 0, 0, 0, -3, -4, 0, 0, 4, 0, 0, -2, 0, 2, 0, 4, -2, 0, 0, 2, 4, 0, 0, 0, -8, 0, 0, 0, -1, -6, 0, 2, 4, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 1, 8, 0, 0, -4, 0, 0, 0, 4, -2, -4, 0, 0, 0, 0, 0, -4
Offset: 0

Views

Author

Michael Somos, May 23 2015

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Denoted by a_6(n) in Kassel and Reutenauer 2015. - Michael Somos, Jun 04 2015

Examples

			G.f. = 1 - q - 2*q^2 + q^4 + 4*q^5 - 2*q^8 - 4*q^9 + 2*q^10 - 2*q^13 + ...
		

Crossrefs

For the square of this series see A252650.

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ q]^2 / (QPochhammer[ q, q^6] QPochhammer[ q^5, q^6]), {q, 0, n}];
    a[ n_] := SeriesCoefficient[ (1/2) EllipticThetaPrime[ 1, 0, q^(1/2)] / EllipticTheta[ 1, Pi/6, q^(1/2)], {q, 0, n}];
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A) * eta(x^2 + A) * eta(x^3 + A) / eta(x^6 + A), n))};
    
  • PARI
    {a(n) = if( n<1, n==0, (-1)^n * (1 - (n%3==2)*3) * sumdiv(n, d, [0, 1, 2, -1][d%4 + 1] * if(d%9, 1, 4) * (-1)^((d%8==6) + n+d)))}; /* Michael Somos, Jun 04 2015 */

Formula

Expansion of f(-q)^2 * f(-q^6) / f(-q, -q^5) in powers of q where f(,) is Ramanujan's general theta function.
Expansion of eta(q) * eta(q^2) * eta(q^3) / eta(q^6) in powers of q.
Euler transform of period 6 sequence [ -1, -2, -2, -2, -1, -2, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (72 t)) = 12 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A121444.
G.f.: Product_{k>0} (1 - x^k) * (1 - x^2*k) / (1 + x^(3*k)).
a(n) = (-1)^n * A258228(n). Convolution inverse of A077285.
a(4*n + 3) = 0. a(6*n + 2) = -2 * A122865(n). a(6*n + 4) = A122856(n). a(12*n + 1) = -1 * A002175(n).
a(9*n + 3) = a(9*n + 6) = 0. a(9*n) = A104794(n). a(3*n + 1) = -A258277(n). a(3*n + 2) = -2*A258278(n). - Michael Somos, May 01 2016
G.f.: Product_{i>0} 1/(1 + Sum_{j>0} j*x^(j*i)). - Seiichi Manyama, Oct 08 2017

A125061 Expansion of psi(q) * psi(q^2) * chi(q^3) * chi(-q^6) in powers of q where psi(), chi() are Ramanujan theta functions.

Original entry on oeis.org

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

Views

Author

Michael Somos, Nov 18 2006

Keywords

Comments

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

Examples

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

References

  • Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 82, Eq. (32.53).

Crossrefs

Programs

  • Mathematica
    s = (EllipticTheta[3, 0, q]^2 + 3*EllipticTheta[3, 0, q^3]^2)/4 + O[q]^105; CoefficientList[s, q] (* Jean-François Alcover, Dec 07 2015, from 2nd formula *)
  • PARI
    {a(n) = if( n<1, n==0, sumdiv(n, d, ((d%2) * ((d%3==0)+1)) * (-1)^(d\6)))};
    
  • PARI
    {a(n) = my(A, p, e); if( n<1, n==0, A = factor(n); prod( k=1, matsize(A)[1],
         [p, e] = A[k, ]; if( p==2, 1, p==3, 1+e%2*2, p%4==1, e+1, !(e%2) )))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) * eta(x^4 + A)^2 * eta(x^6 + A)^3 / (eta(x + A) * eta(x^3 + A) * eta(x^12 + A)^2), n))};

Formula

Expansion of eta(q^2) * eta(q^4)^2 * eta(q^6)^3 / (eta(q) * eta(q^3) * eta(q^12)^2) in powers of q.
Expansion of (theta_3(q)^2 + 3*theta_3(q^3)^2) / 4 in powers of q.
Euler transform of period 12 sequence [ 1, 0, 2, -2, 1, -2, 1, -2, 2, 0, 1, -2, ...].
Moebius transform is period 12 sequence [ 1, 0, 2, 0, 1, 0, -1, 0, -2, 0, -1, 0, ...].
a(n) is multiplicative with a(2^e) = 1, a(3^e) = 2-(-1)^e, a(p^e) = e+1 if p == 1 (mod 4), a(p^e) == (1-(-1)^e)/2 if p == 3 (mod 4).
G.f.: 1 + Sum_{k>0} (x^k + x^(3*k)) / (1 - x^(2*k) + x^(4*k)).
G.f. is a period 1 Fourier series which satisfies f(-1 / (12 t)) = 3 (t/i) g(t) where q = exp(2 Pi i t) and g() is g.f. for A122857.
a(12*n + 7) = a(12*n + 11) = 0. a(2*n) = a(n). a(2*n + 1) = A138741(n). a(3*n + 1) = A122865(n). a(3*n + 2) = A122856(n). a(4*n + 1) = A008441(n). a(4*n + 3) = 3 * A008441(n). a(6*n + 1) = A002175(n). a(6*n + 5) = 2 * A121444(n). a(8*n + 1) = A113407(n). a(8*n + 3) = 3 * A113407(n). a(8*n + 5) = 2 * A053692(n). a(8*n + 7) = 6 * A053692(n). a(9*n) = A125061(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/2 (A019669). - Amiram Eldar, Nov 24 2023

A258228 Expansion of f(q) * f(-q^2) * chi(q^3) in powers of q where chi(), f() are Ramanujan theta functions.

Original entry on oeis.org

1, 1, -2, 0, 1, -4, 0, 0, -2, 4, 2, 0, 0, 2, 0, 0, 1, -4, 4, 0, -4, 0, 0, 0, 0, 3, -4, 0, 0, -4, 0, 0, -2, 0, 2, 0, 4, 2, 0, 0, 2, -4, 0, 0, 0, 8, 0, 0, 0, 1, -6, 0, 2, -4, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 1, -8, 0, 0, -4, 0, 0, 0, 4, 2, -4, 0, 0, 0, 0, 0, -4, 4
Offset: 0

Views

Author

Michael Somos, May 23 2015

Keywords

Comments

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

Examples

			G.f. = 1 + q - 2*q^2 + q^4 - 4*q^5 - 2*q^8 + 4*q^9 + 2*q^10 + 2*q^13 + ...
		

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(36), 1), 82); A[1] + A[2] - 2*A[3] + A[5] - 4*A[6] - 2*A[9] + 4*A[10] + 2*A[11] + 2*A[14] + A[17] - 4*A[18] + 4*A[19];
  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ -q]^2 / (QPochhammer[ -q, q^6] QPochhammer[ -q^5, q^6]), {q, 0, n}];
  • PARI
    {a(n) = if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^4 * eta(x^6 + A)^2 / (eta(x + A) * eta(x^3 + A) * eta(x^4 + A) * eta(x^12 + A)), n))};
    

Formula

Expansion of f(q)^2 * f(-q^6) / f(q, q^5) in powers of q where f(,) is Ramanujan's general theta function.
Expansion of eta(q^2)^4 * eta(q^6)^2 / (eta(q) * eta(q^3) * eta(q^4) * eta(q^12)) in powers of q.
Euler transform of period 12 sequence [ 1, -3, 2, -2, 1, -4, 1, -2, 2, -3, 1, -2, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (36 t)) = 18 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A122865.
G.f.: Product_{k>0} (1 + x^k) * (1 - x^(2*k))^2 * (1 + x^(3*k)) / ((1 + x^(2*k)) * (1 + x^(6*k))).
a(n) = (-1)^n * A258210(n) = A258279(2*n) = A258292(2*n).
a(3*n + 1) = A122865(n). a(3*n + 2) = -2 * A122856(n). a(9*n) = A004018(n). a(9*n + 3) = a(9*n + 6) = 0.
a(4*n + 3) = 0. a(6*n + 2) = -2 * A122865(n). a(12*n + 1) = A002175(n).
Showing 1-10 of 30 results. Next