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-3 of 3 results.

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

Original entry on oeis.org

1, 4, 8, 16, 26, 32, 48, 64, 73, 104, 120, 128, 170, 192, 208, 256, 290, 292, 360, 416, 384, 480, 528, 512, 651, 680, 656, 768, 842, 832, 960, 1024, 960, 1160, 1248, 1168, 1370, 1440, 1360, 1664, 1682, 1536, 1848, 1920, 1898, 2112, 2208, 2048, 2353, 2604
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 1999

Keywords

Comments

Number 7 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).
Multiplicative because it is the Dirichlet convolution of A000290 = n^2 and A101455 = [1 0 -1 0 1 0 -1 ...], which are both multiplicative. - Christian G. Bower, May 17 2005

Examples

			G.f. = q + 4*q^2 + 8*q^3 + 16*q^4 + 26*q^5 + 32*q^6 + 48*q^7 + 64*q^8 + ...
		

Crossrefs

Programs

  • Haskell
    a050470 n = a050461 n - a050465 n  -- Reinhard Zumkeller, Mar 06 2012
    
  • Magma
    Basis( ModularForms( Gamma1(4), 3), 51) [2]; /* Michael Somos, May 17 2015 */
    
  • Mathematica
    a[ n_] := SeriesCoefficient[ q (QPochhammer[ q^2]^3 (QPochhammer[ q^4] / QPochhammer[ q])^2)^2, {q, 0, n}]; (* Michael Somos, May 17 2015 *)
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] EllipticTheta[ 2, 0, q]^2 / 4)^2, {q, 0, n}]; (* Michael Somos, May 17 2015 *)
    a[ n_] := If[ n < 1, 0, Sum[ d^2 Mod[n/d, 2] (-1)^Quotient[n/d, 2], {d, Divisors@n}]]; (* Michael Somos, May 17 2015 *)
    s[n_] := If[OddQ[n], (-1)^((n-1)/2), 0]; (* A101455 *)
    f[p_, e_] := (p^(2*e+2) - s[p]^(e+1))/(p^2 - s[p]); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 04 2023 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, d^2 * (n/d%2) * (-1)^(n/d\2)))};
    
  • PARI
    {a(n) = my(A); if( n<1, 0, n--; A = x * O(x^n); polcoeff( eta(x^2 + A)^6 * (eta(x^4 + A) / eta(x + A))^4, n))}; /* Michael Somos, May 17 2015 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A050470(n): return prod((p**(e+1<<1)-(m:=(0,1,0,-1)[p&3]))//(p**2-m) for p, e in factorint(n).items()) # Chai Wah Wu, Jun 21 2024

Formula

G.f.: Sum_{n>=1} n^2*x^n/(1+x^(2*n)). - Vladeta Jovovic, Oct 16 2002
From Michael Somos, Aug 08 2005: (Start)
Euler transform of period 4 sequence [ 4, -2, 4, -6, ...].
Expansion of eta(q^2)^6 * eta(q^4)^4 / eta(q)^4 in powers of q.
G.f.: x Product_{k>0} (1 + x^k)^4 * (1 - x^(2*k))^2 * (1 - x^(4*k))^4.
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u*w * (u - 8*v) * (v - 4*w) - v^2 * (v - 8*w)^2. (End)
G.f.: Sum_{k>0} Kronecker(-4, k) * x^k * (1 + x^k) / (1 - x^k)^3. - Michael Somos, Sep 02 2005
Expansion of q * phi(q)^2 * psi(q^2)^4 in powers of q where phi(), psi() are Ramanujan theta functions. - Michael Somos, Aug 15 2007
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = (1/2) (t/i)^3 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A120030.
a(n) = A050461(n) - A050465(n). - Reinhard Zumkeller, Mar 06 2012
Multiplicative with a(p^e) = ((p^2)^(e+1) - Chi(p)^(e+1))/(p^2 - Chi(p)), Chi = A101455. - Jianing Song, Oct 30 2019
Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = Pi^3/32 (A153071). - Amiram Eldar, Nov 04 2023
a(n) = Sum_{d|n} (n/d)^2*sin(d*Pi/2). - Ridouane Oudra, Sep 26 2024

A002173 a(n) = Sum_{d|n, d == 1 mod 4} d^2 - 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
Offset: 1

Views

Author

Keywords

Comments

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

Examples

			The divisors of 15 are 1,3,5,15, so a(15)=(1^2+5^2)-(3^2+15^2) = -208.
G.f. = x + x^2 - 8*x^3 + x^4 + 26*x^5 - 8*x^6 - 48*x^7 + x^8 + 73*x^9 + ... - _Michael Somos_, Jun 25 2019
		

References

  • Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 85, Eq. (32.7).
  • 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

  • Haskell
    a002173 n = a050450 n - a050453 n  -- Reinhard Zumkeller, Jun 17 2013
    
  • Maple
    with(numtheory):
    A002173:= proc(n)
        local count1, count3, d;
        count1 := 0:
        count3 := 0:
        for d in numtheory[divisors](n) do
            if d mod 4 = 1 then
                count1 := count1+d^2
            elif d mod 4 = 3 then
                count3 := count3+d^2
            fi:
        end do:
        count1-count3;
    end proc: # Ridouane Oudra, Feb 21 2023
    # second Maple program:
    a:= n-> add(`if`(d::odd, d^2*(-1)^((d-1)/2), 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Ridouane Oudra, Feb 21 2023
  • Mathematica
    QP = QPochhammer; s = (1-QP[q]^4*(QP[q^2]^6/QP[q^4]^4))/(4*q) + O[q]^60; CoefficientList[s, q] (* Jean-François Alcover, Nov 27 2015 *)
    a[ n_] := SeriesCoefficient[ (1 - EllipticTheta[ 4, 0, q]^2 EllipticTheta[ 4, 0, q^2]^4) / 4, {q, 0, n}]; (* Michael Somos, Jun 25 2019 *)
    f[p_, e_] := If[Mod[p, 4] == 1, ((p^2)^(e+1)-1)/(p^2-1), ((-p^2)^(e+1)-1)/(-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, sumdiv(n, d, d^2 * kronecker(-4, d)))} /* Michael Somos, Aug 09 2006 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A002173(n): return prod(((m:=p**2*(0,1,0,-1)[p&3])**(e+1)-1)//(m-1) for p, e in factorint(n).items()) # Chai Wah Wu, Jun 21 2024

Formula

a(n) = A050450(n) - A050453(n).
A120030(n) = -4*a(n), if n>0.
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)/(-p^2-1) if p == 3 (mod 4). - David W. Wilson, Sep 01 2001 [This can be written as a single formula: a(p^e) = ((p^2*Chi(p))^(e+1) - 1)/(p^2*Chi(p) - 1), Chi = A101455. - Jianing Song, Oct 30 2019]
G.f.: Sum_{n>=1} A056594(n-1)*n^2*q^n/(1-q^n).
Expansion of (1 - theta_4(q)^2 * theta_4(q^2)^4)/4 in powers of q. - Michael Somos, Aug 09 2006
Expansion of (1-eta(q)^4*eta(q^2)^6/eta(q^4)^4)/4 in powers of q.
G.f.: q*G'(q)/G(q), with G(q) = Product_{n>=1} (1-q^n)^(4n*A056594(n+1)).
a(n) = Sum_{d|n} d^2*sin(d*Pi/2). - Ridouane Oudra, Feb 21 2023
G.f.: Sum_{n>=0} (4*n + 1)^2*x^(4*n + 1)/(1 - x^(4*n + 1)) - (4*n + 3)^2*x^(4*n + 3)/(1 - x^(4*n + 3)). - Miles Wilson, Oct 26 2024

Extensions

More terms from David W. Wilson

A138504 Expansion of (eta(q^2)^9 / (eta(q)^2 * eta(q^4)^4))^2 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, -9280
Offset: 0

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. = 1 + 4*q - 4*q^2 - 32*q^3 - 4*q^4 + 104*q^5 + 32*q^6 - 192*q^7 - 4*q^8 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ (QPochhammer[ q^2]^9 / (QPochhammer[ q]^2 QPochhammer[ q^4]^4))^2, {q, 0, n}]; (* Michael Somos, May 24 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], -4 DivisorSum[ n, #^2 KroneckerSymbol[ -4, #] (-1)^(n/#) &]]; (* Michael Somos, May 24 2015 *)
  • PARI
    {a(n) = if( n<1, n==0, -4 * 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, n))};

Formula

Expansion of (phi(q) * phi(-q^2)^2)^2 in powers of q where phi() is a Ramanujan theta function.
Euler transform of period 4 sequence [ 4, -14, 4, -6, ...].
a(n) = 4 * b(n) where a(0) = 1, b(n) is multiplicative with b(2^e) = -1 if e>0, 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 / (4 t)) = 32 (t/i)^3 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A122854.
G.f.: 1 + 4 * Sum_{k>0} -(-1)^k * (2*k-1)^2 * x^(2*k-1) / (1 + x^(2*k-1)).
a(n) = (-1)^n * A120030(n). a(n) = 4 * A138505(n) unless n=0.
Showing 1-3 of 3 results.