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

A260342 A002175 omitting the terms where A002107 is zero.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 30 2015

Keywords

References

  • J. W. L. Glaisher, On the square of Euler's series, Proc. London Math. Soc., 21 (1889), 182-194. See Table I.

Crossrefs

A002654 Number of ways of writing n as a sum of at most two nonzero squares, where order matters; also (number of divisors of n of form 4m+1) - (number of divisors of form 4m+3).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Glaisher calls this E(n) or E_0(n). - N. J. A. Sloane, Nov 24 2018
Number of sublattices of Z X Z of index n that are similar to Z X Z; number of (principal) ideals of Z[i] of norm n.
a(n) is also one fourth of the number of integer solutions of n = x^2 + y^2 (order and signs matter, and 0 (without signs) is allowed). a(n) = N(n)/4, with N(n) from p. 147 of the Niven-Zuckermann reference. See also Theorem 5.12, p. 150, which defines a (strongly) multiplicative function h(n) which coincides with A056594(n-1), n >= 1, and N(n)/4 = sum(h(d), d divides n). - Wolfdieter Lang, Apr 19 2013
a(2+8*N) = A008441(N) gives the number of ways of writing N as the sum of 2 (nonnegative) triangular numbers for N >= 0. - Wolfdieter Lang, Jan 12 2017
Coefficients of Dedekind zeta function for the quadratic number field of discriminant -4. See A002324 for formula and Maple code. - N. J. A. Sloane, Mar 22 2022

Examples

			4 = 2^2, so a(4) = 1; 5 = 1^2 + 2^2 = 2^2 + 1^2, so a(5) = 2.
x + x^2 + x^4 + 2*x^5 + x^8 + x^9 + 2*x^10 + 2*x^13 + x^16 + 2*x^17 + x^18 + ...
2 = (+1)^2 + (+1)^2 = (+1)^2 + (-1)^2  = (-1)^2 + (+1)^2 = (-1)^2 + (-1)^2. Hence there are 4 integer solutions, called N(2) in the Niven-Zuckerman reference, and a(2) = N(2)/4 = 1.  4 = 0^1 + (+2)^2 = (+2)^2 + 0^2 = 0^2 + (-2)^2 = (-2)^2 + 0^2. Hence N(4) = 4 and a(4) = N(4)/4 = 1. N(5) = 8, a(5) = 2. - _Wolfdieter Lang_, Apr 19 2013
		

References

  • J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 194.
  • George Chrystal, Algebra: An elementary text-book for the higher classes of secondary schools and for colleges, 6th ed., Chelsea Publishing Co., New York, 1959, Part II, p. 346 Exercise XXI(17). MR0121327 (22 #12066)
  • Emil Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 15.
  • Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers, New York: John Wiley, 1980, pp. 147 and 150.
  • Günter Scheja and Uwe Storch, Lehrbuch der Algebra, Tuebner, 1988, p. 251.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 89.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 340.

Crossrefs

Equals 1/4 of A004018. Partial sums give A014200.
Cf. A002175, A008441, A121444, A122856, A122865, A022544, A143574, A000265, A027748, A124010, A025426 (two squares, order does not matter), A120630 (Dirichlet inverse), A101455 (Mobius transform), A000089, A241011.
If one simply reads the table in Glaisher, PLMS 1884, which omits the zero entries, one gets A213408.
Dedekind zeta functions for imaginary quadratic number fields of discriminants -3, -4, -7, -8, -11, -15, -19, -20 are A002324, A002654, A035182, A002325, A035179, A035175, A035171, A035170, respectively.
Dedekind zeta functions for real quadratic number fields of discriminants 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 40 are A035187, A035185, A035194, A035195, A035199, A035203, A035188, A035210, A035211, A035215, A035219, A035192, respectively.

Programs

  • Haskell
    a002654 n = product $ zipWith f (a027748_row m) (a124010_row m) where
       f p e | p `mod` 4 == 1 = e + 1
             | otherwise      = (e + 1) `mod` 2
       m = a000265 n
    -- Reinhard Zumkeller, Mar 18 2013
    
  • Maple
    with(numtheory):
    A002654 := proc(n)
        local count1, count3, d;
        count1 := 0:
        count3 := 0:
        for d in numtheory[divisors](n) do
            if d mod 4 = 1 then
                count1 := count1+1
            elif d mod 4 = 3 then
                count3 := count3+1
            fi:
        end do:
        count1-count3;
    end proc:
    # second Maple program:
    a:= n-> add(`if`(d::odd, (-1)^((d-1)/2), 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 04 2020
  • Mathematica
    a[n_] := Count[Divisors[n], d_ /; Mod[d, 4] == 1] - Count[Divisors[n], d_ /; Mod[d, 4] == 3]; a/@Range[105] (* Jean-François Alcover, Apr 06 2011, after R. J. Mathar *)
    QP = QPochhammer; CoefficientList[(1/q)*(QP[q^2]^10/(QP[q]*QP[q^4])^4-1)/4 + O[q]^100, q] (* Jean-François Alcover, Nov 24 2015 *)
    f[2, e_] := 1; f[p_, e_] := If[Mod[p, 4] == 1, e + 1, Mod[e + 1, 2]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
    Rest[CoefficientList[Series[EllipticTheta[3, 0, q]^2/4, {q, 0, 100}], q]] (* Vaclav Kotesovec, Mar 10 2023 *)
  • PARI
    direuler(p=2,101,1/(1-X)/(1-kronecker(-4,p)*X))
    
  • PARI
    {a(n) = polcoeff( sum(k=1, n, x^k / (1 + x^(2*k)), x * O(x^n)), n)}
    
  • PARI
    {a(n) = sumdiv( n, d, (d%4==1) - (d%4==3))}
    
  • PARI
    {a(n) = local(A); A = x * O(x^n); polcoeff( eta(x^2 + A)^10 / (eta(x + A) * eta(x^4 + A))^4 / 4, n)} \\ Michael Somos, Jun 03 2005
    
  • PARI
    a(n)=my(f=factor(n>>valuation(n,2))); prod(i=1,#f~, if(f[i,1]%4==1, f[i,2]+1, (f[i,2]+1)%2)) \\ Charles R Greathouse IV, Sep 09 2014
    
  • PARI
    my(B=bnfinit(x^2+1)); vector(100,n,#bnfisintnorm(B,n)) \\ Joerg Arndt, Jun 01 2024
    
  • Python
    from math import prod
    from sympy import factorint
    def A002654(n): return prod(1 if p == 2 else (e+1 if p % 4 == 1 else (e+1) % 2) for p, e in factorint(n).items()) # Chai Wah Wu, May 09 2022

Formula

Dirichlet series: (1-2^(-s))^(-1)*Product (1-p^(-s))^(-2) (p=1 mod 4) * Product (1-p^(-2s))^(-1) (p=3 mod 4) = Dedekind zeta-function of Z[ i ].
Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m, p)+1)*p^(-s)+Kronecker(m, p)*p^(-2s))^(-1) for m = -16.
If n=2^k*u*v, where u is product of primes 4m+1, v is product of primes 4m+3, then a(n)=0 unless v is a square, in which case a(n) = number of divisors of u (Jacobi).
Multiplicative with a(p^e) = 1 if p = 2; e+1 if p == 1 (mod 4); (e+1) mod 2 if p == 3 (mod 4). - David W. Wilson, Sep 01 2001
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = (u - v)^2 - (v - w) * (4*w + 1). - Michael Somos, Jul 19 2004
G.f.: Sum_{n>=1} ((-1)^floor(n/2)*x^((n^2+n)/2)/(1+(-x)^n)). - Vladeta Jovovic, Sep 15 2004
Expansion of (eta(q^2)^10 / (eta(q) * eta(q^4))^4 - 1)/4 in powers of q.
G.f.: Sum_{k>0} x^k / (1 + x^(2*k)) = Sum_{k>0} -(-1)^k * x^(2*k - 1) / (1 - x^(2*k - 1)). - Michael Somos, Aug 17 2005
a(4*n + 3) = a(9*n + 3) = a(9*n + 6) = 0. a(9*n) = a(2*n) = a(n). - Michael Somos, Nov 01 2006
a(4*n + 1) = A008441(n). a(3*n + 1) = A122865(n). a(3*n + 2) = A122856(n). a(12*n + 1) = A002175(n). a(12*n + 5) = 2 * A121444(n). 4 * a(n) = A004018(n) unless n=0.
a(n) = Sum_{k=1..n} A010052(k)*A010052(n-k). a(A022544(n)) = 0; a(A001481(n)) > 0.
- Reinhard Zumkeller, Sep 27 2008
a(n) = A001826(n) - A001842(n). - R. J. Mathar, Mar 23 2011
a(n) = Sum_{d|n} A056594(d-1), n >= 1. See the above comment on A056594(d-1) = h(d) of the Niven-Zuckerman reference. - Wolfdieter Lang, Apr 19 2013
Dirichlet g.f.: zeta(s)*beta(s) = zeta(s)*L(chi_2(4),s). - Ralf Stephan, Mar 27 2015
G.f.: (theta_3(x)^2 - 1)/4, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018
a(n) = Sum_{ m: m^2|n } A000089(n/m^2). - Andrey Zabolotskiy, May 07 2018
a(n) = A053866(n) + 2 * A025441(n). - Andrey Zabolotskiy, Apr 23 2019
a(n) = Im(Sum_{d|n} i^d). - Ridouane Oudra, Feb 02 2020
a(n) = Sum_{d|n} sin((1/2)*d*Pi). - Ridouane Oudra, Jan 22 2021
Sum_{n>=1} (-1)^n*a(n)/n = Pi*log(2)/4 (Covo, 2010). - Amiram Eldar, Apr 07 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/4 = 0.785398... (A003881). - Amiram Eldar, Oct 11 2022
From Vaclav Kotesovec, Mar 10 2023: (Start)
Sum_{k=1..n} a(k)^2 ~ n * (log(n) + C) / 4, where C = A241011 =
4*gamma - 1 + log(2)/3 - 2*log(Pi) + 8*log(Gamma(3/4)) - 12*Zeta'(2)/Pi^2 = 2.01662154573340811526279685971511542645018417752364748061...
The constant C, published by Ramanujan (1916, formula (22)), 4*gamma - 1 + log(2)/3 - log(Pi) + 4*log(Gamma(3/4)) - 12*Zeta'(2)/Pi^2 = 2.3482276258576... is wrong! (End)

A008441 Number of ways of writing n as the sum of 2 triangular numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700). The present sequence gives the expansion coefficients of psi(q)^2.
Also the number of positive odd solutions to equation x^2 + y^2 = 8*n + 2. - Seiichi Manyama, May 28 2017

Examples

			G.f. = 1 + 2*x + x^2 + 2*x^3 + 2*x^4 + 3*x^6 + 2*x^7 + 2*x^9 + 2*x^10 + 2*x^11 + ...
G.f. for B(q) = q * A(q^4) = q + 2*q^5 + q^9 + 2*q^13 + 2*q^17 + 3*q^25 + 2*q^29 + 2*q^37 + 2*q^41 + ...
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag. See p. 139 Example (iv).
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
  • R. W. Gosper, Strip Mining in the Abandoned Orefields of Nineteenth Century Mathematics, in Computers in Mathematics (Ed. D. V. Chudnovsky and R. D. Jenks). New York: Dekker, 1990. See p. 279.
  • 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 Pi_q.]
  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916. See vol. 2, p 31, Article 272.
  • Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991, p. 165.

Crossrefs

Cf. A004020, A005883, A104794, A052343, A199015 (partial sums).
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. A274621 (reciprocal series).

Programs

  • Haskell
    a052343 = (flip div 2) . (+ 1) . a008441
    -- Reinhard Zumkeller, Jul 25 2014
    
  • Magma
    A := Basis( ModularForms( Gamma1(8), 1), 420); A[2]; /* Michael Somos, Jan 31 2015 */
  • Maple
    sigmamr := proc(n,m,r) local a,d ; a := 0 ; for d in numtheory[divisors](n) do if modp(d,m) = r then a := a+1 ; end if; end do: a; end proc:
    A002654 := proc(n) sigmamr(n,4,1)-sigmamr(n,4,3) ; end proc:
    A008441 := proc(n) A002654(4*n+1) ; end proc:
    seq(A008441(n),n=0..90) ; # R. J. Mathar, Mar 23 2011
  • Mathematica
    Plus@@((-1)^(1/2 (Divisors[4#+1]-1)))& /@ Range[0, 104] (* Ant King, Dec 02 2010 *)
    a[ n_] := SeriesCoefficient[ (1/2) EllipticTheta[ 2, 0, q] EllipticTheta[ 3, 0, q], {q, 0, n + 1/4}]; (* Michael Somos, Jun 19 2012 *)
    a[ n_] := SeriesCoefficient[ (1/4) EllipticTheta[ 2, 0, q]^2, {q, 0, 2 n + 1/2}]; (* Michael Somos, Jun 19 2012 *)
    a[ n_] := If[ n < 0, 0, DivisorSum[ 4 n + 1, (-1)^Quotient[#, 2] &]];  (* Michael Somos, Jun 08 2014 *)
    QP = QPochhammer; s = QP[q^2]^4/QP[q]^2 + O[q]^100; CoefficientList[s, q] (* Jean-François Alcover, Nov 27 2015, adapted from PARI *)
    TriangleQ[n_] := IntegerQ@Sqrt[8n +1]; Table[Count[FrobeniusSolve[{1, 1}, n], {?TriangleQ}], {n, 0, 104}] (* Robert G. Wilson v, Apr 15 2017 *)
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( sum(k=0, (sqrtint(8*n + 1) - 1)\2, x^(k * (k+1)/2), x * O(x^n))^2, n) )};
    
  • PARI
    {a(n) = if( n<0, 0, n = 4*n + 1; sumdiv(n, d, (-1)^(d\2)))}; /* Michael Somos, Sep 02 2005 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^4 / eta(x + A)^2, n))};
    
  • PARI
    {a(n) = if( n<0, 0, n = 4*n + 1; sumdiv( n, d, (d%4==1) - (d%4==3)))}; /* Michael Somos, Sep 14 2005 */
    
  • PARI
    { my(q='q+O('q^166)); Vec(eta(q^2)^4 / eta(q)^2) } \\ Joerg Arndt, Apr 16 2017
    
  • Sage
    ModularForms( Gamma1(8), 1, prec=420).1; # Michael Somos, Jun 08 2014
    

Formula

This sequence is the quadrisection of many sequences. Here are two examples:
a(n) = A002654(4n+1), the difference between the number of divisors of 4*n+1 of form 4*k+1 and the number of form 4*k-1. - David Broadhurst, Oct 20 2002
a(n) = b(4*n + 1), where b(n) is multiplicative and b(2^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p == 3 (mod 4), b(p^e) = e+1 if p == 1 (mod 4). - Michael Somos, Sep 14 2005
G.f.: (Sum_{k>=0} x^((k^2 + k)/2))^2 = (Sum_{k>=0} x^(k^2 + k)) * (Sum_{k in Z} x^(k^2)).
Expansion of Jacobi theta (theta_2(0, sqrt(q)))^2 / (4 * q^(1/4)).
Sum[d|(4n+1), (-1)^((d-1)/2) ].
Given g.f. A(x), then B(q) = q * A(q^4) satisfies 0 = f(B(q), B(q^2), B(q^4)) where f(u, v, w) = v^3 + 4 * v * w^2 - u^2 * w. - Michael Somos, Sep 14 2005
Given g.f. A(x), then B(q) = q * A(q^4) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1 * u3 - (u2 - u6) * (u2 + 3*u6). - Michael Somos, Sep 14 2005
Expansion of Jacobi k/(4*q^(1/2)) * (2/Pi)* K(k) in powers of q^2. - Michael Somos, Sep 14 2005. Convolution of A001938 and A004018. This appears in the denominator of the Jacobi sn and cn formula given in the Abramowitz-Stegun reference, p. 575, 16.23.1 and 16.23.2, where m=k^2. - Wolfdieter Lang, Jul 05 2016
G.f.: Sum_{k>=0} a(k) * x^(2*k) = Sum_{k>=0} x^k / (1 + x^(2*k + 1)).
G.f.: Sum_{k in Z} x^k / (1 - x^(4*k + 1)). - Michael Somos, Nov 03 2005
Expansion of psi(x)^2 = phi(x) * psi(x^2) in powers of x where phi(), psi() are Ramanujan theta functions.
Moebius transform is period 8 sequence [ 1, -1, -1, 0, 1, 1, -1, 0, ...]. - Michael Somos, Jan 25 2008
G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 1/2 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A104794.
Euler transform of period 2 sequence [ 2, -2, ...].
G.f.: q^(-1/4) * eta(q^2)^4 / eta(q)^2. See also the Fine reference.
a(n) = Sum_{k=0..n} A010054(k)*A010054(n-k). - Reinhard Zumkeller, Nov 03 2009
A004020(n) = 2 * a(n). A005883(n) = 4 * a(n).
Convolution square of A010054.
G.f.: Product_{k>0} (1 - x^(2*k))^2 / (1 - x^(2*k-1))^2.
a(2*n) = A113407(n). a(2*n + 1) = A053692(n). a(3*n) = A002175(n). a(3*n + 1) = 2 * A121444(n). a(9*n + 2) = a(n). a(9*n + 5) = a(9*n + 8) = 0. - Michael Somos, Jun 08 2014
G.f.: exp( Sum_{n>=1} 2*(x^n/n) / (1 + x^n) ). - Paul D. Hanna, Mar 01 2016
a(n) = A001826(2+8*n) - A001842(2+8*n), the difference between the number of divisors 1 (mod 4) and 3 (mod 4) of 2+8*n. See the Ono et al. link, Corollary 1, or directly the Niven et al. reference, p. 165, Corollary (3.23). - Wolfdieter Lang, Jan 11 2017
Expansion of continued fraction 1 / (1 - x^1 + x^1*(1 - x^1)^2 / (1 - x^3 + x^2*(1 - x^2)^2 / (1 - x^5 + x^3*(1 - x^3)^2 / ...))) in powers of x^2. - Michael Somos, Apr 20 2017
Given g.f. A(x), and B(x) is the g.f. for A079006, then B(x) = A(x^2) / A(x) and B(x) * B(x^2) * B(x^4) * ... = 1 / A(x). - Michael Somos, Apr 20 2017
a(0) = 1, a(n) = (2/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
From Paul D. Hanna, Aug 10 2019: (Start)
G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k) * (x^(2*n+1) - x^(2*k))^(n-k) = Sum_{n>=0} a(n)*x^(2*n).
G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k) * (x^(2*n+1) + x^(2*k))^(n-k) * (-1)^k = Sum_{n>=0} a(n)*x^(2*n). (End)
From Peter Bala, Jan 05 2021: (Start)
G.f.: Sum_{n = -oo..oo} x^(4*n^2+2*n) * (1 + x^(4*n+1))/(1 - x^(4*n+1)). See Agarwal, p. 285, equation 6.20 with i = j = 1 and mu = 4.
For prime p of the form 4*k + 3, a(n*p^2 + (p^2 - 1)/4) = a(n).
If n > 0 and p are coprime then a(n*p + (p^2 - 1)/4) = 0. The proofs are similar to those given for the corresponding results for A115110. Cf. A000729.
For prime p of the form 4*k + 1 and for n not congruent to (p - 1)/4 (mod p) we have a(n*p^2 + (p^2 - 1)/4) = 3*a(n) (since b(n), where b(4*n+1) = a(n), is multiplicative). (End)
From Peter Bala, Mar 22 2021: (Start)
G.f. A(q) satisfies:
A(q^2) = Sum_{n = -oo..oo} q^n/(1 - q^(4*n+2)) (set z = q, alpha = q^2, mu = 4 in Agarwal, equation 6.15).
A(q^2) = Sum_{n = -oo..oo} q^(2*n)/(1 - q^(4*n+1)) (set z = q^2, alpha = q, mu = 4 in Agarwal, equation 6.15).
A(q^2) = Sum_{n = -oo..oo} q^n/(1 + q^(2*n+1))^2 = Sum_{n = -oo..oo} q^(3*n+1)/(1 + q^(2*n+1))^2. (End)
G.f.: Sum_{k>=0} a(k) * q^k = Sum_{k>=0} (-1)^k * q^(k*(k+1)) + 2 * Sum_{n>=1, k>=0} (-1)^k * q^(k*(k+2*n+1)+n). - Mamuka Jibladze, May 17 2021
G.f.: Sum_{k>=0} a(k) * q^k = Sum_{k>=0} (-1)^k * q^(k*(k+1)) * (1 + q^(2*k+1))/(1 - q^(2*k+1)). - Mamuka Jibladze, Jun 06 2021
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/2 (A019669). - Amiram Eldar, Oct 15 2022

Extensions

More terms and information from Michael Somos, Mar 23 2003

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

Original entry on oeis.org

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

Views

Author

Michael Somos, Sep 15 2006

Keywords

Comments

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

Examples

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

Crossrefs

Programs

  • Mathematica
    phi[q_] := EllipticTheta[3, 0, q]; chi[q_] := ((1 - InverseEllipticNomeQ[q]) * InverseEllipticNomeQ[q]/(16*q))^(-1/24); psi[q_] := (1/2)*q^(-1/8)*EllipticTheta[ 2, 0, q^(1/2)]; s = Series[ chi[q]*phi[q^3]*psi[-q^3], {q, 0, 104}]; a[n_] := Coefficient[s, q, n];
    (* or *) a[n_] := If[n == 0, 1, Sum[Boole[Mod[d, 4] == 1] - Boole[Mod[d, 4] == 3], {d, Divisors[3n+1]}]]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Feb 17 2015, after PARI code *)
    a[ n_] := If[ n < 0, 0, DivisorSum[ 3 n + 1, KroneckerSymbol[ -4, #] &]]; (* Michael Somos, Sep 02 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x, x^2] QPochhammer[ -x^3] QPochhammer[ x^6], {x, 0, n}]; (* Michael Somos, Sep 02 2015 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^2 * eta(x^6 + A)^4 / (eta(x + A) * eta(x^3 + A) * eta(x^4 + A) * eta(x^12 + A)), n))};
    
  • PARI
    {a(n) = my(A, p, e); if(n <0, 0, n = 3*n+1; A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if(p==2, 1, p==3, -2*(-1)^e, p%4==1, e+1, 1-e%2)))};
    
  • PARI
    {a(n) = if( n<0, 0, n = 3*n+1; sumdiv(n, d, (d%4==1) - (d%4==3)))}; /* Michael Somos, Apr 19 2007 */

Formula

Expansion of chi(x) * f(x^3) * f(-x^6) in powers of x where chi(), f() are Ramanujan theta functions. - Michael Somos, Sep 02 2015
Expansion of q^(-1/3) * eta(q^2)^2 * et(q^6)^4 / (eta(q) * eta(q^3) * eta(q^4) * eta(q^12)) in powers of q.
Euler transform of period 12 sequence [1, -1, 2, 0, 1, -4, 1, 0, 2, -1, 1, -2, ...]. - Michael Somos, Apr 19 2007
G.f. is a period 1 Fourier series which satisfies f(-1 / (36 t)) = 2 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A258228. - Michael Somos, Sep 02 2015
a(n) = A002654(3*n + 1) = A035154(3*n + 1) = A113446(3*n + 1) = A122864(3*n + 1) = A163746(3*n + 1).
a(n) = (-1)^n * A258277(n). a(2*n + 1) = A122856(n). - Michael Somos, Sep 02 2015
a(4*n) = A002175(n). a(4*n + 2) = 0. - Michael Somos, Jan 19 2017

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

Original entry on oeis.org

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

Views

Author

Michael Somos, May 25 2015

Keywords

Comments

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

Examples

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

Crossrefs

Programs

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

Formula

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

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

Original entry on oeis.org

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

Views

Author

Michael Somos, May 25 2015

Keywords

Comments

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

Examples

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

Crossrefs

Programs

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

Formula

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

A125079 Excess of number of divisors of 2n+1 of form 12k+1, 12k+5 over those of form 12k+7, 12k+11.

Original entry on oeis.org

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

Views

Author

Michael Somos, Nov 18 2006

Keywords

Comments

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

Examples

			1 + x + 2*x^2 + x^4 + 2*x^6 + 2*x^7 + 2*x^8 + 3*x^12 + x^13 + 2*x^14 + ...
q + q^3 + 2*q^5 + q^9 + 2*q^13 + 2*q^15 + 2*q^17 + 3*q^25 + q^27 + 2*q^29 + ...
		

References

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

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, With[{m = 2 n + 1}, Sum[ KroneckerSymbol[ -36, d], { d, Divisors[ m]}]]]
  • PARI
    {a(n) = if( n<0, 0, n = 2*n+1; sumdiv( n, d, kronecker( -36, d)))}
    
  • PARI
    {a(n) = if( n<0, 0, n = 2*n+1; sumdiv( n, d, kronecker( 6, d) * (-1)^(d\12)))}
    
  • PARI
    {a(n) = if( n<0, 0, if( n%6==1, n\=3, 1); sumdiv( 2*n + 1, d, kronecker( -4, d)) )}
    
  • PARI
    {a(n) = local(A, p, e); if( n<0, 0, n = 2*n + 1; A = factor(n); prod( k=1, matsize(A)[1], if( p=A[k, 1], e=A[k, 2]; if( p==2, 0, if( p==3, 1, if( p%4==1, e+1, !(e%2)))))))}
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^3 + A)^3 * eta(x^4 + A) * eta(x^12 + A) / (eta(x + A) * eta(x^6 + A)^2), n))}
    
  • PARI
    a008441(n) = sumdiv(4*n+1, d, (-1)^(d\2));
    a(n) = if(n%2==0, a008441(n/2), if(n%6==1, a008441((n-1)/6))); \\ Seiichi Manyama, Oct 11 2024

Formula

Expansion of q^(-1/2) * eta(q^3)^3 *eta(q^4) * eta(q^12) / (eta(q) * eta(q^6)^2) in powers of q.
Expansion of phi(-q^3) * psi(-q^3) / (chi(-q) * chi(-q^2)) in powers of q where phi(), psi(), chi() are Ramanujan theta functions.
Euler transform of period 12 sequence [ 1, 1, -2, 0, 1, 0, 1, 0, -2, 1, 1, -2, ...].
a(n) = b(2*n + 1) where b(n) is multiplicative and b(2^e) = 0^e, b(3^e) = 1, b(p^e) = e+1 if p == 1 (mod 4), b(p^e) = (1 + (-1)^e) / 2 if p == 3 (mod 4).
G.f. is a period 1 Fourier series which satisfies f(-1 / (24 t)) = 2 (t/i) g(t) where q = exp(2 Pi i t) and g() is g.f. for A138745.
a(6*n + 3) = a(6*n + 5) = 0. a(6*n) = A002175(n). a(6*n + 1) = a(2*n) = A008441(n). a(6*n + 2) = 2 * A121444(n). a(n) = A035154(2*n + 1).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/3 = 1.0471975... (A019670). - Amiram Eldar, Dec 28 2023
a(6*n + 3) = a(6*n + 5) = 0. a(6*n + 1) = A008441(n). a(6*n + k) = A008441(3*n + k/2) for k=0,2,4. - Seiichi Manyama Oct 11 2024

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

Original entry on oeis.org

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

Views

Author

Michael Somos, May 23 2015

Keywords

Comments

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

Examples

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

Crossrefs

For the square of this series see A252650.

Programs

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

Formula

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

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

Original entry on oeis.org

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

Views

Author

Michael Somos, Nov 18 2006

Keywords

Comments

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

Examples

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

References

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

Crossrefs

Programs

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

Formula

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

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

Original entry on oeis.org

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

Views

Author

Michael Somos, Mar 27 2008

Keywords

Comments

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

Examples

			G.f. = 1 + 3*x + 2*x^2 + x^4 + 2*x^6 + 6*x^7 + 2*x^8 + 3*x^12 + 3*x^13 + ...
G.f. = q + 3*q^3 + 2*q^5 + q^9 + 2*q^13 + 6*q^15 + 2*q^17 + 3*q^25 + 3*q^27 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, DivisorSum[ 2 n + 1, (-1)^Quotient[#, 6] {1, 0, 2, 0, 1, 0}[[Mod[#, 6, 1]]] &]]; (* Michael Somos, Sep 08 2015 *)
    a[ n_] := SeriesCoefficient[ x^(-1/2) (EllipticTheta[ 2, 0, x]^2 + 3 EllipticTheta[ 2, 0, x^3]^2) / 4, {x, 0, n}]; (* Michael Somos, Sep 08 2015 *)
    a[ n_] := If[ n < 0, 0, Times @@ (Which[ # < 3, 1, # == 3, 2 - (-1)^#2, Mod[#, 12] < 6, #2 + 1, True, 1 - Mod[#2, 2]] & @@@ FactorInteger[2 n + 1])]; (* Michael Somos, Sep 08 2015 *)
    QP = QPochhammer; s = QP[q^2]^7*QP[q^3]*QP[q^12]^2 / (QP[q]^3*QP[q^4]^2* QP[q^6]^3) + O[q]^90; CoefficientList[s, q] (* Jean-François Alcover, Nov 24 2015 *)
  • PARI
    {a(n) = if( n<0, 0, sumdiv( 2*n + 1, d, (-1)^(d\6) * [0, 1, 0, 2, 0, 1][d%6 + 1]))};
    
  • PARI
    {a(n) = my(A, p, e); 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, p==3, 2 - (-1)^e, p%12<6, e+1, 1-e%2 )))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^7 * eta(x^3 + A) * eta(x^12 + A)^2 / (eta(x + A)^3 * eta(x^4 + A)^2 * eta(x^6 + A)^3), n))};

Formula

Expansion of q^(-1/2) * (theta_2(q)^2 + 3 * theta_2(q^3)^2) / 4 in powers of q.
Expansion of phi(q) * psi(q) * psi(q^3) / phi(q^3) in powers of q where phi(), psi() are Ramanujan theta functions.
Euler transform of period 12 sequence [ 3, -4, 2, -2, 3, -2, 3, -2, 2, -4, 3, -2, ...].
Moebius transform is period 24 sequence [ 1, -1, 2, 0, 1, -2, -1, 0, -2, -1, -1, 0, 1, 1, 2, 0, 1, 2, -1, 0, -2, 1, -1, 0, ...].
a(n) = b(2*n + 1) where b() is multiplicative with b(2^e) = 0^e, b(3^e) = 1 + (-1)^e, b(p^e) = e+1 if p == 1, 5 (mod 12), b(p^e) = (1+(-1)^e)/2 if p = 7, 11 (mod 12).
G.f. is a period 1 Fourier series which satisfies f(-1 / (48 t)) = 6 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A132003.
a(6*n + 3) = a(6*n + 5) = 0.
a(n) = (-1)^n * A116604(n). a(2*n) = A008441(n).
a(6*n) = A002175(n). a(6*n + 1) = 3 * A008441(n). a(6*n + 2) = 2 * A121444(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/2 (A019669). - Amiram Eldar, Dec 28 2023
Showing 1-10 of 25 results. Next