cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-9 of 9 results.

A000141 Number of ways of writing n as a sum of 6 squares.

Original entry on oeis.org

1, 12, 60, 160, 252, 312, 544, 960, 1020, 876, 1560, 2400, 2080, 2040, 3264, 4160, 4092, 3480, 4380, 7200, 6552, 4608, 8160, 10560, 8224, 7812, 10200, 13120, 12480, 10104, 14144, 19200, 16380, 11520, 17400, 24960, 18396, 16440, 24480, 27200
Offset: 0

Views

Author

Keywords

Comments

The relevant identity for the o.g.f. is theta_3(x)^6 = 1 + 16*Sum_{j>=1} j^2*x^j/(1 + x^(2*j)) - 4*Sum_{j >=0} (-1)^j*(2*j+1)^2 *x^(2*j+1)/(1 - x^(2*j+1)), See the Hardy-Wright reference, p. 315, first equation. - Wolfdieter Lang, Dec 08 2016

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 121.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 314.

Crossrefs

Row d=6 of A122141 and of A319574, 6th column of A286815.

Programs

  • Haskell
    a000141 0 = 1
    a000141 n = 16 * a050470 n - 4 * a002173 n
    -- Reinhard Zumkeller, Jun 17 2013
    
  • Maple
    (sum(x^(m^2),m=-10..10))^6;
    # Alternative:
    A000141list := proc(len) series(JacobiTheta3(0, x)^6, x, len+1);
    seq(coeff(%, x, j), j=0..len-1) end: A000141list(40); # Peter Luschny, Oct 02 2018
  • Mathematica
    Table[SquaresR[6, n], {n, 0, 40}] (* Ray Chandler, Dec 06 2006 *)
    SquaresR[6,Range[0,50]] (* Harvey P. Dale, Aug 26 2011 *)
    EllipticTheta[3, 0, z]^6 + O[z]^40 // CoefficientList[#, z]& (* Jean-François Alcover, Dec 05 2019 *)
  • Python
    from math import prod
    from sympy import factorint
    def A000141(n):
        if n == 0: return 1
        f = [(p,e,(0,1,0,-1)[p&3]) for p,e in factorint(n).items()]
        return (prod((p**(e+1<<1)-c)//(p**2-c) for p, e, c in f)<<2)-prod(((k:=p**2*c)**(e+1)-1)//(k-1) for p, e, c in f)<<2 # Chai Wah Wu, Jun 21 2024
  • Sage
    Q = DiagonalQuadraticForm(ZZ, [1]*6)
    Q.representation_number_list(40) # Peter Luschny, Jun 20 2014
    

Formula

Expansion of theta_3(z)^6.
a(n) = 4( Sum_{ d|n, d ==3 mod 4} d^2 - Sum_{ d|n, d ==1 mod 4} d^2 ) + 16( Sum_{ d|n, n/d ==1 mod 4} d^2 - Sum_{ d|n, n/d ==3 mod 4} d^2 ) [Jacobi]. [corrected by Sean A. Irvine, Oct 01 2009]
a(n) = 16*A050470(n) - 4*A002173(n). - Michel Marcus, Dec 15 2012
a(n) = (12/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017

Extensions

Extended by Ray Chandler, Nov 28 2006

A008440 Expansion of Jacobi theta constant theta_2^6 /(64q^(3/2)).

Original entry on oeis.org

1, 6, 15, 26, 45, 66, 82, 120, 156, 170, 231, 276, 290, 390, 435, 438, 561, 630, 651, 780, 861, 842, 1020, 1170, 1095, 1326, 1431, 1370, 1716, 1740, 1682, 2016, 2145, 2132, 2415, 2550, 2353, 2850, 3120, 2810, 3321, 3486, 3285, 3906, 4005, 3722, 4350
Offset: 0

Views

Author

Keywords

Comments

Number of representations of n as sum of 6 triangular numbers. - Michel Marcus, Oct 24 2012. See the Ono et al. link.

Examples

			G.f. = 1 + 6*x + 15*x^2 + 26*x^3 + 45*x^4 + 66*x^5 + 82*x^6 + ... - _Michael Somos_, Jun 25 2019
G.f. = q^3 + 6*q^7 + 15*q^11 + 26*q^15 + 45*q^19 + 66*q^23 + 82*q^27 + ...
		

References

  • B. C. Berndt, Fragments by Ramanujan on Lambert series, in Number Theory and Its Applications, K. Gyory and S. Kanemitsu, eds., Kluwer, Dordrecht, 1999, pp. 35-49, see Entry 6.
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.

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, A002173.

Programs

  • Mathematica
    CoefficientList[(QPochhammer[q^2]^2 / QPochhammer[q])^6 + O[q]^50, q] (* Jean-François Alcover, Nov 05 2015 *)
    a[ n_] := If[ n < 0, 0, -DivisorSum[ 4 n + 3, Re[I^(# - 1)] #^2 &] / 8]; (* Michael Somos, Jun 25 2019 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, (sqrtint(8*n+1)-1)\2, x^((k^2+k)/2), x * O(x^n))^6, n))}; /* Michael Somos, May 23 2006 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^2 / eta(x + A))^6, n))}; /* Michael Somos, May 23 2006 */
    
  • PARI
    {a(n)= -sumdiv(4*n + 3, d, real(I^(d-1))*d^2)/8}; /* Michael Somos, Oct 24 2012 */

Formula

Expansion of Ramanujan phi^6(q) in powers of q.
Expansion of q^(-3/4)(eta(q^2)^2/eta(q))^6 in powers of q.
Euler transform of period 2 sequence [6, -6, ...]. - Michael Somos, May 23 2006
G.f.: (Sum_{n>=0} x^((n^2+n)/2))^6.
a(n) = (-1/8)*Sum_{d divides (4n+3)} Chi_2(4;d)*d^2. - Michel Marcus, Oct 24 2012. See the Ono et al. link. Theorem 4.
a(n) =(-1/8)*A002173(4*n+3). This is the preceding formula. - Wolfdieter Lang, Jan 12 2017
a(0) = 1, a(n) = (6/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
G.f.: exp(Sum_{k>=1} 6*(x^k/k)/(1 + x^k)). - Ilya Gutkovskiy, Jul 31 2017

A322143 Square array A(n,k), n >= 1, k >= 0, read by antidiagonals: A(n,k) = Sum_{d|n, d==1 (mod 4)} d^k - Sum_{d|n, d==3 (mod 4)} d^k.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, -2, 1, 1, 1, -8, 1, 2, 1, 1, -26, 1, 6, 0, 1, 1, -80, 1, 26, -2, 0, 1, 1, -242, 1, 126, -8, -6, 1, 1, 1, -728, 1, 626, -26, -48, 1, 1, 1, 1, -2186, 1, 3126, -80, -342, 1, 7, 2, 1, 1, -6560, 1, 15626, -242, -2400, 1, 73, 6, 0, 1, 1, -19682, 1, 78126, -728, -16806, 1, 703, 26, -10, 0
Offset: 1

Views

Author

Ilya Gutkovskiy, Nov 28 2018

Keywords

Examples

			Square array begins:
  1,  1,   1,    1,    1,     1,  ...
  1,  1,   1,    1,    1,     1,  ...
  0, -2,  -8,  -26,  -80,  -242,  ...
  1,  1,   1,    1,    1,     1,  ...
  2,  6,  26,  126,  626,  3126,  ...
  0, -2,  -8,  -26,  -80,  -242,  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Function[k, SeriesCoefficient[Sum[(-1)^(j - 1) (2 j - 1)^k x^(2 j - 1)/(1 - x^(2 j - 1)), {j, 1, n}], {x, 0, n}]][i - n], {i, 0, 12}, {n, 1, i}] // Flatten

Formula

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

A120030 Expansion of theta_4(q)^2*theta_4(q^2)^4 in powers of q.

Original entry on oeis.org

1, -4, -4, 32, -4, -104, 32, 192, -4, -292, -104, 480, 32, -680, 192, 832, -4, -1160, -292, 1440, -104, -1536, 480, 2112, 32, -2604, -680, 2624, 192, -3368, 832, 3840, -4, -3840, -1160, 4992, -292, -5480, 1440, 5440, -104, -6728, -1536, 7392, 480, -7592, 2112, 8832, 32, -9412, -2604
Offset: 0

Views

Author

Michael Somos, Jun 05 2006

Keywords

Comments

Number 8 of the 74 eta-quotients listed in Table I of Martin (1996).
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

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

References

  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 85, Eq. (32.7).

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(4), 3), 51); A[1] - 4*A[2]; /* Michael Somos, May 24 2015 */
  • Mathematica
    a[ n_] := SeriesCoefficient[ (QPochhammer[ q^2]^3 (QPochhammer[ q] / QPochhammer[ q^4])^2)^2, {q, 0, n}]; (* Michael Somos, May 24 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], -4 DivisorSum[ n, #^2 KroneckerSymbol[ -4, #] &]]; (* Michael Somos, May 24 2015 *)
  • PARI
    {a(n) = if( n<1, n==0, -4 * sumdiv( n, d, d^2 * kronecker( -4, d)))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A)^4 * eta(x^2 + A)^6 / eta(x^4 + A)^4, n))};
    

Formula

Expansion of eta(q)^4 * eta(q^2)^6 / eta(q^4)^4 in powers of q.
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = v^2 * (u - v)^2 - 4 * u*w * (v - w) * (u - 2*v).
Euler transform of period 4 sequence [ -4, -10, -4, -6, ...].
G.f.: 1 - 4 * Sum_{k>0} A056594(k-1) * k^2 * x^k / (1 - x^k).
Expansion of phi(-q)^2 * phi(-q^2)^4 in powers of q where phi(), psi() are Ramanujan theta functions. - Michael Somos, Aug 15 2007
G.f.: (Sum_{k in Z} (-1)^k * x^k^2)^2 * (Sum_{k in Z} (-1)^k * x^(2*k^2))^4.
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = 128 (t/i)^3 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A050470.
a(n) = -4 * A002173(n) unless n=0.
Convolution of A000141 and A128692.

A103440 a(n) = Sum[d|n, d==1 (mod 3), d^2] - Sum[d|n, d==2 (mod 3), d^2].

Original entry on oeis.org

1, -3, 1, 13, -24, -3, 50, -51, 1, 72, -120, 13, 170, -150, -24, 205, -288, -3, 362, -312, 50, 360, -528, -51, 601, -510, 1, 650, -840, 72, 962, -819, -120, 864, -1200, 13, 1370, -1086, 170, 1224, -1680, -150, 1850, -1560, -24, 1584, -2208, 205, 2451, -1803, -288, 2210, -2808, -3, 2880, -2550
Offset: 1

Views

Author

Ralf Stephan, Feb 11 2005

Keywords

Examples

			G.f. = q - 3*q^2 + q^3 + 13*q^4 - 24*q^5 - 3*q^6 + 50*q^7 - 51*q^8 + q^9 + ...
		

Crossrefs

Equals A103637(n) - A103638(n). Cf. A002173.
A109041(n) = -9 * a(n) unless n=0. A014985(n) = a(2^n). -24 * A134340(n) = a(6*n+5).

Programs

  • Maple
    f:= proc(n) local D,d;
      D:= numtheory:-divisors(n/3^padic:-ordp(n,3));
      -add((-1)^(d mod 3)*d^2, d = D)
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 16 2018
  • Mathematica
    a[n_] := Sum[m=Mod[d, 3]; (Boole[m==1]-Boole[m==2]) d^2, {d, Divisors[n]}];
    Array[a, 56] (* Jean-François Alcover, Aug 16 2018 *)
    a[ n_] := SeriesCoefficient[ (1 - QPochhammer[ x]^9 / QPochhammer[ x^3]^3) / 9, {x, 0, n}]; (* Michael Somos, Sep 07 2018 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, d^2 * kronecker( -3, d)))}; /* Michael Somos, Oct 21 2007 */
    
  • PARI
    {a(n) = my(A, p, e, a0, a1, x, y, z); if( n<1, 0, A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==3, 1, z = kronecker( -3, p) * p^2; a0 = 1; a1 = y = z + 1; for(i=2, e, x = y * a1 - z * a0; a0 = a1; a1 = x); a1)))}; /* Michael Somos, Oct 21 2007 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (1 - eta(x + A)^9 / eta(x^3 + A)^3) / 9, n))}; /* Michael Somos, Oct 21 2007 */

Formula

G.f.: F(q) = Sum_{n>=1} A049347(n-1) * n^2 * q^n / (1 - q^n).
G.f.: F(q) = -q * G'(q) / (9*G(q)), with G(q) = Product_{n>=1} (1 - q^n)^(9*n * A049347(n-1)).
a(n) is multiplicative with a(3^e) = 1, a(p^e) = a(p) * a(p^(e-1)) - z * a(p^(e-2)) where z = Kronecker(-3, p) * p^2 and a(p) = z + 1.
a(3*n) = a(n).
G.f.: Sum_{k>0} x^k * (1 - x^k - 6*x^(2*k) - x^(3*k) + x^(4*k)) / (1 + x^k + x^(2*k))^3. - Michael Somos, Oct 21 2007
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - v + w + 3*v^2 - 8*w^2 + 6*v*w - 8*u*w + 6*u*v - 9*v^3 - 54*u*v*w + 72*u*w^2 - 9*u^2*w. - Michael Somos, Dec 23 2007

A050458 Difference between Sum_{d|n, d == 1 (mod 4)} d^2 and Sum_{d|n, d == 3 (mod 4)} d^2.

Original entry on oeis.org

1, 1, 8, 1, 26, 8, 48, 1, 73, 26, 120, 8, 170, 48, 208, 1, 290, 73, 360, 26, 384, 120, 528, 8, 651, 170, 656, 48, 842, 208, 960, 1, 960, 290, 1248, 73, 1370, 360, 1360, 26, 1682, 384, 1848, 120, 1898, 528, 2208, 8, 2353, 651, 2320, 170, 2810, 656, 3120, 48, 2880, 842
Offset: 1

Views

Author

Vladeta Jovovic, Feb 15 2004

Keywords

Crossrefs

a(n) = |A002173(n)|.

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 4] == 1, ((p^2)^(e+1)-1)/(p^2-1), ((p^2)^(e+1)+(-1)^e)/(p^2+1)]; f[2, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Aug 28 2023 *)
  • PARI
    {a(n)=if(n<1, 0, abs(sumdiv(n, d, d^2*kronecker(-4,d))))} /* Michael Somos, Aug 09 2006 */
    
  • PARI
    {a(n)= local(A, p, e); if(n<1, 0, A=factor(n); prod(k=1, matsize(A)[1], if(p=A[k, 1], e=A[k, 2]; if(p==2, 1, if(p%4==1, ((p^2)^(e+1)-1)/(p^2-1), ((p^2)^(e+1)+(-1)^e)/(p^2+1)))))) } /* Michael Somos, Aug 09 2006 */
    
  • PARI
    {a(n)=if(n<1, 0, polcoeff( sum(k=1,n, x^k/(1+x^(2*k))*(k/2^valuation(k,2))^2, x*O(x^n)), n))} /* Michael Somos, Aug 09 2006 */

Formula

Multiplicative with a(p^e) = 1 if p = 2; ((p^2)^(e+1)-1)/(p^2-1) if p == 1 (mod 4); ((p^2)^(e+1)+(-1)^e)/(p^2+1) if p == 3 (mod 4). - Michael Somos, Aug 09 2006

Extensions

Edited by Michael Somos, Aug 09 2006

A050459 a(n) = Sum_{d|n, d==1 mod 4} d^3 - Sum_{d|n, d==3 mod 4} d^3.

Original entry on oeis.org

1, 1, -26, 1, 126, -26, -342, 1, 703, 126, -1330, -26, 2198, -342, -3276, 1, 4914, 703, -6858, 126, 8892, -1330, -12166, -26, 15751, 2198, -18980, -342, 24390, -3276, -29790, 1, 34580, 4914, -43092, 703, 50654, -6858, -57148, 126, 68922, 8892, -79506, -1330
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 1999

Keywords

Comments

Multiplicative because it is the Inverse Möbius transform of [1 0 -3^3 0 5^3 0 -7^3 ...], which is multiplicative. - Christian G. Bower, May 18 2005

Crossrefs

Column k=3 of A322143.

Programs

  • Maple
    A050459 := proc(n) local a; a := 0 ; for d in numtheory[divisors](n) do if d mod 4 = 1 then a := a+d^3 ; elif d mod 4 = 3 then a := a-d^3 ; end if; end do;  a ; end proc:
    seq(A050459(n),n=1..100) ; # R. J. Mathar, Jan 07 2011
  • Mathematica
    s[n_, r_] := DivisorSum[n, #^3 &, Mod[#, 4]==r &]; a[n_] := s[n, 1] - s[n, 3]; Array[a, 30] (* Amiram Eldar, Dec 06 2018 *)
    f[p_, e_] := If[Mod[p, 4] == 1, ((p^3)^(e+1)-1)/(p^3-1), ((-p^3)^(e+1)-1)/(-p^3-1)]; f[2, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Sep 27 2023 *)

Formula

a(n) = A050451(n) - A050454(n).
G.f.: Sum_{k>=1} (-1)^(k-1)*(2*k - 1)^3*x^(2*k-1)/(1 - x^(2*k-1)). - Ilya Gutkovskiy, Dec 22 2018
Multiplicative with a(2^e) = 1, and for an odd prime p, ((p^3)^(e+1)-1)/(p^3-1) if p == 1 (mod 4) and ((-p^3)^(e+1)-1)/(-p^3-1) if p == 3 (mod 4). - Amiram Eldar, Sep 27 2023
a(n) = Sum_{d|n} d^3*sin(d*Pi/2). - Ridouane Oudra, Jun 02 2024

A138502 Expansion of q^(-1/2) * (eta(q)^4 * eta(q^4)^2 / eta(q^2)^3)^2 in powers of q.

Original entry on oeis.org

1, -8, 26, -48, 73, -120, 170, -208, 290, -360, 384, -528, 651, -656, 842, -960, 960, -1248, 1370, -1360, 1682, -1848, 1898, -2208, 2353, -2320, 2810, -3120, 2880, -3480, 3722, -3504, 4420, -4488, 4224, -5040, 5330, -5208, 5760, -6240, 5905, -6888, 7540, -6736, 7922, -8160, 7680
Offset: 0

Views

Author

Michael Somos, Mar 20 2008

Keywords

Comments

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

Examples

			G.f. = 1 - 8*x + 26*x^2 - 48*x^3 + 73*x^4 - 120*x^5 + 170*x^6 - 208*x^7 + ...
g.f. = q - 8*q^3 + 26*q^5 - 48*q^7 + 73*q^9 - 120*q^11 + 170*q^13 - 208*q^15 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ 2 n + 1, #^2 KroneckerSymbol[ -4, #] &]]; (* Michael Somos, Aug 26 2015 *)
    a[ n_] := SeriesCoefficient[ (QPochhammer[ q]^4 QPochhammer[ q^4]^2 / QPochhammer[ q^2]^3)^2, {q, 0, n}]; (* Michael Somos, Aug 26 2015 *)
    a[ n_] := If[ n < 0, 0, Times @@ (Function[ {p, e}, If[ p < 3, 2 - p, With[{f = (-1)^Quotient[p, 2]}, f ((f p^2)^(e + 1) - 1)/(p^2 - f)]]]) @@@ FactorInteger[2 n + 1]]; (* Michael Somos, Aug 26 2015 *)
  • PARI
    {a(n) = if( n<0, 0, n = 2*n + 1; sumdiv( n, d, d^2 * kronecker( -4, d)))};
    
  • PARI
    {a(n) = my(A, p, e, f); if( n<0, 0, n = 2*n + 1; A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, 0, f = (-1)^(p\2); f * ((f*p^2)^(e+1) - 1) / (p^2 - f))))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n) ; polcoeff( (eta(x + A)^4 * eta(x^4 + A)^2 / eta(x^2 + A)^3)^2, n))}

Formula

Expansion of (phi(-q)^2 * psi(q^2))^2 in powers of q where phi(), psi() are Ramanujan theta functions.
Euler transform of period 4 sequence [ -8, -2, -8, -6, ...].
a(n) = b(2*n + 1) where b() is multiplicative and b(2^e) = 0^e, b(p^e) = ((p^2)^(e+1) - 1) / (p^2 - 1) if p == 1 (mod 4), b(p^e) = (-(-p^2)^(e+1) + 1) / (p^2 + 1) if p == 3 (mod 4).
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 256 (t/i)^3 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A138501.
G.f.: (Product_{k>0} (1 - x^k)^3 * (1 + x^(2*k))^2 / (1 + x^k))^2.
a(n) = (-1)^n * A122854(n) = A002173(2*n + 1).

A138505 Expansion of ((phi(q) * phi(-q^2)^2)^2 - 1) / 4 in powers of q where phi() is a Ramanujan theta function.

Original entry on oeis.org

1, -1, -8, -1, 26, 8, -48, -1, 73, -26, -120, 8, 170, 48, -208, -1, 290, -73, -360, -26, 384, 120, -528, 8, 651, -170, -656, 48, 842, 208, -960, -1, 960, -290, -1248, -73, 1370, 360, -1360, -26, 1682, -384, -1848, 120, 1898, 528, -2208, 8, 2353, -651, -2320
Offset: 1

Views

Author

Michael Somos, Mar 21 2008

Keywords

Comments

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

Examples

			G.f. = q - q^2 - 8*q^3 - q^4 + 26*q^5 + 8*q^6 - 48*q^7 - q^8 + 73*q^9 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 1, 0, - DivisorSum[ n, #^2 KroneckerSymbol[ -4, #] (-1)^(n/#) &]]; (* Michael Somos, Sep 25 2015 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, d^2 * kronecker(-4, d) * -(-1)^(n/d)))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( ((eta(x^2 + A)^9 / (eta(x + A)^2 * eta(x^4 + A)^4))^2 - 1) / 4, n))};

Formula

a(n) is multiplicative with a(2^e) = -1 if e>0, a(p^e) = ((p^2)^(e+1) - 1) / (p^2 - 1) if p == 1 (mod 4), a(p^e) = ((-p^2)^(e+1) - 1) / ( -p^2 - 1) if p == 3 (mod 4).
G.f.: Sum_{k>0} -(-1)^k * (2*k-1)^2 * x^(2*k-1) / (1 + x^(2*k-1)).
a(2*n) = (-1)^n * a(n).
4 * a(n) = A138504(n) unless n=0.
a(n) = -(-1)^n * A002173(n). - Michael Somos, Sep 25 2015
Showing 1-9 of 9 results.