login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008441 Number of ways of writing n as the sum of 2 triangular numbers. 57
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

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.

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.

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 575, 16.23.1 and 16.23.2.

N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 72, Eq (31.2); p. 78, Eq. following (32.25).

J. W. L. Glaisher, On the function chi(n), Quarterly Journal of Pure and Applied Mathematics, 20 (1884), 97-167. See p. 108.

M. D. Hirschhorn, The number of representations of a number by various forms, Discrete Mathematics 298 (2005), 205-211

N. Heninger, E. M. Rains and N. J. A. Sloane, On the Integrality of n-th Roots of Generating Functions, J. Combinatorial Theory, Series A, 113 (2006), 1732-1745.

K. Ono, S. Robins and P. T. Wahl, On the representation of integers as sums of triangular numbers, Aequationes mathematicae, August 1995, Volume 50, Issue 1-2, pp. 73-94.

H. Rosengren, Sums of triangular numbers from the Frobenius determinant, arXiv:math/0504272 [math.NT], 2005.

M. Somos, Introduction to Ramanujan theta functions

Eric Weisstein's World of Mathematics, Ramanujan Theta Functions

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

EXAMPLE

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

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 *)

PROG

(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 */

(Sage) ModularForms( Gamma1(8), 1, prec=420).1; # Michael Somos, Jun 08 2014

(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 */

CROSSREFS

A002654, A008442, A035154, A035181, A035184, A112301, A113406, A113414, A113446, A113652 all satisfy A(4n+1)=a(n).

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. A002175, A053692, A113407, A121444.

Cf. A000217, A001938, A004018.

Cf. A274621 (reciprocal series).

Cf. A001826, A001842.

Sequence in context: A283305 A226005 A134343 * A253183 A108804 A200227

Adjacent sequences:  A008438 A008439 A008440 * A008442 A008443 A008444

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms and information from Michael Somos, Mar 23 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified March 28 21:25 EDT 2017. Contains 284246 sequences.