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

A008443 Number of ordered ways of writing n as the sum of 3 triangular numbers.

Original entry on oeis.org

1, 3, 3, 4, 6, 3, 6, 9, 3, 7, 9, 6, 9, 9, 6, 6, 15, 9, 7, 12, 3, 15, 15, 6, 12, 12, 9, 12, 15, 6, 13, 21, 12, 6, 15, 9, 12, 24, 9, 18, 12, 9, 18, 15, 12, 13, 24, 9, 15, 24, 6, 18, 27, 6, 12, 15, 18, 24, 21, 15, 12, 27, 9, 13, 18, 15, 27, 27, 9, 12, 27, 15, 24, 21, 12, 15, 30, 15, 12
Offset: 0

Views

Author

Keywords

Comments

Fermat asserted that every number is the sum of three triangular numbers. This was proved by Gauss, who recorded in his Tagebuch entry for Jul 10 1796 that: EYPHEKA! num = DELTA + DELTA + DELTA. See also Gauss, DA, art. 293.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Andrews (2016), Theorem 2, shows that A008443(n) = A290735(n) + A290737(n) + A290739(n). = N. J. A. Sloane, Aug 10 2017

Examples

			5 can be written as 3+1+1, 1+3+1, 1+1+3, so a(5) = 3.
G.f. = 1 + 3*x + 3*x^2 + 4*x^3 + 6*x^4 + 3*x^5 + 6*x^6 + 9*x^7 + 3*x^8 + ...
G.f. = q^3 + 3*q^11 + 3*q^19 + 4*q^27 + 6*q^35 + 3*q^43 + 6*q^51 + 9*q^59 + 3*q^67 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
  • C. F. Gauss, Disquisitiones Arithmeticae, Yale University Press, 1966, New Haven and London, p. 342, art. 293.
  • M. Nathanson, Additive Number Theory: The Classical Bases, Graduate Texts in Mathematics, Volume 165, Springer-Verlag, 1996. See Chapter 1.

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.
Partial sums are in A038835.

Programs

  • Magma
    Basis( ModularForms( Gamma0(16), 3/2), 630)[4]; /* Michael Somos, Aug 26 2015 */
  • Maple
    s1 := sum(q^(n*(n+1)/2), n=0..30): s2 := series(s1^3, q, 250): for i from 0 to 200 do printf(`%d,`,coeff(s2, q, i)) od:
  • Mathematica
    s1 = Sum[q^(n (n + 1)/2), {n, 0, 12}]; s2 = Series[s1^3, {q, 0, 80}]; CoefficientList[s2, q] (* Jean-François Alcover, Oct 04 2011, after Maple *)
    a[ n_] := SeriesCoefficient[ (1/8) EllipticTheta[ 2, 0, q]^3, {q, 0, 2 n + 3/4}]; (* Michael Somos, May 29 2012 *)
    QP = QPochhammer; CoefficientList[(QP[q^2]^2/QP[q])^3 + O[q]^80, q] (* Jean-François Alcover, Nov 24 2015 *)
  • 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))^3, n))}; /* Michael Somos, Oct 25 2006 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^2 / eta(x + A))^3, n))}; /* Michael Somos, Oct 25 2006 */
    

Formula

Expansion of Jacobi theta constant theta_2^3 /8. G.f. is cube of g.f. for A010054.
Expansion of psi(q)^3 in powers of q where psi() is a Ramanujan theta function (A010054). - Michael Somos, Oct 25 2006
Expansion of q^(-3/8) * (eta(q^2)^2 / eta(q))^3 in powers of q. - Michael Somos, May 29 2012
Euler transform of period 2 sequence [ 3, -3, ...]. - Michael Somos, Oct 25 2006
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 2^(-3/2) (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A213384. - Michael Somos, Jun 23 2012
a(3*n) = A213627(n). a(3*n + 1) = 3 * A213617(n). a(3*n + 2) = A181648(n). - Michael Somos, Jun 23 2012
G.f.: (Sum_{k>0} x^((k^2 - k)/2))^3 = (Product_{k>0} (1 + x^k) * (1 - x^(2*k)))^3. - Michael Somos, May 29 2012
a(n) = A005869(n)/2 = A005886(n)/4 = A005878(n)/8.
a(n) = A005875(8*n+3)/8. See, e.g., the Ono et al. link: The case k=3. - Wolfdieter Lang, Jan 12 2017
a(0) = 1, a(n) = (3/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017

Extensions

More terms from James Sellers, Feb 07 2001

A259825 a(n) = 12*H(n) where H() is the Hurwitz class number.

Original entry on oeis.org

-1, 0, 0, 4, 6, 0, 0, 12, 12, 0, 0, 12, 16, 0, 0, 24, 18, 0, 0, 12, 24, 0, 0, 36, 24, 0, 0, 16, 24, 0, 0, 36, 36, 0, 0, 24, 30, 0, 0, 48, 24, 0, 0, 12, 48, 0, 0, 60, 40, 0, 0, 24, 24, 0, 0, 48, 48, 0, 0, 36, 48, 0, 0, 60, 42, 0, 0, 12, 48, 0, 0, 84, 36, 0, 0
Offset: 0

Views

Author

Michael Somos, Jul 05 2015

Keywords

Comments

Coefficients of q-expansion of Eisenstein series G_{3/2}(tau) multiplied by 12. - N. J. A. Sloane, Mar 16 2019

Examples

			G.f. = -1 + 4*x^3 + 6*x^4 + 12*x^7 + 12*x^8 + 12*x^11 + 16*x^12 + 24*x^15 + ...
		

Crossrefs

Programs

  • Mathematica
    terms = 100; gf[m_] := With[{r = Range[-m, m]}, -2 Sum[(-1)^k*x^(k^2 + k)/(1 + (-x)^k)^2, {k, r}]/EllipticTheta[3, 0, x] - 2 Sum[(-1)^k*x^(k^2 + 2 k)/(1 + x^(2 k))^2, {k, r}]/EllipticTheta[3, 0, -x]]; gf[terms // Sqrt // Ceiling] + O[x]^terms // CoefficientList[#, x]& (* Jean-François Alcover, Apr 02 2017 *)
    a[ n_] := If[ n<1, -Boole[n==0], With[{m = Floor[(-1 + Sqrt[1 + 4*n])/2]}, -2*SeriesCoefficient[ Sum[(-1)^k*x^(k^2 + k)/(1 + (-x)^k)^2, {k, -m-1,m}] / EllipticTheta[3, 0, x] + Sum[(-1)^k*x^(k^2 + 2*k)/(1 + x^(2*k))^2, {k, -m-2,m}]/ EllipticTheta[3, 0, -x], {x, 0, n}]]]; (* Michael Somos, Feb 04 2022 *)
  • PARI
    {a(n) = 12 * qfbhclassno(n)};
    
  • PARI
    {a(n) = my(D, f); 12 * if( n<1, (n==0)/-12, [D, f] = core(-n, 1); if( D%4>1 && !(f%2), D*=4; f/=2); if( D%4<2, qfbclassno(D) / max(1, D+6), 0) * sumdiv(f, d, moebius(d) * kronecker(D, d) * sigma(f/d)))};

Formula

a(n) = 12 * A058305(n) / A058306(n). a(4*n + 1) = a(4*n + 2) = 0. a(3*n + 4) = 6 * A259827(n).
a(4*n + 3) = 4 * A130695(n). a(8*n + 3) = A005886(n) = 2 * A005869(n) = 4 * A008443(n). a(12*n + 7) = 12 * A259655(n).
a(16*n + 4) = 6 * A045834(n) = 3 * A005876(n). a(16*n + 8) = 12 * A045828(n) = 6 * A005884(n) = 3 * A005877(n).
a(24*n + 3) = 4 * A213627(n). a(24*n + 7) = 12 * A185220(n). a(24*n + 11) = 12 * A213617(n). a(24*n + 19) = 12 * A181648(n). a(24*n + 23) = 12 * A188569(n+1).
a(32*n + 4) = 6 * A213022(n). a(32*n + 8) = 12 * A213625(n). a(32*n + 12) = 16 * A008443(n) = 8 * A005869(n) = 4 * A005886(n) = 2 * A005878(n). a(32*n + 20) = 24 * A045831(n) = 6 * A004024(n). a(32*n + 24) = 24 * A213624(n).
G.f.: -2 * (Sum_{k in Z} (-1)^k * x^(k*k + k) / (1 + (-x)^k)^2) / (Sum_{k in Z} x^k^2) - 2 * (Sum_{k in Z} (-1)^k * x^(k^2 + 2*k) / (1 + x^(2*k))^2) / (Sum_{k in Z} (-x)^k^2).
a(n) >= 0 if n > 0. - Michael Somos, Feb 04 2022

A212885 Expansion of phi(q) * phi(-q)^2 in powers of q where phi() is a Ramanujan theta function.

Original entry on oeis.org

1, -2, -4, 8, 6, -8, -8, 0, 12, -10, -8, 24, 8, -8, -16, 0, 6, -16, -12, 24, 24, -16, -8, 0, 24, -10, -24, 32, 0, -24, -16, 0, 12, -16, -16, 48, 30, -8, -24, 0, 24, -32, -16, 24, 24, -24, -16, 0, 8, -18, -28, 48, 24, -24, -32, 0, 48, -16, -8, 72, 0, -24, -32
Offset: 0

Views

Author

Michael Somos, May 29 2012

Keywords

Comments

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

Examples

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

Crossrefs

Programs

  • Mathematica
    a[n_]:= SeriesCoefficient[EllipticTheta[3, 0, q]* EllipticTheta[3, 0, -q]^2, {q, 0, n}]; Table[a[n], {n, 0, 50}] (* G. C. Greubel, Nov 30 2017 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^3 * eta(x + A)^2 / eta(x^4 + A)^2, n))};

Formula

Expansion of phi(-x) * phi(-x^2)^2 = phi(-x^2)^4 / phi(x) in powers of x where phi() is a Ramanujan theta function.
Expansion of eta(q^2)^3 * eta(q)^2 / eta(q^4)^2 in powers of q.
Euler transform of period 4 sequence [-2, -5, -2, -3, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 32 (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A045828.
G.f.: Product_{k>0} (1 - x^(2*k))^3 * (1 - x^k)^2 / (1 - x^(4*k))^2.
a(4*n) = A005875(n). a(4*n + 1) = -2 * A045834(n). a(4*n + 2) = - A005877(n) = -4 * A045828(n).
a(8*n) = A004015(n). a(8*n + 3) = A005878(n) = 8 * A008443(n). a(8*n + 4)= A005887(n). a(8*n + 5) = -2 * A004024(n). a(8*n + 6) = -8 * A213624(n). a(8*n + 7) = 0.

A005886 Theta series of f.c.c. lattice with respect to tetrahedral hole.

Original entry on oeis.org

4, 12, 12, 16, 24, 12, 24, 36, 12, 28, 36, 24, 36, 36, 24, 24, 60, 36, 28, 48, 12, 60, 60, 24, 48, 48, 36, 48, 60, 24, 52, 84, 48, 24, 60, 36, 48, 96, 36, 72, 48, 36, 72, 60, 48, 52, 96, 36, 60, 96, 24, 72, 108, 24, 48, 60, 72, 96, 84, 60, 48, 108, 36, 52, 72, 60, 108, 108, 36, 48, 108
Offset: 0

Views

Author

Keywords

Comments

Empirically, the number of integral quadruples with sum = 1, sum-of-squares = 2n-1. - Colin Mallows, Dec 31 2016

Examples

			4 + 12*x + 12*x^2 + 16*x^3 + 24*x^4 + 12*x^5 + 24*x^6 + 36*x^7 + 12*x^8 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005869, A005878, A008443. Partial sums is A121054. Cf also A278081-A278086.

Programs

Formula

a(n) = 1/2 * A005878(n) = 2 * A005869(n) = 4 * A008443(n). - Michael Somos, May 31 2012

Extensions

Terms a(50) onward added by G. C. Greubel, Feb 20 2018

A085121 Number of ways of writing n as the sum of three odd squares.

Original entry on oeis.org

0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 72
Offset: 0

Views

Author

N. J. A. Sloane, Apr 25 2004

Keywords

Comments

Number of ways of writing n as the sum of the squares of three odd numbers (see example). Equals 8*A008437 because each summand can be the square of either a positive or negative odd number, and there are three summands, thus 2^3 = 8. - Antti Karttunen & Michel Marcus, Jul 23 2018

Examples

			a(3) = 8 because 3 = (+1)^2 + (+1)^2 + (+1)^2 = (-1)^2 + (+1)^2 + (+1)^2 = (+1)^2 + (-1)^2 + (+1)^2 = (+1)^2 + (+1)^2 + (-1)^2 = (-1)^2 + (-1)^2 + (+1)^2 = (-1)^2 + (+1)^2 + (-1)^2 = (+1)^2 + (-1)^2 + (-1)^2 = (-1)^2 + (-1)^2 + (-1)^2. - _Antti Karttunen_, Jul 23 2018
		

Crossrefs

Cf. A005875, A008437. The nonzero coefficients give A005878.

Programs

Formula

G.f.: (Sum_{n=-oo..oo} q^((2n+1)^2))^3.
Showing 1-5 of 5 results.