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

A010054 a(n) = 1 if n is a triangular number, otherwise 0.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

This is essentially the q-expansion of the Jacobi theta function theta_2(q). (In theta_2 one has to ignore the initial factor of 2*q^(1/4) and then replace q by q^(1/2). See also A005369.) - N. J. A. Sloane, Aug 03 2014
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Ramanujan's theta function f(a, b) = Sum_{n=-inf..inf} a^(n*(n+1)/2) * b^(n*(n-1)/2).
This sequence is the concatenation of the base-b digits in the sequence b^n, for any base b >= 2. - Davis Herring (herring(AT)lanl.gov), Nov 16 2004
Number of partitions of n into distinct parts such that the greatest part equals the number of all parts, see also A047993; a(n)=A117195(n,0) for n > 0; a(n) = 1-A117195(n,1) for n > 1. - Reinhard Zumkeller, Mar 03 2006
Triangle T(n,k), 0 <= k <= n, read by rows, given by A000007 DELTA A000004 where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 03 2009
Convolved with A000041 = A022567, the convolution square of A000009. - Gary W. Adamson, Jun 11 2009
A008441(n) = Sum_{k=0..n} a(k)*a(n-k). - Reinhard Zumkeller, Nov 03 2009
Polcoeff inverse with alternate signs = A006950: (1, 1, 1, 2, 3, 4, 5, 7, ...). - Gary W. Adamson, Mar 15 2010
This sequence is related to Ramanujan's two-variable theta functions because this sequence is also the characteristic function of generalized hexagonal numbers. - Omar E. Pol, Jun 08 2012
Number 3 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016
Number of partitions of n into consecutive parts that contain 1 as a part, n >= 1. - Omar E. Pol, Nov 27 2020
The constant whose decimal expansion is this sequence is irrational (Mahler, 1981). The constant whose expansion in any base b >= 2 is this sequence is irrational (Bundschuh, 1984). - Amiram Eldar, Mar 23 2025

Examples

			G.f. = 1 + x + x^3 + x^6 + x^10 + x^15 + x^21 + x^28 + x^36 + x^45 + x^55 + x^66 + ...
G.f. for B(q) = q * A(q^8): q + q^9 + q^25 + q^49 + q^81 + q^121 + q^169 + q^225 + q^289 + q^361 + ...
From _Philippe Deléham_, Jan 04 2008: (Start)
As a triangle this begins:
  1;
  1, 0;
  1, 0, 0;
  1, 0, 0, 0;
  1, 0, 0, 0, 0;
  1, 0, 0, 0, 0, 0;
  ...  (End)
		

References

  • J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, 1999, p. 103.
  • Michael D. Hirschhorn, The Power of q, Springer, 2017. See Psi, page 9.
  • Jules Tannery and Jules Molk, Eléments de la Théorie des Fonctions Elliptiques, Vol. 2, Gauthier-Villars, Paris, 1902; Chelsea, NY, 1972, see p. 27.
  • Edmund T. Whittaker and George N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.

Crossrefs

Number of ways of writing n as a sum of k triangular numbers, for k=1,...: A010054, A008441, A008443, A008438, A008439, A008440, A226252, A007331, A226253, A226254, A226255, A014787, A014809.
Cf. A106507 (reciprocal series).

Programs

  • Clojure
    (def A010054 (mapcat #(cons 1 (replicate % 0)) (range))) ; Tony Zorman, Apr 03 2023
  • Haskell
    a010054 = a010052 . (+ 1) . (* 8)
    a010054_list = concatMap (\x -> 1 : replicate x 0) [0..]
    -- Reinhard Zumkeller, Feb 12 2012, Oct 22 2011, Apr 02 2011
    
  • Magma
    Basis( ModularForms( Gamma0(16), 1/2), 362) [2] ; /* Michael Somos, Jun 10 2014 */
    
  • Maple
    A010054 := proc(n)
        if issqr(1+8*n) then
            1;
        else
            0;
        end if;
    end proc:
    seq(A010054(n),n=0..80) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    a[ n_] := SquaresR[ 1, 8 n + 1] / 2; (* Michael Somos, Nov 15 2011 *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ (Series[ EllipticTheta[ 3, Log[y] / (2 I), x^2], {x, 0, n + Floor @ Sqrt[n]}] // Normal // TrigToExp) /. {y -> x}, {x, 0, n}]]; (* Michael Somos, Nov 15 2011 *)
    Table[If[IntegerQ[(Sqrt[8n+1]-1)/2],1,0],{n,0,110}] (* Harvey P. Dale, Oct 29 2012 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, q^(1/2)] / (2 q^(1/8)), {q, 0, n}]; (* Michael Somos, Jul 01 2014 *)
    Module[{tr=Accumulate[Range[20]]},If[MemberQ[tr,#],1,0]&/@Range[Max[tr]]] (* Harvey P. Dale, Mar 13 2023 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^2 / eta(x + A), n))}; /* Michael Somos, Mar 14 2011 */
    
  • PARI
    {a(n) = issquare( 8*n + 1)}; /* Michael Somos, Apr 27 2000 */
    
  • PARI
    a(n) = ispolygonal(n, 3); \\ Michel Marcus, Jan 22 2015
    
  • Python
    from sympy import integer_nthroot
    def A010054(n): return int(integer_nthroot((n<<3)+1,2)[1]) # Chai Wah Wu, Nov 15 2022
    
  • Sage
    # uses[EulerTransform from A166861]
    b = BinaryRecurrenceSequence(-1, 0)
    a = EulerTransform(b)
    print([a(n) for n in range(88)]) # Peter Luschny, Nov 17 2022
    

Formula

Expansion of f(x, x^3) in powers of x where f(, ) is Ramanujan's general theta function.
Expansion of q^(-1) * (phi(q) - phi(q^4)) / 2 in powers of q^8. - Michael Somos, Jul 01 2014
Expansion of q^(-1/8) * eta(q^2)^2 / eta(q) in powers of q. - Michael Somos, Apr 13 2005
Euler transform of period 2 sequence [ 1, -1, ...]. - Michael Somos, Mar 24 2003
Given g.f. A(x), then B(q) = q * A(q^8) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1*u6^3 + u2*u3^3 - u1*u2^2*u6. - Michael Somos, Apr 13 2005
a(n) = b(8*n + 1) where b()=A098108() is multiplicative with b(2^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p > 2. - Michael Somos, Jun 06 2005
a(n) = A005369(2*n). - Michael Somos, Apr 29 2003
G.f.: theta_2(sqrt(q)) / (2 * q^(1/8)).
G.f.: 1 / (1 - x / (1 + x / (1 + x^1 / (1 - x / (1 + x / (1 + x^2 / (1 - x / (1 + x / (1 + x^3 / ...))))))))). - Michael Somos, May 11 2012
G.f.: Product_{k>0} (1-x^(2*k))/(1-x^(2*k-1)). - Vladeta Jovovic, May 02 2002
a(0)=1; for n>0, a(n) = A002024(n+1)-A002024(n). - Benoit Cloitre, Jan 05 2004
G.f.: Sum_{j>=0} Product_{k=0..j} x^j. - Jon Perry, Mar 30 2004
a(n) = floor((1-cos(Pi*sqrt(8*n+1)))/2). - Carl R. White, Mar 18 2006
a(n) = round(sqrt(2n+1)) - round(sqrt(2n)). - Hieronymus Fischer, Aug 06 2007
a(n) = ceiling(2*sqrt(2n+1)) - floor(2*sqrt(2n)) - 1. - Hieronymus Fischer, Aug 06 2007
a(n) = f(n,0) with f(x,y) = if x > 0 then f(x-y,y+1), otherwise 0^(-x). - Reinhard Zumkeller, Sep 27 2008
a(n) = A035214(n) - 1.
From Mikael Aaltonen, Jan 22 2015: (Start)
Since the characteristic function of s-gonal numbers is given by floor(sqrt(2n/(s-2) + ((s-4)/(2s-4))^2) + (s-4)/(2s-4)) - floor(sqrt(2(n-1)/(s-2) + ((s-4)/(2s-4))^2) + (s-4)/(2s-4)), by setting s = 3 we get the following: For n > 0, a(n) = floor(sqrt(2*n+1/4)-1/2) - floor(sqrt(2*(n-1)+1/4)-1/2).
(End)
a(n) = (-1)^n * A106459(n). - Michael Somos, May 04 2016
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 2^(-1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A002448. - Michael Somos, May 05 2016
G.f.: Sum_{n >= 0} x^(n*(n+1)/2) = Product_{n >= 1} (1 - x^n)*(1 + x^n)^2 = Product_{n >= 1} (1 - x^(2*n))*(1 + x^n) = Product_{n >= 1} (1 - x^(2*n))/(1 - x^(2*n-1)). From the sum and product representations of theta_2(0, sqrt(q))/(2*q^(1/8)) function. The last product, given by Vladeta Jovovic above, is obtained from the second to last one by an Euler identity, proved via f(x) := Product_{n >= 1} (1 - x^(2*n-1))*Product_{n >= 1} (1 + x^n) = f(x^2), by moving the odd-indexed factors of the second product to the first product. This leads to f(x) = f(0) = 1. - Wolfdieter Lang, Jul 05 2016
a(0) = 1, a(n) = (1/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, Apr 08 2017
G.f.: Sum_{n >= 0} x^n * Product_{k >= n+1} (1 - x^(2*k)) = 1/(1 - x) * Sum_{n >= 0} x^(3*n) * Product_{k >= n+1} (1 - x^(2*k)) = 1/((1 - x)*(1 - x^3)) * Sum_{n >= 0} x^(5*n) * Product_{k >= n+1} (1 - x^(2*k)) = .... - Peter Bala, Jun 24 2025

Extensions

Additional comments from Michael Somos, Apr 27 2000

A000122 Expansion of Jacobi theta function theta_3(x) = Sum_{m =-oo..oo} x^(m^2) (number of integer solutions to k^2 = n).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (the present sequence), psi(q) (A010054), chi(q) (A000700).
Theta series of the one-dimensional lattice Z.
Also, essentially the same as the theta series of the one-dimensional lattices A_1, A*_1, D_1, D*_1.
Number of ways of writing n as a square.
Closely related: theta_4(x) = Sum_{m = -oo..oo} (-x)^(m^2). See A002448.
Number 6 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016

Examples

			G.f. = 1 + 2*q + 2*q^4 + 2*q^9 + 2*q^16 + 2*q^25 + 2*q^36 + 2*q^49 + 2*q^64 + 2*q^81 + ...
		

References

  • Tom M. Apostol, Modular Functions and Dirichlet Series in Number Theory, Second edition, Springer, 1990, Exercise 1, p. 91.
  • Richard Bellman, A Brief Introduction to Theta Functions, Dover, 2013.
  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 64.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 104, [5n].
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 93, Eq. (34.1); p. 78, Eq. (32.22).
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 133.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Sixth Edition, Clarendon Press, Oxford, 2009, Theorem 352, p. 372.
  • J. Tannery and J. Molk, Eléments de la Théorie des Fonctions Elliptiques, Vol. 2, Gauthier-Villars, Paris, 1902; Chelsea, NY, 1972, see p. 27.
  • E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.

Crossrefs

1st column of A286815. - Seiichi Manyama, May 27 2017
Row d=1 of A122141.
Cf. A002448 (theta_4). Partial sums give A001650.
Cf. A000007, A004015, A004016, A008444, A008445, A008446, A008447, A008448, A008449 (Theta series of lattices A_0, A_3, A_2, A_4, ...).

Programs

  • Julia
    using Nemo
    function JacobiTheta3(len, r)
        R, x = PolynomialRing(ZZ, "x")
        e = theta_qexp(r, len, x)
        [fmpz(coeff(e, j)) for j in 0:len - 1] end
    A000122List(len) = JacobiTheta3(len, 1)
    A000122List(105) |> println # Peter Luschny, Mar 12 2018
    
  • Magma
    Basis( ModularForms( Gamma0(4), 1/2), 100) [1]; /* Michael Somos, Jun 10 2014 */
    
  • Magma
    L := Lattice("A",1); A := ThetaSeries(L, 20); A; /* Michael Somos, Nov 13 2014 */
    
  • Maple
    add(x^(m^2),m=-10..10): seq(coeff(%,x,n), n=0..100);
    # alternative
    A000122 := proc(n)
        if n = 0 then
            1;
        elif issqr(n) then
            2;
        else
            0 ;
        end if;
    end proc:
    seq(A000122(n),n=0..100) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q], {q, 0, n}]; (* Michael Somos, Jul 11 2011 *)
    CoefficientList[ Sum[ x^(m^2), {m, -(n=10), n} ], x ]
    SquaresR[1, Range[0, 104]] (* Robert G. Wilson v, Jul 16 2014 *)
    QP = QPochhammer; s = QP[q^2]^5/(QP[q]*QP[q^4])^2 + O[q]^105; CoefficientList[s, q] (* Jean-François Alcover, Nov 24 2015 *)
    (4 QPochhammer[q^2]/QPochhammer[-1,-q]^2 + O[q]^101)[[3]] (* Vladimir Reshetnikov, Sep 16 2016 *)
  • 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, n))}; /* Michael Somos, Mar 14 2011 */
    
  • PARI
    {a(n) = issquare(n) * 2 -(n==0)}; /* Michael Somos, Jun 17 1999 */
    
  • Python
    from sympy.ntheory.primetest import is_square
    def A000122(n): return is_square(n)<<1 if n else 1 # Chai Wah Wu, May 17 2023
  • Sage
    Q = DiagonalQuadraticForm(ZZ, [1])
    Q.representation_number_list(105) # Peter Luschny, Jun 20 2014
    

Formula

Expansion of eta(q^2)^5 / (eta(q)*eta(q^4))^2 in powers of q.
Euler transform of period 4 sequence [2, -3, 2, -1, ...].
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - v^2 + 2 * w * (w - u). - Michael Somos, Jul 20 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^3), A(x^9)) where f(u, v, w) = w^4 - v^4 + w * (u - w)^3. - Michael Somos, May 11 2019
G.f.: Sum_{m=-oo..oo} x^(m^2);
a(0) = 1; for n > 0, a(n) = 0 unless n is a square when a(n) = 2.
G.f.: Product_{k>0} (1 - x^(2*k))*(1 + x^(2*k-1))^2.
G.f.: s(2)^5/(s(1)^2*s(4)^2), where s(k) := subs(q=q^k, eta(q)), where eta(q) is Dedekind's function, cf. A010815. [Fine]
The Jacobi triple product identity states that for |x| < 1, z != 0, Product_{n>0} {(1-x^(2n))(1+x^(2n-1)z)(1+x^(2n-1)/z)} = Sum_{n=-inf..inf} x^(n^2)*z^n. Set z=1 to get theta_3(x).
For n > 0, a(n) = 2*(floor(sqrt(n))-floor(sqrt(n-1))). - Mikael Aaltonen, Jan 17 2015
G.f. is a period 1 Fourier series which satisfies f(-1/(4 t)) = 2^(1/2) (t/i)^(1/2) f(t) where q = exp(2 Pi i t). - Michael Somos, May 05 2016
a(n) = A000132(n)(mod 4). - John M. Campbell, Jul 07 2016
a(n) = (2/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
a(n) = 2 * A010052(n) if n>0. a(3*n + 1) = 2 * A089801(n). a(3*n + 2) = 0. a(4*n) = a(n). a(4*n + 2) = a(4*n + 3) = 0. a(8*n + 1) = 2 * A010054(n). - Michael Somos, May 11 2019
Dirichlet g.f.: 2*zeta(2s). - Francois Oger, Oct 26 2019 [Corrected by Sean A. Irvine, Nov 26 2024]
G.f. appears to equal exp( 2*Sum_{n >= 0} x^(2*n+1)/((2*n+1)*(1 + x^(2*n+1))) ). - Peter Bala, Dec 23 2021
From Peter Bala, Sep 27 2023: (Start)
G.f. A(x) satisfies A(x)*A(-x) = A(-x^2)^2.
A(x) = Sum_{n >= 1} x^(n-1)*Product_{k >= n} 1 - (-x)^k.
A(x)^2 = 1 + 4*Sum_{n >= 1} (-1)^(n+1)*x^(2*n-1)/(1 - x^(2*n-1)), which gives the number of representations of an integer as a sum of two squares. See, for example, Fine, 26.63.
A(x) = 1 + 2*Sum_{n >= 1} x^(n*(n+1)/2) * ( Product_{k = 1..n-1} 1 + x^k ) /( Product_{k = 1..n} 1 + x^(2*k) ). See Fine, equation 14.43. (End)

A015128 Number of overpartitions of n: an overpartition of n is an ordered sequence of nonincreasing integers that sum to n, where the first occurrence of each integer may be overlined.

Original entry on oeis.org

1, 2, 4, 8, 14, 24, 40, 64, 100, 154, 232, 344, 504, 728, 1040, 1472, 2062, 2864, 3948, 5400, 7336, 9904, 13288, 17728, 23528, 31066, 40824, 53408, 69568, 90248, 116624, 150144, 192612, 246256, 313808, 398640, 504886, 637592, 802936, 1008448
Offset: 0

Views

Author

Keywords

Comments

The over-partition function.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Also the number of jagged partitions of n.
According to Ramanujan (1913) a(n) is close to (cosh(x)-sinh(x)/x)/(4*n) where x=Pi*sqrt(n). - Michael Somos, Mar 17 2003
Number of partitions of 2n with all odd parts occurring with even multiplicities. There is no restriction on the even parts. Cf. A006950, A046682. - Mamuka Jibladze, Sep 05 2003
Number of partitions of n where there are two kinds of odd parts. - Joerg Arndt, Jul 30 2011. Or, in Gosper's words, partitions into red integers and blue odd integers. - N. J. A. Sloane, Jul 04 2016.
Coincides with the sequence of numbers of nilpotent conjugacy classes in the Lie algebras sp(n), n=0,1,2,3,... (the case n=0 being degenerate). A006950, this sequence and A000041 together cover the nilpotent conjugacy classes in the classical A,B,C,D series of Lie algebras. - Alexander Elashvili, Sep 08 2003
Also, number of 01-partitions of n. A 01-partition of n is a weakly decreasing sequence of m nonnegative integers n(i) such that sum(n(i))=n, n(m)>0, n(j)>=n(j+1)-1 and n(j)>=n(j+2). They are special cases of jagged partitions.
a(8n+7) is divisible by 64 (from Fortin/Jacob/Mathieu paper).
Smallest sequence of even numbers (except a(0)) which is the Euler transform of a sequence of positive integers. - Franklin T. Adams-Watters, Oct 16 2006
Convolution of A000041 and A000009. - Vladeta Jovovic, Nov 26 2002
Equals A022567 convolved with A035363. - Gary W. Adamson, Jun 09 2009
Equals the infinite product [1,2,2,2,...] * [1,0,2,0,2,0,2,...] * [1,0,0,2,0,0,2,0,0,2,...] * ... . - Gary W. Adamson, Jul 05 2009
Equals A182818 convolved with A010815. - Gary W. Adamson, Jul 20 2012
Partial sums of A211971. - Omar E. Pol, Jan 09 2014
Also 1 together with the row sums of A235790. - Omar E. Pol, Jan 19 2014
Antidiagonal sums of A284592. - Peter Bala, Mar 30 2017
The overlining method is equivalent to enumerating the k-subsets of the distinct parts of the i-th partition. - Richard Joseph Boland, Sep 02 2021

Examples

			G.f. = 1 + 2*q + 4*q^2 + 8*q^3 + 14*q^4 + 24*q^5 + 40*q^6 + 64*q^7 + 100*q^8 + ...
For n = 4 the 14 overpartitions of 4 are [4], [4'], [2, 2], [2', 2], [3, 1], [3', 1], [3, 1'], [3', 1'], [2, 1, 1], [2', 1, 1], [2, 1', 1], [2', 1', 1], [1, 1, 1, 1], [1', 1, 1, 1]. - _Omar E. Pol_, Jan 19 2014
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 103.
  • R. W. Gosper, Experiments and discoveries in q-trigonometry, in Symbolic Computation, Number Theory, Special Functions, Physics and Combinatorics. Editors: F. G. Garvan and M. E. H. Ismail. Kluwer, Dordrecht, Netherlands, 2001, pp. 79-105. See the function g(q).
  • James R. Newman, The World of Mathematics, Simon and Schuster, 1956, Vol. I p. 372.

Crossrefs

See A004402 for a version with signs.
Column k=2 of A321884.
Cf. A002513.

Programs

  • Julia
    # JacobiTheta4 is defined in A002448.
    A015128List(len) = JacobiTheta4(len, -1)
    A015128List(40) |> println # Peter Luschny, Mar 12 2018
    
  • Maple
    mul((1+x^n)/(1-x^n),n=1..256): seq(coeff(series(%,x,n+1),x,n), n=0..40);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1) +2*add(b(n-i*j, i-1), j=1..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 10 2014
    a_list := proc(len) series(1/JacobiTheta4(0,x),x,len+1); seq(coeff(%,x,j),j=0..len) end: a_list(39); # Peter Luschny, Mar 14 2017
  • Mathematica
    max = 39; f[x_] := Exp[Sum[(DivisorSigma[1, 2*n] - DivisorSigma[1, n])*(x^n/n), {n, 1, max}]]; CoefficientList[ Series[f[x], {x, 0, max}], x] (* Jean-François Alcover, Jun 11 2012, after Joerg Arndt *)
    a[ n_] := SeriesCoefficient[ QHypergeometricPFQ[ {-1}, {}, x, x], {x, 0, n}]; (* Michael Somos, Mar 11 2014 *)
    QP = QPochhammer; s = QP[q^2]/QP[q]^2 + O[q]^40; CoefficientList[s + O[q]^100, q] (* Jean-François Alcover, Nov 25 2015, after Michael Somos *)
    Table[Sum[PartitionsP[n-k]*PartitionsQ[k], {k, 0, n}], {n, 0, 50}] (* Vaclav Kotesovec, Nov 28 2015 *)
    (QPochhammer[-x, x]/QPochhammer[x, x] + O[x]^50)[[3]] (* Vladimir Reshetnikov, Nov 12 2016 *)
    nmax = 100; p = ConstantArray[0, nmax+1]; p[[1]] = 1; Do[p[[n+1]] = 0; k = 1; While[n + 1 - k^2 > 0, p[[n+1]] += (-1)^(k+1)*p[[n + 1 - k^2]]; k++;]; p[[n+1]] = 2*p[[n+1]];, {n, 1, nmax}]; p (* Vaclav Kotesovec, Apr 11 2017 *)
    a[ n_] := SeriesCoefficient[ 1 / EllipticTheta[ 4, 0, x], {x, 0, n}]; (* Michael Somos, Nov 15 2018 *)
    a[n_] := Sum[2^Length[Union[IntegerPartitions[n][[i]]]], {i, 1, PartitionsP[n]}]; (* Richard Joseph Boland, Sep 02 2021 *)
    n = 39; CoefficientList[Product[(1 + x^k)/(1 - x^k), {k, 1, n}] + O[x]^(n + 1), x] (* Oliver Seipel, Sep 19 2021 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A)^2, n))}; /* Michael Somos, Nov 01 2008 */
    
  • PARI
    {a(n)=polcoeff(exp(sum(m=1,n\2+1,2*x^(2*m-1)/(1-x^(2*m-1)+x*O(x^n))/(2*m-1))),n)} /* Paul D. Hanna, Aug 06 2009 */
    
  • PARI
    N=66; x='x+O('x^N); gf=exp(sum(n=1,N,(sigma(2*n)-sigma(n))*x^n/n));Vec(gf) /* Joerg Arndt, Jul 30 2011 */
    
  • PARI
    lista(nn) = {q='q+O('q^nn); Vec(eta(q^2)/eta(q)^2)} \\ Altug Alkan, Mar 20 2018
    
  • SageMath
    # uses[EulerTransform from A166861]
    a = BinaryRecurrenceSequence(0, 1, 1, 2)
    b = EulerTransform(a)
    print([b(n) for n in range(40)]) # Peter Luschny, Nov 11 2020

Formula

Euler transform of period 2 sequence [2, 1, ...]. - Michael Somos, Mar 17 2003
G.f.: Product_{m>=1} (1 + q^m)/(1 - q^m).
G.f.: 1 / (Sum_{m=-inf..inf} (-q)^(m^2)) = 1/theta_4(q).
G.f.: 1 / Product_{m>=1} (1 - q^(2*m)) * (1 - q^(2*m-1))^2.
G.f.: exp( Sum_{n>=1} 2*x^(2*n-1)/(1 - x^(2*n-1))/(2*n-1) ). - Paul D. Hanna, Aug 06 2009
G.f.: exp( Sum_{n>=1} (sigma(2*n) - sigma(n))*x^n/n ). - Joerg Arndt, Jul 30 2011
G.f.: Product_{n>=0} theta_3(q^(2^n))^(2^n). - Joerg Arndt, Aug 03 2011
A004402(n) = (-1)^n * a(n). - Michael Somos, Mar 17 2003
Expansion of eta(q^2) / eta(q)^2 in powers of q. - Michael Somos, Nov 01 2008
Expansion of 1 / phi(-q) in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Nov 01 2008
Convolution inverse of A002448. - Michael Somos, Nov 01 2008
Recurrence: a(n) = 2*Sum_{m>=1} (-1)^(m+1) * a(n-m^2).
a(n) = (1/n)*Sum_{k=1..n} (sigma(2*k) - sigma(k))*a(n-k). - Vladeta Jovovic, Dec 05 2004
G.f.: Product_{i>=1} (1 + x^i)^A001511(2i) (see A000041). - Jon Perry, Jun 06 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = w^4 * (u^4 + v^4) - 2 * u^2 * v^6. - Michael Somos, Nov 01 2008
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u6^3 * (u1^2 + u3^2) - 2 * u1 * u2 * u3^3. - Michael Somos, Nov 01 2008
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u2^3 * (u3^2 - 3 * u1^2) + 2 * u1^3 * u3 * u6. - Michael Somos, Nov 01 2008
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 32^(-1/2) (t/i)^(-1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A106507. - Michael Somos, Nov 01 2008
a(n) = 2*A014968(n), n >= 1. - Omar E. Pol, Jan 19 2014
a(n) ~ Pi * BesselI(3/2, Pi*sqrt(n)) / (4*sqrt(2)*n^(3/4)). - Vaclav Kotesovec, Jan 11 2017
Let T(n,k) = the number of partitions of n with parts 1 through k of two kinds, T(n,0) = A000041(n), the number of partitions of n. Then a(n) = T(n,0) + T(n-1,1) + T(n-3,2) + T(n-6,3) + T(n-10,4) + T(n-15,5) + ... . Gregory L. Simay, May 29 2019
For n >= 1, a(n) = Sum_{k>=1} 2^k * A116608(n,k). - Gregory L. Simay, Jun 01 2019
Sum_{n>=1} 1/a(n) = A303662. - Amiram Eldar, Nov 15 2020
a(n) = Sum_{i=1..p(n)} 2^(d(n,i)), where d(n,i) is the number of distinct parts in the i-th partition of n. - Richard Joseph Boland, Sep 02 2021
G.f.: A(x) = exp( Sum_{n >= 1} x^n*(2 + x^n)/(n*(1 - x^(2*n))) ). - Peter Bala, Dec 23 2021
G.f. A(q) satisfies (3*A(q)/A(q^9) - 1)^3 = 9*A(q)^4/A(q^3)^4 - 1. - Paul D. Hanna, Oct 14 2024

Extensions

Minor edits by Vaclav Kotesovec, Sep 13 2014

A001934 Expansion of 1/theta_4(q)^2 in powers of q.

Original entry on oeis.org

1, 4, 12, 32, 76, 168, 352, 704, 1356, 2532, 4600, 8160, 14176, 24168, 40512, 66880, 108876, 174984, 277932, 436640, 679032, 1046016, 1597088, 2418240, 3632992, 5417708, 8022840, 11802176, 17252928, 25070568, 36223424, 52053760, 74414412
Offset: 0

Views

Author

Keywords

Comments

Euler transform of period 2 sequence [ 4, 2, ...].
The Cayley reference actually is to A004403. - Michael Somos, Feb 24 2011
Number of overpartition pairs, see Lovejoy reference. - _Joerg Arndt, Apr 03 2011
In general, if g.f. = Product_{k>=1} ((1+x^k)/(1-x^k))^m and m>=1, then a(n) ~ exp(Pi*sqrt(m*n)) * m^((m+1)/4) / (2^(3*(m+1)/2) * n^((m+3)/4)). - Vaclav Kotesovec, Aug 17 2015

References

  • A. Cayley, A memoir on the transformation of elliptic functions, Collected Mathematical Papers. Vols. 1-13, Cambridge Univ. Press, London, 1889-1897, Vol. 9, p. 128.
  • 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

  • Julia
    # JacobiTheta4 is defined in A002448.
    A001934List(len) = JacobiTheta4(len, -2)
    A001934List(33) |> println # Peter Luschny, Mar 12 2018
  • Maple
    mul((1+x^n)^2/(1-x^n)^2,n=1..256);
  • Mathematica
    CoefficientList[Series[1/EllipticTheta[4, 0, q]^2, {q, 0, 32}], q]  (* Jean-François Alcover, Jul 18 2011 *)
    nmax = 40; CoefficientList[Series[Product[((1 + x^k)/(1 - x^k))^2, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 17 2015 *)
    QP = QPochhammer; s = QP[q^2]^2/QP[q]^4 + O[q]^40; CoefficientList[s, q] (* Jean-François Alcover, Dec 01 2015, adapted from PARI *)
  • PARI
    my(N=33, x='x+O('x^N)); Vec(prod(i=1, N, (1+x^i)^2/(1-x^i)^2))
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^2 / eta(x + A)^4, n))} /* Michael Somos, Feb 09 2006 */
    

Formula

G.f.: Product ( 1 - x^k )^{-c(k)}, c(k) = 4, 2, 4, 2, 4, 2, ....
G.f.: Product{i>=1} (1+x^i)^2/(1-x^i)^2. - Jon Perry, Apr 04 2004
Expansion of eta(q^2)^2/eta(q)^4 in powers of q, where eta(x)=prod(n>=1,1-q^n).
a(n) = (-1)^n * A004403(n). a(n) = 4 * A002318(n) unless n=0. - Michael Somos, Feb 24 2011
a(n) ~ exp(Pi*sqrt(2*n)) / (2^(15/4) * n^(5/4)) * (1 - 15/(8*Pi*sqrt(2*n)) + 105/(256*Pi^2*n)). - Vaclav Kotesovec, Aug 17 2015, extended Jan 22 2017
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(2*k) - sigma(k))*x^k/k). - Ilya Gutkovskiy, Sep 19 2018
The g.f. A(q^2) = 1/(F(q)*F(-q)), where F(q) = theta_3(q) = Sum_{n = -oo..oo} q^(n^2) is the g.f. of A000122. Cf. A002513. - Peter Bala, Sep 26 2023

Extensions

More terms from James Sellers, Sep 08 2000
Edited by N. J. A. Sloane, May 13 2008 to remove an incorrect g.f.

A096727 Expansion of eta(q)^8 / eta(q^2)^4 in powers of q.

Original entry on oeis.org

1, -8, 24, -32, 24, -48, 96, -64, 24, -104, 144, -96, 96, -112, 192, -192, 24, -144, 312, -160, 144, -256, 288, -192, 96, -248, 336, -320, 192, -240, 576, -256, 24, -384, 432, -384, 312, -304, 480, -448, 144, -336, 768, -352, 288, -624, 576, -384, 96, -456, 744, -576, 336, -432, 960, -576, 192
Offset: 0

Views

Author

Michael Somos, Jul 06 2004

Keywords

Comments

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

Examples

			G.f. = 1 - 8*q + 24*q^2 - 32*q^3 + 24*q^4 - 48*q^5 + 96*q^6 - 64*q^7 + 24*q^8 - ...
		

Crossrefs

Programs

  • Julia
    # JacobiTheta4 is defined in A002448.
    A096727List(len) = JacobiTheta4(len, 4)
    A096727List(57) |> println # Peter Luschny, Mar 12 2018
  • Magma
    A := Basis( ModularForms( Gamma0(4), 2), 57); A[1] - 8*A[2]; /* Michael Somos, Aug 21 2014 */
    
  • Mathematica
    CoefficientList[ Series[1 + Sum[k(-8x^k/(1 - x^k) + 48x^(2k)/(1 - x^(2k)) - 64x^(4k)/(1 - x^(4k))), {k, 1, 60}], {x, 0, 60}], x] (* Robert G. Wilson v, Jul 14 2004 *)
    a[ n_] := With[{m = InverseEllipticNomeQ @ q}, SeriesCoefficient[ q Dt[ Log @ m, q], {q, 0, n}]]; (* Michael Somos, Sep 06 2012 *)
    a[ n_] := (-1)^n SquaresR[ 4, n]; (* Michael Somos, Jun 12 2014 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, q]^4, {q, 0, n}]; (* Michael Somos, Jun 12 2014 *)
    QP = QPochhammer; s = QP[q]^8/QP[q^2]^4 + O[q]^60; CoefficientList[s, q] (* Jean-François Alcover, Nov 23 2015 *)
  • PARI
    {a(n) = if( n<1, n==0, 8 * (-1)^n * sumdiv( n, d, if( d%4, d)))};
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x *O (x^n); polcoeff( eta(x + A)^8 / eta(x^2 + A)^4, n))};
    
  • Sage
    A = ModularForms( Gamma0(4), 2, prec=57) . basis(); A[0] - 8*A[1]; # Michael Somos, Jun 12 2014
    

Formula

a(n) = -8*sigma(n) + 48*sigma(n/2) - 64*sigma(n/4) for n>0, where sigma(n) = A000203(n) if n is an integer, otherwise 0.
Euler transform of period 2 sequence [ -8, -4, ...].
G.f.: Prod_{k>0} (1 - x^k)^8 / (1 - x^(2k))^4 = 1 + Sum_{k>0} k * (-8 * x^k / (1 - x^k) + 48 * x^(2*k) /(1 - x^(2*k)) - 64 * x^(4*k)/(1 - x^(4*k))).
G.f. theta_4(q)^4 = (Sum_{k} (-q)^(k^2))^4.
Expansion of phi(-q)^4 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Nov 01 2006
G.f. A(x) satisfies 0 = f(A(x), A(x^3), A(x^9)) where f(u, v, w) = v^4 - 30*u*v^2*w + 12*u*v*w * (u + 9*w) - u*w * (u^2 + 9*w*u + 81*w^2).
a(n) = (-1)^n * A000118(n). a(n) = 8 * A109506(n) unless n=0. a(2*n) = A004011(n). a(2*n + 1) = -A005879(n).
a(0) = 1, a(n) = -(8/n)*Sum_{k=1..n} A002131(k)*a(n-k) for n > 0. - Seiichi Manyama, May 02 2017

A098108 a(n) = 1 if n is an odd square, otherwise 0.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, Nov 03 2004

Keywords

Comments

Motivated by expansion of Jacobi theta function theta_2(x) = Sum_{m = -oo..oo} x^((m+1/2)^2) = 2*Sum_{m odd > 0} q^(m^2/4).
a(n) for n >= 1 is also equal to the Ramanujan number A000594(n) read mod 2. This follows from a theorem started by V. Kumar Murty (2011). Thanks to Benoit Cloitre for this reference. - N. J. A. Sloane, Aug 29 2017
The identification of this sequence with A000594 mod 2 was answered in Mathematics Stack Exchange question 71251. The idea is that (1 - q - q^2 + q^5 + q^7 - ...)^3 = 1 - 3*q + 5*q^3 - 7*q^6 + ... . Reduce mod 2 giving 1 + q + q^3 + q^6 + ... and using (x + y)^2 == (x^2 + y^2) (mod 2) three times gives (1 + q + q^3 + q^6 + ...)^8 == (1 + q^8 + q^24 + q^48 + ...) (mod 2) and we are done. - Michael Somos, Sep 12 2017

Examples

			G.f. = q + q^9 + q^25 + q^49 + q^81 + q^121 + q^169 + q^225 + q^289 + q^361 + ...
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 104, [5n].
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
  • Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 93, Eq. (34.12).
  • E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.

Crossrefs

Cf. A000122 (theta_3), A002448 (theta_4).

Programs

  • Maple
    add(x^((m+1/2)^2),m=-10..10);
    # alternative
    A098108 := proc(n)
        if issqr(n) and type(n,'odd') then
            1;
        else
            0 ;
        end if;
    end proc:
    seq(A098108(n),n=0..30) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    Table[If[OddQ@ n && IntegerQ@ Sqrt[n], 1, 0], {n, 0, 120}] (* Michael De Vlieger, Mar 08 2015 *)
    Array[Boole@ OddQ@ RamanujanTau@ # &, 120] (* Michael De Vlieger, Aug 27 2017 *)
  • PARI
    {a(n) = n%2 && issquare( n)}; /* Michael Somos, Jun 08 2012 */
    
  • PARI
    A126811(n) = (ramanujantau(n)%2); \\ Antti Karttunen, Aug 27 2017

Formula

Multiplicative with a(p^e) = 1 if 2 divides e and p > 2, 0 otherwise. - Mitch Harris, Jun 09 2005
Dirichlet g.f.: zeta(2*s)*(1-2^(-2*s)). - R. J. Mathar, Mar 10 2011
G.f.: theta_2( 0, q^4) / 2. - Michael Somos, Jun 08 2012
Euler transform of period 16 sequence [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, ...]. - Michael Somos, Jun 08 2012
a(8*n + 1) = A010054(n). a(n) = 0 unless n == 1 (mod 8). - Michael Somos, Jun 08 2012
a(n) = A000035(n)*A010052(n). - Michel Marcus, Jun 09 2014
For n > 0, a(n) = floor( (sqrt(n)+1)/2 ) - floor( (sqrt(n-1)+1)/2 ). - Mikael Aaltonen, Mar 08 2015
G.f.: eta quotient eta(16*tau)^2/eta(8*tau) = q*Product_{n>=1} (1-q^(16*n))^2 / Product_{n>=1} (1-q^(8*n)), with q = exp(2*Pi*I*z), Im(z) > 0. See the Ono et al. reference, p. 4. - Wolfdieter Lang, Jan 11 2017
Sum_{k=1..n} a(k) ~ sqrt(n)/2. - Amiram Eldar, Oct 28 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

A035016 Fourier coefficients of E_{0,4}.

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
Offset: 0

Views

Author

Barry Brent (barryb(AT)primenet.com)

Keywords

Comments

E_{0,4} is unique normalized entire modular form of weight 4 for \Gamma_0(2) with a zero at zero. Also |a(n)| matches expansion of theta_3(z)^8 (A000143).
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 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).

Crossrefs

Programs

  • Julia
    # JacobiTheta4 is defined in A002448.
    A035016List(len) = JacobiTheta4(len, 8)
    A035016List(34) |> println # Peter Luschny, Mar 12 2018
  • Maple
    a_list := proc(len) series(JacobiTheta4(0,x)^8,x,len+1); seq(coeff(%,x,j),j=0..len) end: a_list(33); # Peter Luschny, Mar 14 2017
  • Mathematica
    a[0] = 1; a[n_] := 16*Sum[(-1)^d*d^3, {d, Divisors[n]}]; Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Feb 06 2012, after Pari *)
    QP = QPochhammer; s = QP[q]^16/QP[q^2]^8 + O[q]^40; CoefficientList[s, q] (* Jean-François Alcover, Nov 25 2015 *)
  • PARI
    {a(n) = if( n<1, n==0, 16 * sumdiv( n, d, (-1)^d * d^3))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod( k=1, n, (1 - x^k) / (1 + x^k), 1 + x * O(x^n))^8, n))};
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x^n * O(x); polcoeff( (eta(x + A)^2 / eta(x^2 + A))^8, n))}; /* Michael Somos, Jan 11 2009 */
    
  • Python
    from sympy import divisors
    def a(n): return 1 if n==0 else 16*sum((-1)**d*d**3 for d in divisors(n))
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 24 2017
    
  • Sage
    A = ModularForms( Gamma0(4), 4, prec=34) . basis(); A[0] - 16*A[1] + 112*A[2]; # Michael Somos, Jun 15 2014
    

Formula

a(0)=1; for n>0, a(n) = 16*sum_{0
G.f.: Product_{n>=1} ((1-q^n)/(1+q^n))^8 [Fine]
Expansion of phi(-q)^8 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Jun 15 2014
Expansion of eta(q)^16 / eta(q^2)^8 in powers of q.
Euler transform of period 2 sequence [ -16, -8, ...]. - Michael Somos, Apr 10 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = v^3 + u*v * (u - 2*v + 16*w) - 16 * u*w^2. - Michael Somos, Apr 10 2005
G.f. is a period 1 Fourier series which satisfies f(-1 / (2 t)) = 256 (t / i)^4 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A007331. - Michael Somos, Jan 11 2009
a(n) = (-1)^n * A000143(n).
Convolution square of A096727. - Michael Somos, Jun 15 2014

A089802 Expansion of q^(-1/3) * (theta_4(q^3) - theta_4(q^(1/3))) / 2 in powers of q.

Original entry on oeis.org

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

Author

Eric W. Weisstein, Nov 12 2003

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Number 10 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016

Examples

			G.f. = 1 - x - x^5 + x^8 + x^16 - x^21 - x^33 + x^40 + x^56 - x^65 - x^85 + ...
G.f. = q - q^4 - q^16 + q^25 + q^49 - q^64 - q^100 + q^121 + q^169 - q^196 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 4, 0, x^3] - EllipticTheta[ 4, 0, x^(1/3)]) / (2 x^(1/3)), {x, 0, n}]; (* Michael Somos, Jun 30 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x, x^2] EllipticTheta[ 2, 0, x^(3/2)] / (2 x^(3/8)), {x, 0, n}]; (* Michael Somos, Jun 30 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x, x^2] QPochhammer[ -x^3, x^3] QPochhammer[ x^6], {x, 0, n}]; (* Michael Somos, Jun 30 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x, x^6] QPochhammer[ x^5, x^6] QPochhammer[ x^6], {x, 0, n}]; (* Michael Somos, Jun 30 2015 *)
    a[ n_] := (-1)^n Sign @ SquaresR[ 1, 3 n + 1]; (* Michael Somos, Jun 30 2015 *)
  • PARI
    {a(n) = (-1)^n * issquare(3*n + 1)}; /* Michael Somos, Apr 12 2005 */

Formula

Expansion of q^(-1/3) * (eta(q) * eta(q^6)^2) / (eta(q^2) * eta(q^3)) in powers of q. - Michael Somos, Apr 12 2005
Expansion of chi(-x) * psi(x^3) in powers of x where psi(), chi() are Ramanujan theta functions. - Michael Somos, Dec 23 2011
Expansion of f(-x, -x^5) in powers of x, where f(, ) is Ramanujan's general theta function.
a(n) = b(3*n + 1) where b() is multiplicative with b(3^e) = 0^e, b(2^e) = - (1 + (-1)^e) / 2 if e>0, b(p^e) = (1 + (-1)^e) / 2 if p>3.
G.f. is a period 1 Fourier series which satisfies f(-1 / (144 t)) = 8^(1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A089812. - Michael Somos, Dec 23 2011
Euler transform of period 6 sequence [-1, 0, 0, 0, -1, -1, ...]. - Michael Somos, Apr 12 2005
abs(a(n)) is the characteristic function of A001082. - Michael Somos, Oct 31 2005
G.f.: Sum_{k in Z} (-1)^k * x^((3*k^2 - 2*k)) = Product_{k>0} (1 - x^(6*k)) * (1 - x^(6*k - 1)) * (1 - x^(6*k - 5)). - Michael Somos, Oct 31 2005
A002448(3*n + 1) = -2 * a(n). - Michael Somos, Jul 07 2006
a(n) = (-1)^n * A089801(n).
a(n) = -(1/n)*Sum_{k=1..n} A284362(k)*a(n-k), a(0) = 1. - Seiichi Manyama, Mar 25 2017

Extensions

Corrected by N. J. A. Sloane, Nov 05 2005

A143184 Coefficients of a Ramanujan q-series.

Original entry on oeis.org

1, 1, 2, 4, 6, 10, 15, 23, 33, 49, 69, 98, 136, 188, 256, 348, 466, 622, 824, 1084, 1418, 1846, 2389, 3077, 3947, 5038, 6407, 8115, 10241, 12876, 16141, 20160, 25110, 31179, 38609, 47674, 58724, 72141, 88421, 108114, 131902, 160565, 195061, 236468
Offset: 0

Author

Michael Somos, Jul 28 2008

Keywords

Comments

Also equal to the number of overpartitions of n with no non-overlined parts larger than the number of overlined parts. For example, the overpartitions counted by a(4) = 6 are: [4'], [3',1], [3',1'], [2',1,1], [2',1',1], [1',1,1,1]. - Jeremy Lovejoy, Aug 23 2021
Also the number of partitions into red and blue integers, where the red parts cover an initial segment of the positive integers, and there can be no blue integer if there is not also a red one with the same value. For example, when the red integers are marked with a prime, the partitions counted by a(4) are: [2',1',1], [2',1',1'], [1',1,1,1], [1',1',1,1], [1',1',1',1], [1',1',1',1']. - Christian Sievers, May 09 2025

Examples

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

References

  • S. Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, p. 10

Crossrefs

Convolution with A002448 is A132211.
Cf. A015128 (has definition of overpartitions).

Programs

  • Maple
    b:= proc(n, i) option remember;
         `if`(i>n, 0, `if`(irem(n, i, 'r')=0, r, 0)+
          add(j*b(n-i*j, i+1), j=1..n/i))
        end:
    a:= n-> `if`(n=0, 1, b(n, 1)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Oct 03 2018
  • Mathematica
    m = 50;
    Sum[x^(k(k+1)/2)/Product[1-x^j, {j, 1, k}]^2, {k, 0, m}] + O[x]^m // CoefficientList[#, x]& (* Jean-François Alcover, Nov 20 2020 *)
  • PARI
    {a(n) = my(t); if(n<0, 0, t = 1 + x*O(x^n); polcoef(sum(k=1, (sqrtint(8*n + 1) - 1)\2, t = t*x^k/(1 - x^k)^2 + x*O(x^n), 1), n))};

Formula

G.f.: Sum_{k>=0} x^((k^2+k)/2) / ((1 - x) * (1 - x^2) ... (1 - x^k))^2.
a(n) ~ exp(2*Pi*sqrt(n/5)) / (2^(3/2) * 5^(3/4) * n). - Vaclav Kotesovec, Nov 20 2020
Showing 1-10 of 83 results. Next