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 15 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

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

A317665 Expansion of 1/Sum_{k>=0} x^(k^2).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, -2, 3, -3, 1, 2, -6, 10, -11, 8, 0, -14, 29, -39, 38, -18, -22, 74, -123, 144, -110, 6, 161, -352, 491, -484, 251, 235, -896, 1528, -1825, 1452, -191, -1892, 4317, -6164, 6243, -3488, -2482, 10788, -18957, 23140, -19085, 3858, 22025, -52833, 77224, -80198, 47899
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 08 2018

Keywords

Comments

Convolution inverse of A010052.

Examples

			G.f. = 1 - x + x^2 - x^3 + x^5 - 2*x^6 + 3*x^7 - 3*x^8 + x^9 + 2*x^10 - 6*x^11 + ...
		

Crossrefs

Programs

  • Maple
    a:=series(1/add(x^(k^2),k=0..100),x=0,54): seq(coeff(a,x,n),n=0..53); # Paolo P. Lava, Apr 02 2019
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1,
          -add(`if`(issqr(n-j), a(j), 0), j=0..n-1))
        end:
    seq(a(n), n=0..53);  # Alois P. Heinz, Jul 26 2025
  • Mathematica
    nmax = 53; CoefficientList[Series[1/Sum[x^k^2, {k, 0, nmax}], {x, 0, nmax}], x]
    nmax = 53; CoefficientList[Series[2/(1 + QPochhammer[x^2]^5/(QPochhammer[x] QPochhammer[x^4])^2), {x, 0, nmax}], x]
    nmax = 53; CoefficientList[Series[2/(1 + EllipticTheta[3, 0, q]), {q, 0, nmax}], q]
    a[0] = 1; a[n_] := a[n] = -Sum[Boole[IntegerQ[Sqrt[k]]] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 53}]
  • PARI
    seq(n)=Vec(1/(sum(k=0, sqrtint(n), x^(k^2)) + O(x*x^n))) \\ Andrew Howroyd, Aug 08 2018
    
  • PARI
    a(n) = if(n==0, 1, -sum(k=1, n, issquare(k)*a(n-k))); \\ Seiichi Manyama, Mar 19 2022

Formula

G.f.: 2/(1 + theta_3(q)), where theta_3() is the Jacobi theta function.
a(n) = Sum_{k=0..n} (-1)^k * A337165(n,k).
a(0) = 1; a(n) = -Sum_{k=1..n} A010052(k) * a(n-k). - Seiichi Manyama, Mar 19 2022

A274621 Coefficients in the expansion Product_{ n>=1 } (1-q^(2n-1))^2/(1-q^(2n))^2.

Original entry on oeis.org

1, -2, 3, -6, 11, -18, 28, -44, 69, -104, 152, -222, 323, -460, 645, -902, 1254, -1722, 2343, -3174, 4278, -5722, 7601, -10056, 13250, -17358, 22623, -29382, 38021, -48984, 62857, -80404, 102528, -130282, 165002, -208398, 262495, -329666, 412878, -515840, 642941, -799362, 991478
Offset: 0

Views

Author

N. J. A. Sloane, Jul 03 2016

Keywords

Comments

This is the reciprocal of the g.f. for A008441.
From Wolfdieter Lang, Jul 05 2016: (Start)
The g.f. is the square of the one for A106507.
Expansion of 1/(k/(4*q^(1/2)) * (2/Pi)*K(k)) in powers of q^2, where k is the modulus (k^2 is the parameter), K is the real quarter period and q is the Jacobi nome of elliptic functions. See a similar Jul 05 2016 comment on A008441. This appears as a factor in the sn and cn formulas of Abramowitz-Stegun. p. 575, 16.23.1 and 16.23.2. (End)

References

  • 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.

Crossrefs

If the signs are deleted we get A273225.

Programs

  • Mathematica
    nmax = 40; CoefficientList[Series[Product[(1 - x^(2*k-1))^2 / (1 - x^(2*k))^2, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jul 05 2016 *)

Formula

From Wolfdieter Lang, Jul 05 2016: (Start)
G.f.: 1/(theta_2(0, sqrt(q))/(2*q^(1/8)))^2, with the Jacobi theta_2 function.
G.f.: 1/(Sum_{n >= 0} q^(n*(n+1)/2))^2.
G.f.: 1/(Prod_{n >= 1} (1 - q^n) * (1 + q^n)^2)^2 = 1/(Prod_{n >= 1} (1 - q^(2*n)) * (1 + q^n ))^2 = Prod_{n >= 1} (1 - q^(2n-1))^2 / (1 - q^(2n))^2. For the last equality, giving the g.f. of the name, see the Euler identity, mentioned in a Jul 05 2016 comment of A010054. (End)
a(n) ~ (-1)^n * exp(Pi*sqrt(n)) / (2^(5/2)*n^(5/4)). - Vaclav Kotesovec, Jul 05 2016

A286950 Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of Product_{j>=1} (1 - x^j)/(1 - x^(k*j))^k.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, May 17 2017

Keywords

Examples

			Square array begins:
   1, 1,  1,  1,  1, ...
  -1, 0, -1, -1, -1, ...
  -1, 0,  1, -1, -1, ...
   0, 0, -2,  3,  0, ...
   0, 0,  3, -3,  4, ...
		

Crossrefs

Columns k=0-4 give: A010815, A000007, A106507, A286952, A286953.
Diagonal gives A286956.
Cf. A175595.

Formula

G.f. of column k: Product_{j>=1} (1 - x^j)/(1 - x^(k*j))^k.

A143067 Expansion of psi(-x^3) / f(-x^4) in powers of x where psi(), f() are Ramanujan theta functions.

Original entry on oeis.org

1, 0, 0, -1, 1, 0, 0, -1, 2, -1, 0, -2, 3, -1, 0, -3, 5, -2, 1, -5, 7, -3, 1, -7, 11, -5, 2, -11, 15, -7, 4, -15, 22, -11, 6, -22, 30, -15, 9, -30, 42, -22, 14, -42, 56, -31, 20, -56, 77, -43, 29, -77, 101, -58, 41, -101, 135, -80, 57, -135, 176, -106, 78
Offset: 0

Views

Author

Michael Somos, Jul 21 2008

Keywords

Comments

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

Examples

			G.f. = 1 - x^3 + x^4 - x^7 + 2*x^8 - x^9 - 2*x^11 + 3*x^12 - x^13 - 3*x^15 + ...
G.f. = q^5 - q^77 + q^101 - q^173 + 2*q^197 - q^221 - 2*q^269 + 3*q^293 + ...
		

References

  • Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, p. 41, 11th equation.

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QHypergeometricPFQ[ {x}, {-x^2}, x^2, x^3], {x, 0, n}]; (* Michael Somos, Sep 07 2015 *)
    a[ n_] := SeriesCoefficient[ 2^(-1/2) x^(-3/8) EllipticTheta[ 2, Pi/4, x^(3/2)] / QPochhammer[ x^4], {x, 0, n}]; (* Michael Somos, Sep 07 2015 *)
    a[ n_] := SeriesCoefficient[ x^(-5/24) (EllipticTheta[ 3, 0, x^(1/3)] - EllipticTheta[ 3, 0, x^3]) / EllipticTheta[ 2, 0, x^(1/2)], {x, 0, n}]; (* Michael Somos, Jan 10 2017 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^3 + A) * eta(x^12 + A) / (eta(x^4 + A) * eta(x^6 + A)), n))};

Formula

Expansion of f(x, x^5) / f(x, x^3) in powers of x where f(, ) is Ramanujan's general theta function.
Expansion of q^(-5/24) * eta(q^3) * eta(q^12) / (eta(q^4) * eta(q^6)) in powers of q.
Euler transform of period 12 sequence [ 0, 0, -1, 1, 0, 0, 0, 1, -1, 0, 0, 0, ...].
G.f.: (1 + x + x^5 + x^8 + x^16 + x^21 + ...) / (1 + x + x^3 + x^6 + x^10 + ...). [Ramanujan]
G.f.: 1 - x^3 * (1 - x) / (1 - x^4) + x^8 * (1 - x) * (1 - x^3) / ((1 - x^4) * (1 - x^8)) - ... [Ramanujan]
a(2*n) = A262064(n). a(2*n + 3) = - A262090(n).
Convolution of A089801 and A106507. - Michael Somos, Jan 10 2017

A339416 Number of compositions (ordered partitions) of n into an even number of triangular numbers.

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 6, 2, 13, 6, 28, 20, 61, 56, 135, 148, 308, 380, 707, 950, 1654, 2340, 3897, 5714, 9252, 13858, 22055, 33492, 52735, 80744, 126313, 194376, 302906, 467506, 726862, 1123830, 1744947, 2700682, 4190016, 6488824, 10062649, 15588714, 24168232, 37447884
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(9) = 6 because we have [6, 3], [3, 6], [6, 1, 1, 1], [1, 6, 1, 1], [1, 1, 6, 1] and [1, 1, 1, 6].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; local r, f, g;
          if n=0 then t else r, f, g:=$0..2; while f<=n
          do r, f, g:= r+b(n-f, 1-t), f+g, g+1 od; r fi
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 43; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(k (k + 1)/2), {k, 1, nmax}]) + 1/Sum[x^(k (k + 1)/2), {k, 0, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^(k*(k + 1)/2)) + 1 / Sum_{k>=0} x^(k*(k + 1)/2)).
a(n) = (A023361(n) + A106507(n)) / 2.
a(n) = Sum_{k=0..n} A023361(k) * A106507(n-k).

A339417 Number of compositions (ordered partitions) of n into an odd number of triangular numbers.

Original entry on oeis.org

0, 1, 0, 2, 0, 4, 1, 9, 3, 19, 12, 41, 33, 91, 92, 203, 238, 466, 602, 1080, 1493, 2536, 3661, 6001, 8902, 14278, 21554, 34094, 52013, 81602, 125297, 195582, 301475, 469193, 724881, 1126161, 1742206, 2703888, 4186276, 6493192, 10057553, 15594636, 24161364, 37455851
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(8) = 3 because we have [6, 1, 1], [1, 6, 1] and [1, 1, 6].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; local r, f, g;
          if n=0 then t else r, f, g:=$0..2; while f<=n
          do r, f, g:= r+b(n-f, 1-t), f+g, g+1 od; r fi
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 43; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(k (k + 1)/2), {k, 1, nmax}]) - 1/Sum[x^(k (k + 1)/2), {k, 0, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^(k*(k + 1)/2)) - 1 / Sum_{k>=0} x^(k*(k + 1)/2)).
a(n) = (A023361(n) - A106507(n)) / 2.
a(n) = -Sum_{k=0..n-1} A023361(k) * A106507(n-k).

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

Original entry on oeis.org

1, -1, 1, -1, 2, -2, 2, -3, 4, -5, 5, -6, 8, -9, 10, -12, 15, -17, 19, -22, 26, -30, 33, -38, 45, -51, 56, -64, 74, -83, 92, -104, 119, -133, 147, -165, 187, -208, 229, -256, 288, -319, 351, -390, 435, -481, 528, -584, 649, -715, 783, -863, 954, -1047, 1145
Offset: 0

Views

Author

Michael Somos, Nov 06 2015

Keywords

Comments

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

Examples

			G.f. = 1 - x + x^2 - x^3 + 2*x^4 - 2*x^5 + 2*x^6 - 3*x^7 + 4*x^8 - 5*x^9 + ...
G.f. = 1/q - q^15 + q^31 - q^47 + 2*q^63 - 2*q^79 + 2*q^95 - 3*q^111 + ...
		

References

  • Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, p. 41, 16th equation.

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x^4, x^4] / (QPochhammer[ -x, x^8] QPochhammer[ -x^7, x^8]), {x, 0, n}];
    a[ n_] := SeriesCoefficient[ 1 / Product[ (1 + x^(8 k + 1)) (1 - x^(8 k + 4)) (1 + x^(8 k + 7)), {k, 0, Ceiling[ n/8]}], {x, 0, n}];
    a[ n_] := SeriesCoefficient[ Product[ (1 - x^k)^{1, -1, 0, -1, 0, 0, 1, 0, 1, 0, 0, -1, 0, -1, 1, 0}[[Mod[k, 16, 1]]], {k, n}], {x, 0, n}];
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k + x * O(x^n))^[ 0, 1, -1, 0, -1, 0, 0, 1, 0, 1, 0, 0, -1, 0, -1, 1][k%16 + 1]), n))};

Formula

Expansion of f(x^4, x^12) / f(x, x^7) where f(, ) is Ramanujan's general theta function.
Euler transform of period 16 sequence [ -1, 1, 0, 1, 0, 0, -1, 0, -1, 0, 0, 1, 0, 1, -1, 0, ...].
G.f.: 1 / (Product_{k>=0} (1 + x^(8*k + 1)) * (1 - x^(8*k + 4)) * (1 + x^(8*k + 7))).
G.f.: (1 + x^4 + x^12 + x^24 + x^40 + ...) / (1 + x + x^7 + x^10 + x^22 + ...). [Ramanujan]
G.f.: 1 - x * (1 - x) / (1 - x^2) + x^4 * (1 - x) * (1 - x^3) / ((1 - x^2) * (1 - x^4)) - ... [Ramanujan]
a(n) = (-1)^n * A036016(n) = A029838(2*n) = A082303(2*n).
Convolution product of A106507 and A214264.

A259774 Expansion of f(x, x^7) / f(x, x^3) in powers of x where f(, ) is Ramanujan's general theta function.

Original entry on oeis.org

1, 0, 0, -1, 1, -1, 1, -1, 2, -2, 2, -3, 4, -4, 4, -6, 7, -7, 8, -10, 12, -13, 14, -17, 21, -22, 24, -29, 33, -36, 40, -46, 53, -58, 63, -73, 83, -90, 99, -113, 127, -138, 152, -171, 191, -209, 228, -255, 285, -309, 338, -377, 416, -453, 495, -547, 603, -656
Offset: 0

Views

Author

Michael Somos, Nov 08 2015

Keywords

Comments

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

Examples

			G.f. = 1 - x^3 + x^4 - x^5 + x^6 - x^7 + 2*x^8 - 2*x^9 + 2*x^10 - 3*x^11 + ...
G.f. = q^7 - q^55 + q^71 - q^87 + q^103 - q^119 + 2*q^135 - 2*q^151 + ...
		

References

  • Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, p. 41, 15th equation.

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x^4, x^4] / (QPochhammer[ -x^3, x^8] QPochhammer[ -x^5, x^8]), {x, 0, n}];
    a[ n_] := SeriesCoefficient[ 1 / Product[ (1 + x^(8 k + 3)) (1 - x^(8 k + 4)) (1 + x^(8 k + 5)), {k, 0, Ceiling[ n/8]}], {x, 0, n}];
    a[ n_] := SeriesCoefficient[ Product[ (1 - x^k)^{ 0, 0, 1, -1, 1, -1, 0, 0, 0, -1, 1, -1, 1, 0, 0, 0}[[Mod[k, 16, 1]]], {k, n}], {x, 0, n}];
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k + x * O(x^n))^[ 0, 0, 0, 1, -1, 1, -1, 0, 0, 0, -1, 1, -1, 1, 0, 0][k%16 + 1]), n))};

Formula

Expansion of f(x^4, x^12) / f(x^3, x^5) where f(, ) is Ramanujan's general theta function.
Euler transform of period 16 sequence [ 0, 0, -1, 1, -1, 1, 0, 0, 0, 1, -1, 1, -1, 0, 0, 0, ...].
G.f.: (1 + x^4 + x^12 + x^24 + x^40 + ...) / (1 + x^3 + x^5 + x^14 + x^18 + ...). [Ramanujan]
G.f.: 1 - x^3 * (1 - x) / (1 - x^2) + x^8 * (1 - x) * (1 - x^3) / ((1 - x^2) * (1 - x^4)) - ... [Ramanujan]
a(n) = (-1)^n * A036015(n) = A029838(2*n + 1) = - A082303(2*n + 1).
Convolution product of A106507 and A214263.
Showing 1-10 of 15 results. Next