[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a008443 -id:a008443
     Sort: relevance | references | number | modified | created      Format: long | short | data
Partial sums of A008443.
+20
2
1, 4, 7, 11, 17, 20, 26, 35, 38, 45, 54, 60, 69, 78, 84, 90, 105, 114, 121, 133, 136, 151, 166, 172, 184, 196, 205, 217, 232, 238, 251, 272, 284, 290, 305, 314, 326, 350, 359, 377, 389, 398, 416, 431, 443, 456, 480
OFFSET
0,2
FORMULA
G.f.: theta_2(sqrt(x))^3/(8*x^(3/8)*(1 - x)), where theta_2() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 15 2018
CROSSREFS
Cf. A008443.
KEYWORD
nonn
AUTHOR
STATUS
approved
a(n) = 1 if n is a triangular number, otherwise 0.
+10
1570
1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
0,1
COMMENTS
This is essentially the q-expansion of the Jacobi theta function theta_2(q). (In theta_2 one has to ignore the initial factor of 2*q^(1/4) and then replace q by q^(1/2). See also A005369.) - N. J. A. Sloane, Aug 03 2014
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Ramanujan's theta function f(a, b) = Sum_{n=-inf..inf} a^(n*(n+1)/2) * b^(n*(n-1)/2).
This sequence is the concatenation of the base-b digits in the sequence b^n, for any base b >= 2. - Davis Herring (herring(AT)lanl.gov), Nov 16 2004
Number of partitions of n into distinct parts such that the greatest part equals the number of all parts, see also A047993; a(n)=A117195(n,0) for n > 0; a(n) = 1-A117195(n,1) for n > 1. - Reinhard Zumkeller, Mar 03 2006
Triangle T(n,k), 0 <= k <= n, read by rows, given by A000007 DELTA A000004 where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 03 2009
Convolved with A000041 = A022567, the convolution square of A000009. - Gary W. Adamson, Jun 11 2009
A008441(n) = Sum_{k=0..n} a(k)*a(n-k). - Reinhard Zumkeller, Nov 03 2009
Polcoeff inverse with alternate signs = A006950: (1, 1, 1, 2, 3, 4, 5, 7, ...). - Gary W. Adamson, Mar 15 2010
This sequence is related to Ramanujan's two-variable theta functions because this sequence is also the characteristic function of generalized hexagonal numbers. - Omar E. Pol, Jun 08 2012
Number 3 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016
Number of partitions of n into consecutive parts that contain 1 as a part, n >= 1. - Omar E. Pol, Nov 27 2020
REFERENCES
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 103.
M. D. Hirschhorn, The Power of q, Springer, 2017. See Psi page 9.
J. Tannery and J. Molk, Eléments de la Théorie des Fonctions Elliptiques, Vol. 2, Gauthier-Villars, Paris, 1902; Chelsea, NY, 1972, see p. 27.
E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.
LINKS
Mohammad K. Azarian, Remarks and Conjectures Regarding Combinatorics of Discrete Partial Functions, Int'l Math. Forum (2022) Vol. 17, No. 3, 129-141. See Conjecture 4.4, p. 137.
S. Cooper and M. D. Hirschhorn, Results of Hurwitz type for three squares, Discrete Math. 274 (2004), no. 1-3, 9-24. See psi(q).
Atli Fannar Franklín, Pattern avoidance enumerated by inversions, arXiv:2410.07467 [math.CO], 2024. See p. 2.
Atli Fannar Franklín, Anders Claesson, Christian Bean, Henning Úlfarsson, and Jay Pantone, Restricted Permutations Enumerated by Inversions, arXiv:2406.16403 [cs.DM], 2024. See p. 2.
Shishuo Fu and Yaling Wang, Bijective recurrences concerning two Schröder triangles, arXiv:1908.03912 [math.CO], 2019.
M. D. Hirschhorn and J. A. Sellers, A Congruence Modulo 3 for Partitions into Distinct Non-Multiples of Four, Article 14.9.6, Journal of Integer Sequences, Vol. 17 (2014).
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, Proposition 1.
Franck Ramaharo, A generating polynomial for the pretzel knot, arXiv:1805.10680 [math.CO], 2018.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
Wolfram Challenges, Separate Ones by Zeroes
FORMULA
Expansion of f(x, x^3) in powers of x where f(, ) is Ramanujan's general theta function.
Expansion of q^(-1) * (phi(q) - phi(q^4)) / 2 in powers of q^8. - Michael Somos, Jul 01 2014
Expansion of q^(-1/8) * eta(q^2)^2 / eta(q) in powers of q. - Michael Somos, Apr 13 2005
Euler transform of period 2 sequence [ 1, -1, ...]. - Michael Somos, Mar 24 2003
Given g.f. A(x), then B(q) = q * A(q^8) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1*u6^3 + u2*u3^3 - u1*u2^2*u6. - Michael Somos, Apr 13 2005
a(n) = b(8*n + 1) where b()=A098108() is multiplicative with b(2^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p > 2. - Michael Somos, Jun 06 2005
a(n) = A005369(2*n). - Michael Somos, Apr 29 2003
G.f.: theta_2(sqrt(q)) / (2 * q^(1/8)).
G.f.: 1 / (1 - x / (1 + x / (1 + x^1 / (1 - x / (1 + x / (1 + x^2 / (1 - x / (1 + x / (1 + x^3 / ...))))))))). - Michael Somos, May 11 2012
G.f.: Product_{k>0} (1-x^(2*k))/(1-x^(2*k-1)). - Vladeta Jovovic, May 02 2002
a(0)=1; for n>0, a(n) = A002024(n+1)-A002024(n). - Benoit Cloitre, Jan 05 2004
G.f.: Sum_{j>=0} Product_{k=0..j} x^j. - Jon Perry, Mar 30 2004
a(n) = floor((1-cos(Pi*sqrt(8*n+1)))/2). - Carl R. White, Mar 18 2006
a(n) = round(sqrt(2n+1)) - round(sqrt(2n)). - Hieronymus Fischer, Aug 06 2007
a(n) = ceiling(2*sqrt(2n+1)) - floor(2*sqrt(2n)) - 1. - Hieronymus Fischer, Aug 06 2007
a(n) = f(n,0) with f(x,y) = if x > 0 then f(x-y,y+1), otherwise 0^(-x). - Reinhard Zumkeller, Sep 27 2008
a(n) = A035214(n) - 1.
From Mikael Aaltonen, Jan 22 2015: (Start)
Since the characteristic function of s-gonal numbers is given by floor(sqrt(2n/(s-2) + ((s-4)/(2s-4))^2) + (s-4)/(2s-4)) - floor(sqrt(2(n-1)/(s-2) + ((s-4)/(2s-4))^2) + (s-4)/(2s-4)), by setting s = 3 we get the following: For n > 0, a(n) = floor(sqrt(2*n+1/4)-1/2) - floor(sqrt(2*(n-1)+1/4)-1/2).
(End)
a(n) = (-1)^n * A106459(n). - Michael Somos, May 04 2016
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 2^(-1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A002448. - Michael Somos, May 05 2016
G.f.: Sum_{n >= 0} x^(n*(n+1)/2) = Product_{n >= 1} (1 - x^n)*(1 + x^n)^2 = Product_{n >= 1} (1 - x^(2*n))*(1 + x^n) = Product_{n >= 1} (1 - x^(2*n))/(1 - x^(2*n-1)). From the sum and product representations of theta_2(0, sqrt(q))/(2*q^(1/8))) function. The last product, given by Vladeta Jovovic above, is obtained from the second to last one by an Euler identity, proved via f(x) := Product_{n >= 1} (1 - x^(2*n-1))*Product_{n >= 1} (1 + x^n) = f(x^2), by moving the odd-indexed factors of the second product to the first product. This leads to f(x) = f(0) = 1. - Wolfdieter Lang, Jul 05 2016
a(0) = 1, a(n) = (1/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, Apr 08 2017
EXAMPLE
G.f. = 1 + x + x^3 + x^6 + x^10 + x^15 + x^21 + x^28 + x^36 + x^45 + x^55 + x^66 + ...
G.f. for B(q) = q * A(q^8): q + q^9 + q^25 + q^49 + q^81 + q^121 + q^169 + q^225 + q^289 + q^361 + ...
From Philippe Deléham, Jan 04 2008: (Start)
As a triangle this begins:
1;
1, 0;
1, 0, 0;
1, 0, 0, 0;
1, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0;
... (End)
MAPLE
A010054 := proc(n)
if issqr(1+8*n) then
1;
else
0;
end if;
end proc:
seq(A010054(n), n=0..80) ; # R. J. Mathar, Feb 22 2021
MATHEMATICA
a[ n_] := SquaresR[ 1, 8 n + 1] / 2; (* Michael Somos, Nov 15 2011 *)
a[ n_] := If[ n < 0, 0, SeriesCoefficient[ (Series[ EllipticTheta[ 3, Log[y] / (2 I), x^2], {x, 0, n + Floor @ Sqrt[n]}] // Normal // TrigToExp) /. {y -> x}, {x, 0, n}]]; (* Michael Somos, Nov 15 2011 *)
Table[If[IntegerQ[(Sqrt[8n+1]-1)/2], 1, 0], {n, 0, 110}] (* Harvey P. Dale, Oct 29 2012 *)
a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, q^(1/2)] / (2 q^(1/8)), {q, 0, n}]; (* Michael Somos, Jul 01 2014 *)
Module[{tr=Accumulate[Range[20]]}, If[MemberQ[tr, #], 1, 0]&/@Range[Max[tr]]] (* Harvey P. Dale, Mar 13 2023 *)
PROG
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^2 / eta(x + A), n))}; /* Michael Somos, Mar 14 2011 */
(PARI) {a(n) = issquare( 8*n + 1)}; /* Michael Somos, Apr 27 2000 */
(PARI) a(n) = ispolygonal(n, 3); \\ Michel Marcus, Jan 22 2015
(Haskell)
a010054 = a010052 . (+ 1) . (* 8)
a010054_list = concatMap (\x -> 1 : replicate x 0) [0..]
-- Reinhard Zumkeller, Feb 12 2012, Oct 22 2011, Apr 02 2011
(Magma) Basis( ModularForms( Gamma0(16), 1/2), 362) [2] ; /* Michael Somos, Jun 10 2014 */
(Python)
from sympy import integer_nthroot
def A010054(n): return int(integer_nthroot((n<<3)+1, 2)[1]) # Chai Wah Wu, Nov 15 2022
(Sage) # uses[EulerTransform from A166861]
b = BinaryRecurrenceSequence(-1, 0)
a = EulerTransform(b)
print([a(n) for n in range(88)]) # Peter Luschny, Nov 17 2022
(Clojure)
(def A010054 (mapcat #(cons 1 (replicate % 0)) (range))) ; Tony Zorman, Apr 03 2023
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.
Cf. A106507 (reciprocal series).
KEYWORD
nonn,tabl,easy
EXTENSIONS
Additional comments from Michael Somos, Apr 27 2000
STATUS
approved
Theta series of simple cubic lattice; also number of ways of writing a nonnegative integer n as a sum of 3 squares (zero being allowed).
(Formerly M4092)
+10
82
1, 6, 12, 8, 6, 24, 24, 0, 12, 30, 24, 24, 8, 24, 48, 0, 6, 48, 36, 24, 24, 48, 24, 0, 24, 30, 72, 32, 0, 72, 48, 0, 12, 48, 48, 48, 30, 24, 72, 0, 24, 96, 48, 24, 24, 72, 48, 0, 8, 54, 84, 48, 24, 72, 96, 0, 48, 48, 24, 72, 0, 72, 96, 0, 6, 96, 96, 24, 48, 96, 48, 0, 36, 48, 120
OFFSET
0,2
COMMENTS
Number of ordered triples (i, j, k) of integers such that n = i^2 + j^2 + k^2.
The Madelung Coulomb energy for alternating unit charges in the simple cubic lattice is Sum_{n>=1} (-1)^n*a(n)/sqrt(n) = -A085469. - R. J. Mathar, Apr 29 2006
a(A004215(k))=0 for k=1,2,3,... but no other elements of {a(n)} are zero. - Graeme McRae, Jan 15 2007
REFERENCES
H. Cohen, Number Theory, Vol. 1: Tools and Diophantine Equations, Springer-Verlag, 2007, p. 317.
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 107.
H. Davenport, The Higher Arithmetic. Cambridge Univ. Press, 7th ed., 1999, Chapter V.
L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 3, p. 109.
E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 54.
L. Kronecker, Crelle, Vol. LVII (1860), p. 248; Werke, Vol. IV, p. 188.
C. J. Moreno and S. S. Wagstaff, Jr., Sums of Squares of Integers, Chapman and Hall, 2006, p. 43.
T. Nagell, Introduction to Number Theory, Wiley, 1951, p. 194.
W. Sierpiński, 1925. Teorja Liczb. pp. 1-410 (p.61).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
H. J. S. Smith, Report on the Theory of Numbers, reprinted in Vol. 1 of his Collected Math. Papers, Chelsea, NY, 1979, see p. 338, Eq. (B').
LINKS
George E. Andrews, The Bhargava-Adiga Summation and Partitions, 2016. See Lemma 2.1.
P. T. Bateman, On the representations of a number as the sum of three squares, Trans. Amer. Math. Soc. 71 (1951), 70-101.
S. Bhargava and C. Adiga, A basic bilateral series summation formula and its applications, Integral Transforms and Special Functions, 2 (1994), 165-184.
J. M. Borwein, K-K S. Choi, On Dirichlet series for sums of squares, Raman. J. 7 (2003) 95-127
S. K. K. Choi, A. V. Kumchev, and R. Osburn, On sums of three squares, arXiv:math/0502007 [math.NT], 2005.
M. Doring, J. Haidenbauer, U.-G. Meissner, and A. Rusetsky, Dynamical coupled-channel approaches on a momentum lattice, arXiv:1108.0676 [hep-lat], 2011.
J. A. Ewell, Recursive determination of the enumerator for sums of three squares, Internat. J. Math. and Math. Sci, 24 (2000), 529-532.
O. Fraser and B. Gordon, On representing a square as the sum of three squares, Amer. Math. Monthly, 76 (1969), 922-923.
M. D. Hirschhorn and J. A. Sellers, On Representations of a Number as a Sum of Three Squares, Discrete Mathematics 199 (1999), 85-101.
A. Martinez Torres, L. R. Dai, C. Koren, D. Jido, and E. Oset, The KD, eta D_s interaction in finite volume and the  D_{s^*0}(2317) resonance, arXiv:1109.0396 [hep-lat], 2011.
R. J. Mathar, Hierarchical Subdivision of the Simple Cubic Lattice, arXiv:1309.3705 [math.MG], 2013.
J. L. Mordell, The Representation Of Integers By Three Positive Squares, Michigan Math. J. 7(3): 289-290 (1960).
G. Nebe and N. J. A. Sloane, Home page for this lattice
Eric Weisstein's World of Mathematics, Theta Series
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
A number n is representable as the sum of 3 squares iff n is not of the form 4^a (8k+7) (cf. A000378).
There is a classical formula (essentially due to Gauss):
For sums of 3 squares r_3(n): write (uniquely) -n=D(2^vf)^2, with D<0 fundamental discriminant, f odd, v>=-1. Then r_3(n) = 12L((D/.),0)(1-(D/2)) Sum_{d | f} mu(d)(D/d)sigma(f/d).
Here mu is the Moebius function, (D/2) and (D/d) are Kronecker-Legendre symbols, sigma is the sum of divisors function, L((D/.),0)=h(D)/(w(D)/2) is the value at 0 of the L function of the quadratic character (D/.), equal to the class number h(D) divided by 2 or 3 in the special cases D=-4 and -3. - Henri Cohen (Henri.Cohen(AT)math.u-bordeaux1.fr), May 12 2010
a(n) = 3*T(n) if n == 1,2,5,6 mod 8, = 2*T(n) if n == 3 mod 8, = 0 if n == 7 mod 8 and = a(n/4) if n == 0 mod 4, where T(n) = A117726(n). [Moreno-Wagstaff].
"If 12E(n) is the number of representations of n as a sum of three squares, then E(n) = 2F(n) - G(n) where G(n) = number of classes of determinant -n, F(n) = number of uneven classes." - Dickson, quoting Kronecker. [Cf. A117726.]
a(n) = Sum_{d^2|n} b(n/d^2), where b() = A074590() gives the number of primitive solutions.
Expansion of phi(q)^3 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Oct 25 2006.
Euler transform of period 4 sequence [ 6, -9, 6, -3, ...]. - Michael Somos, Oct 25 2006
G.f.: (Sum_{k in Z} x^(k^2))^3.
a(8*n + 7) = 0. a(4*n) = a(n).
a(n) = A004015(2*n) = A014455(2*n) = A004013(4*n) = A169783(4*n). a(4*n + 1) = 6 * A045834(n). a(8*n + 3) = 8 * A008443(n). a(8*n + 5) = 24 * A045831(n). - Michael Somos, Jun 03 2012
a(4*n + 2) = 12 * A045828(n). - Michael Somos, Sep 03 2014
a(n) = (-1)^n * A213384(n). - Michael Somos, May 21 2015
a(n) = (6/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
a(n) = A004018(n) + 2*Sum_{k=1..floor(sqrt(n))} A004018(n - k^2). - Daniel Suteu, Aug 27 2021
EXAMPLE
Order and signs are taken into account: a(1) = 6 from 1 = (+-1)^2 + 0^2 + 0^2, a(2) = 12 from 2 = (+-1)^2 + (+-1)^2 + 0^2; a(3) = 8 from 3 = (+-1)^2 + (+-1)^2 + (+-1)^2, etc.
G.f. = 1 + 6*q + 12*q^2 + 8*q^3 + 6*q^4 + 24*q^5 + 24*q^6 + 12*q^8 + 30*q^9 + 24*q^10 + ...
MAPLE
(sum(x^(m^2), m=-10..10))^3; seq(coeff(%, x, n), n=0..50);
Alternative:
A005875list := proc(len) series(JacobiTheta3(0, x)^3, x, len+1);
seq(coeff(%, x, j), j=0..len-1) end: A005875list(75); # Peter Luschny, Oct 02 2018
MATHEMATICA
SquaresR[3, Range[0, 80]] (* Harvey P. Dale, Jul 21 2011 *)
a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^3, {q, 0, n}]; (* Michael Somos, Jun 25 2014 *)
a[ n_] := Length @ FindInstance[ n == x^2 + y^2 + z^2, {x, y, z}, Integers, 10^9]; (* Michael Somos, May 21 2015 *)
QP = QPochhammer; CoefficientList[(QP[q^2]^5/(QP[q]*QP[q^4])^2)^3 + O[q]^80, q] (* Jean-François Alcover, Nov 24 2015 *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( sum( k=1, sqrtint(n), 2 * x^k^2, 1 + x * O(x^n))^3, n))};
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^5 / (eta(x + A) * eta(x^4 + A))^2)^3, n))}; /* Michael Somos, Jun 03 2012 */
(PARI) {a(n) = my(G); if( n<0, 0, G = [ 1, 0, 0; 0, 1, 0; 0, 0, 1]; polcoeff( 1 + 2 * x * Ser( qfrep( G, n)), n))}; /* Michael Somos, May 21 2015 */
(Sage)
Q = DiagonalQuadraticForm(ZZ, [1]*3)
Q.representation_number_list(75) # Peter Luschny, Jun 20 2014
(Magma) Basis( ModularForms( Gamma1(4), 3/2), 75) [1]; /* Michael Somos, Jun 25 2014 */
(Julia) # JacobiTheta3 is defined in A000122.
A005875List(len) = JacobiTheta3(len, 3)
A005875List(75) |> println # Peter Luschny, Mar 12 2018
(Python)
# uses Python code for A004018
from math import isqrt
def A005875(n): return A004018(n)+(sum(A004018(n-k**2) for k in range(1, isqrt(n)+1))<<1) # Chai Wah Wu, Jun 21 2024
CROSSREFS
Row d=3 of A122141 and of A319574, 3rd column of A286815.
Cf. A074590 (primitive solutions), A117609 (partial sums), A004215 (positions of zeros).
Analog for 4 squares: A000118.
x^2+y^2+k*z^2: A005875, A014455, A034933, A169783, A169784.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
KEYWORD
nonn,easy,nice
EXTENSIONS
More terms from James A. Sellers, Aug 22 2000
STATUS
approved
Sum of divisors of 2*n + 1.
+10
75
1, 4, 6, 8, 13, 12, 14, 24, 18, 20, 32, 24, 31, 40, 30, 32, 48, 48, 38, 56, 42, 44, 78, 48, 57, 72, 54, 72, 80, 60, 62, 104, 84, 68, 96, 72, 74, 124, 96, 80, 121, 84, 108, 120, 90, 112, 128, 120, 98, 156, 102, 104, 192, 108, 110, 152, 114, 144, 182, 144, 133, 168
OFFSET
0,2
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Number of ways of writing n as the sum of 4 triangular numbers.
Bisection of A000203. - Omar E. Pol, Mar 14 2012
a(n) is also the total number of parts in all partitions of 2*n + 1 into equal parts. - Omar E. Pol, Feb 14 2021
REFERENCES
B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 139 Ex. (iii).
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 19 eq. (6), and p. 283 eq. (8).
W. Dunham, Euler: The Master of Us All, The Mathematical Association of America Inc., Washington, D.C., 1999, p. 12.
H. M. Farkas, I. Kra, Cosines and triangular numbers, Rev. Roumaine Math. Pures Appl., 46 (2001), 37-43.
N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 79, Eq. (32.31).
N. Koblitz, Introduction to Elliptic Curves and Modular Forms, Springer-Verlag, 1984, see p. 184, Prop. 4, F(z).
G. Polya, Induction and Analogy in Mathematics, vol. 1 of Mathematics and Plausible Reasoning, Princeton Univ. Press, 1954, page 92 ff.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..20000 (first 10000 terms from T. D. Noe)
H. Cohen, Sums involving the values at negative integers of L-functions of quadratic characters, Math. Ann. 217 (1975), no. 3, 271-285. MR0382192 (52 #3080)
M. D. Hirschhorn, The number of representations of a number by various forms, Discrete Mathematics 298 (2005), 205-211
Masao Koike, Modular forms on non-compact arithmetic triangle groups, Unpublished manuscript [Extensively annotated with OEIS A-numbers by N. J. A. Sloane, Feb 14 2021. I wrote 2005 on the first page but the internal evidence suggests 1997.]
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. Theorem 3 [Legendre].
H. Rosengren, Sums of triangular numbers from the Frobenius determinant, arXiv:math/0504272 [math.NT], 2005.
Min Wang and Zhi-Hong Sun, On the number of representations of n as a linear combination of four triangular numbers II, arXiv:1511.00478 [math.NT], 2015.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
K. S. Williams, The parents of Jacobi's four squares theorem are unique, Amer. Math. Monthly, 120 (2013), 329-345.
FORMULA
Expansion of q^(-1/2) * (eta(q^2)^2 / eta(q))^4 = psi(q)^4 in powers of q where psi() is a Ramanujan theta function. - Michael Somos, Apr 11 2004
Expansion of Jacobi theta_2(q)^4 / (16*q) in powers of q^2. - Michael Somos, Apr 11 2004
Euler transform of period 2 sequence [4, -4, 4, -4, ...]. - Michael Somos, Apr 11 2004
a(n) = b(2*n + 1) where b() is multiplicative and b(2^e) = 0^n, b(p^e) =(p^(e+1) - 1) / (p - 1) if p>2. - Michael Somos, Jul 07 2004
Given g.f. A(x), then B(q) = q * A(q^2) satisfies 0 = f(B(q), B(q^2), B(q^4)) where f(u, v, w) = v^3 + 8*w*v^2 + 16*w^2*v - u^2*w - Michael Somos, Apr 08 2005
Given g.f. A(x), then B(q) = q * A(q^2) satisfies 0 = f(B(q), B(q^3), B(q^9)) where f(u, v, w) = v^4 - 30*u*v^2*w + 12*u*v*w*(u + 9*w) - u*w*(u^2 + 9*w*u + 81*w^2).
Given g.f. A(x), then B(q) = q * A(q^2) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u2^3 + u1^2*u6 + 3*u2*u3^2 + 27*u6^3 - u1*u2*u3 - 3*u1*u3*u6 - 7*u2^2*u6 - 21*u2*u6^2. - Michael Somos, May 30 2005
G.f.: Sum_{k>=0} (2k + 1) * x^k / (1 - x^(2k + 1)).
G.f.: (Product_{k>0} (1 - x^k) * (1 + x^k)^2)^4. - Michael Somos, Apr 11 2004
G.f. Sum_{k>=0} a(k) * x^(2k + 1) = x( * Prod_{k>0} (1 - x^(4*k))^2 / (1 - x^(2k)))^ 4 = x * (Sum_{k>0} x^(k^2 - k))^4 = Sum_{k>0} k * (x^k / (1 - x^k) - 3 * x^(2*k) / (1 - x^(2*k)) +2 * x^(4*k) / (1 - x^(4*k))). - Michael Somos, Jul 07 2004
Number of solutions of 2*n + 1 = (x^2 + y^2 + z^2 + w^2) / 4 in positive odd integers. - Michael Somos, Apr 11 2004
8 * a(n) = A005879(n) = A000118(2*n + 1). 16 * a(n) = A129588(n). a(n) = A000593(2*n + 1) = A115607(2*n + 1).
a(n) = A000203(2*n+1). - Omar E. Pol, Mar 14 2012
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = (1/4) (t/i)^2 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A096727. Michael Somos, Jun 12 2014
a(0) = 1, a(n) = (4/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
G.f.: exp(Sum_{k>=1} 4*(x^k/k)/(1 + x^k)). - Ilya Gutkovskiy, Jul 31 2017
From Peter Bala, Jan 10 2021: (Start)
a(n) = A002131(2*n+1).
G.f.: Sum_{n >= 0} x^n*(1 + x^(2*n+1))/(1 - x^(2*n+1))^2. (End)
Sum_{k=1..n} a(k) ~ Pi^2 * n^2 / 8. - Vaclav Kotesovec, Aug 07 2022
Convolution of A125061 and A138741. - Michael Somos, Mar 04 2023
EXAMPLE
Divisors of 9 are 1,3,9, so a(4)=1+3+9=13.
F_2(z) = eta(4z)^8/eta(2z)^4 = q + 4q^3 + 6q^5 +8q^7 + 13q^9 + ...
G.f. = 1 + 4*x + 6*x^2 + 8*x^3 + 13*x^4 + 12*x^5 + 14*x^6 + 24*x^7 + 18*x^8 + 20*x^9 + ...
B(q) = q + 4*q^3 + 6*q^5 + 8*q^7 + 13*q^9 + 12*q^11 + 14*q^13 + 24*q^15 + 18*q^17 + ...
MAPLE
A008438 := proc(n) numtheory[sigma](2*n+1) ; end proc: # R. J. Mathar, Mar 23 2011
MATHEMATICA
DivisorSigma[1, 2 # + 1] & /@ Range[0, 61] (* Ant King, Dec 02 2010 *)
a[ n_] := SeriesCoefficient[ D[ Series[ Log[ QPochhammer[ -x] / QPochhammer[ x]], {x, 0, 2 n + 1}], x], {x, 0 , 2n}]; (* Michael Somos, Oct 15 2019 *)
PROG
(PARI) {a(n) = if( n<0, 0, sigma( 2*n + 1))};
(PARI) {a(n) = if( n<0, 0, n = 2*n; polcoeff( sum( k=1, (sqrtint( 4*n + 1) + 1)\2, x^(k^2 - k), x * O(x^n))^4, n))}; /* Michael Somos, Sep 17 2004 */
(PARI) {a(n) = my(A); if( n<0, 0, n = 2*n; A = x * O(x^n); polcoeff( (eta(x^4 + A)^2 / eta(x^2 + A))^4, n))}; /* Michael Somos, Sep 17 2004 */
(Sage) ModularForms( Gamma0(4), 2, prec=124).1; # Michael Somos, Jun 12 2014
(Magma) Basis( ModularForms( Gamma0(4), 2), 124) [2]; /* Michael Somos, Jun 12 2014 */
(Haskell)
a008438 = a000203 . a005408 -- Reinhard Zumkeller, Sep 22 2014
(Magma) [DivisorSigma(1, 2*n+1): n in [0..70]]; // Vincenzo Librandi, Aug 01 2017
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.
KEYWORD
nonn,easy,nice
EXTENSIONS
Comments from Len Smiley, Enoch Haga
STATUS
approved
Number of ways of writing n as the sum of 2 triangular numbers.
+10
67
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,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.
Also the number of positive odd solutions to equation x^2 + y^2 = 8*n + 2. - Seiichi Manyama, May 28 2017
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
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.
R. P. Agarwal, Lambert series and Ramanujan, Prod. Indian Acad. Sci. (Math. Sci.), v. 103, n. 3, 1993, pp. 269-293 (see p. 285).
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, arXiv:math/0509316 [math.NT], 2005-2006; J. Combinatorial Theory, Series A, 113 (2006), 1732-1745.
Nicco, Conjectured identity of the product of two theta functions, Math Stackexchange, Sep 09 2015.
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.
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
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
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 *)
TriangeQ[n_] := IntegerQ@Sqrt[8n +1]; Table[Count[FrobeniusSolve[{1, 1}, n], {__?TriangeQ}], {n, 0, 104}] (* Robert G. Wilson v, Apr 15 2017 *)
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 */
(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
(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
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).
KEYWORD
nonn,easy
EXTENSIONS
More terms and information from Michael Somos, Mar 23 2003
STATUS
approved
Fourier coefficients of E_{infinity,4}.
(Formerly M4503)
+10
41
0, 1, 8, 28, 64, 126, 224, 344, 512, 757, 1008, 1332, 1792, 2198, 2752, 3528, 4096, 4914, 6056, 6860, 8064, 9632, 10656, 12168, 14336, 15751, 17584, 20440, 22016, 24390, 28224, 29792, 32768, 37296, 39312, 43344, 48448, 50654, 54880, 61544, 64512
OFFSET
0,3
COMMENTS
E_{infinity,4} is the unique normalized weight-4 modular form for Gamma_0(2) with simple zeros at i*infinity. Since this has level 2, it is not a cusp form, in contrast to A002408.
a(n+1) is the number of representations of n as a sum of 8 triangular numbers (from A000217). See the Ono et al. link, Theorem 5.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
a(n) gives the sum of cubes of divisors d of n such that n/d is odd. This is called sigma^#_3(n) in the Ono et al. link. See a formula below. - Wolfdieter Lang, Jan 12 2017
REFERENCES
B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 139, Ex (ii).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..1001 from T. D. Noe)
B. Brent, Quadratic Minima and Modular Forms, Experimental Mathematics, v.7 no.3, 257-274.
H. H. Chan and C. Krattenthaler, Recent progress in the study of representations of integers as sums of squares, arXiv:math/0407061 [math.NT], 2004.
J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, p. 187.
J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4 and p. 8).
Masao Koike, Modular forms on non-compact arithmetic triangle groups, Unpublished manuscript [Extensively annotated with OEIS A-numbers by N. J. A. Sloane, Feb 14 2021. I wrote 2005 on the first page but the internal evidence suggests 1997.]
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. Theorem 5.
H. Rosengren, Sums of triangular numbers from the Frobenius determinant, arXiv:math/0504272 [math.NT], 2005.
FORMULA
G.f.: q * Product_{k>=1} (1-q^k)^8 * (1+q^k)^16. - corrected by Vaclav Kotesovec, Oct 14 2015
a(n) = Sum_{0<d|n, n/d odd} d^3. [Glaisher]
G.f.: Sum_{n>0} n^3*x^n/(1-x^(2*n)). - Vladeta Jovovic, Oct 24 2002
Expansion of Jacobi theta constant theta_2(q)^8 / 256 in powers of q.
Expansion of eta(q^2)^16 / eta(q)^8 in powers of q. - Michael Somos, May 31 2005
Expansion of x * psi(x)^8 in powers of x where psi() is a Ramanujan theta function. - Michael Somos, Jan 15 2012
Expansion of (Q(x) - Q(x^2)) / 240 in powers of x where Q() is a Ramanujan Lambert series. - Michael Somos, Jan 15 2012
Expansion of E_{gamma,2}^2 * E_{0,4} in powers of q.
Euler transform of period 2 sequence [8, -8, ...]. - Michael Somos, May 31 2005
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = v^3 - u^2*w + 16*u*v*w - 32*v^2*w + 256*v*w^2. - Michael Somos, May 31 2005
G.f. is a period 1 Fourier series which satisfies f(-1 / (2 t)) = 16^(-1) (t / i)^4 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A035016. - Michael Somos, Jan 11 2009
Multiplicative with a(2^e) = 2^(3e), a(p^e) = (p^(3(e+1))-1)/(p^3-1). - Mitch Harris, Jun 13 2005
Dirichlet convolution of A154955 by A001158. Dirichlet g.f. zeta(s)*zeta(s-3)*(1-1/2^s). - R. J. Mathar, Mar 31 2011
A002408(n) = -(-1)^n * a(n).
Convolution square of A008438. - Michael Somos, Jun 15 2014
a(1) = 1, a(n) = (8/(n-1))*Sum_{k=1..n-1} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
Sum_{k=1..n} a(k) ~ c * n^4, where c = Pi^4/384 = 0.253669... (A222072). - Amiram Eldar, Oct 19 2022
EXAMPLE
G.f. = q + 8*q^2 + 28*q^3 + 64*q^4 + 126*q^5 + 224*q^6 + 344*q^7 + 512*q^8 + ...
MAPLE
nmax:=40: seq(coeff(series(x*(product((1-x^k)^8*(1+x^k)^16, k=1..nmax)), x, n+1), x, n), n=0..nmax); # Vaclav Kotesovec, Oct 14 2015
MATHEMATICA
Prepend[Table[Plus @@ (Select[Divisors[k + 1], OddQ[(k + 1)/#] &]^3), {k, 0, 39}], 0] (* Ant King, Dec 04 2010 *)
a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, q^(1/2)]^8 / 256, {q, 0, n}]; (* Michael Somos, Jun 04 2013 *)
a[ n_] := If[ n < 1, 0, Sum[ d^3 Boole[ OddQ[ n/d]], {d, Divisors[ n]}]]; (* Michael Somos, Jun 04 2013 *)
f[n_] := Total[(2n/Select[ Divisors[ 2n], Mod[#, 4] == 2 &])^3]; Flatten[{0, Array[f, 40] }] (* Robert G. Wilson v, Mar 26 2015 *)
nmax=60; CoefficientList[Series[x*Product[(1-x^k)^8 * (1+x^k)^16, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Oct 14 2015 *)
QP = QPochhammer; s = q * (QP[-1, q]/2)^16 * QP[q]^8 + O[q]^50; CoefficientList[s, q] (* Jean-François Alcover, Dec 01 2015, adapted from PARI *)
PROG
(PARI) {a(n) = if( n<1, 0, sumdiv( n, d, (n/d%2) * d^3))}; /* Michael Somos, May 31 2005 */
(PARI) {a(n) = local(A); if( n<1, 0, n--; A = x * O(x^n); polcoeff( (eta(x^2 + A)^2 / eta(x + A))^8, n))}; /* Michael Somos, May 31 2005 */
(PARI) a(n)=my(e=valuation(n, 2)); 8^e * sigma(n/2^e, 3) \\ Charles R Greathouse IV, Sep 09 2014
(Sage) ModularForms( Gamma0(2), 4, prec=33).1; # Michael Somos, Jun 04 2013
(Magma) Basis( ModularForms( Gamma0(2), 4), 10) [2]; /* Michael Somos, May 27 2014 */
(Python)
from sympy import divisors
def a(n):
return 0 if n == 0 else sum(((n//d)%2)*d**3 for d in divisors(n))
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 24 2017
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, A076577.
KEYWORD
easy,nice,nonn,mult
EXTENSIONS
Additional comments from Barry Brent (barryb(AT)primenet.com)
Wrong Maple program replaced by Vaclav Kotesovec, Oct 14 2015
a(0)=0 prepended by Vaclav Kotesovec, Oct 14 2015
STATUS
approved
Expansion of Jacobi theta constant theta_2^5 /32.
+10
20
1, 5, 10, 15, 25, 31, 35, 55, 60, 60, 90, 90, 95, 135, 125, 126, 170, 180, 175, 215, 220, 195, 285, 280, 245, 340, 300, 320, 405, 350, 351, 450, 465, 415, 515, 480, 425, 620, 590, 505, 655, 625, 590, 755, 660, 650, 805, 770, 755, 855, 841, 730, 1045, 960, 770, 1100
OFFSET
0,2
COMMENTS
Also number of ways of writing n as a sum of five triangular numbers. - N. J. A. Sloane, Jun 01 2013
REFERENCES
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
LINKS
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.
FORMULA
a(0) = 1, a(n) = (5/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, May 06 2017
G.f.: exp(Sum_{k>=1} 5*(x^k/k)/(1 + x^k)). - Ilya Gutkovskiy, Jul 31 2017
MATHEMATICA
a002129[n_]:=-Sum[(-1)^d*d, {d, Divisors[n]}]; a[n_]:=a[n]=If[n==0, 1, 5 Sum[a002129[k] a[n - k], {k, n}]/n]; Table[a[n], {n, 0, 100}] (* Indranil Ghosh, Aug 02 2017 *)
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.
KEYWORD
nonn
EXTENSIONS
More terms from Seiichi Manyama, May 05 2017
STATUS
approved
Expansion of Jacobi theta constant theta_2^6 /(64q^(3/2)).
+10
19
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,2
COMMENTS
Number of representations of n as sum of 6 triangular numbers. - Michel Marcus, Oct 24 2012. See the Ono et al. link.
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.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Vincenzo Librandi)
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. Theorem 4.
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
EXAMPLE
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 + ...
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 *)
PROG
(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 */
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.
KEYWORD
nonn,easy
STATUS
approved
a(n) = 12*H(n) where H() is the Hurwitz class number.
+10
19
-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,4
COMMENTS
Coefficients of q-expansion of Eisenstein series G_{3/2}(tau) multiplied by 12. - N. J. A. Sloane, Mar 16 2019
LINKS
K. Bringmann and J. Lovejoy, Overpartitions and class numbers of binary quadratic forms, arXiv:0712.0631 [math.NT], 2007. See page 5, equation (1.12).
D. Zagier, Modular Forms of One Variable, Notes based on a course given in Utrecht, 1991. See page 50.
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
EXAMPLE
G.f. = -1 + 4*x^3 + 6*x^4 + 12*x^7 + 12*x^8 + 12*x^11 + 16*x^12 + 24*x^15 + ...
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 *)
PROG
(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)))};
KEYWORD
sign
AUTHOR
Michael Somos, Jul 05 2015
STATUS
approved
Number of ways of writing n as an unordered sum of at most 3 nonzero triangular numbers.
(Formerly M0076 N0027)
+10
18
1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 3, 2, 1, 2, 3, 2, 2, 2, 1, 4, 3, 2, 2, 2, 2, 3, 3, 1, 4, 4, 2, 2, 3, 2, 3, 4, 2, 3, 3, 2, 4, 3, 2, 4, 4, 2, 4, 4, 1, 4, 5, 1, 2, 3, 4, 6, 4, 3, 2, 5, 2, 3, 3, 3, 6, 5, 2, 2, 5, 3, 5, 4, 2, 4, 5, 3, 4, 5, 2, 4, 6, 2, 6, 3, 3, 6, 3, 2, 3, 7, 3, 6, 6, 2, 4, 6, 3, 2
OFFSET
0,4
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: EYPHKA! num = DELTA + DELTA + DELTA.
a(n) <= A167618(n). - Reinhard Zumkeller, Nov 07 2009
Equivalently, number of ways of writing n as an unordered sum of exactly 3 triangular numbers. - Jon E. Schoenfield, Mar 28 2021
REFERENCES
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102, eq. (8).
D. H. Lehmer, Review of Loria article, Math. Comp. 2 (1947), 301-302.
G. Loria, Sulla scomposizione di un intero nella somma di numeri poligonali. (Italian) Atti Accad. Naz. Lincei. Rend. Cl. Sci. Fis. Mat. Nat. (8) 1, (1946). 7-15.
Mel Nathanson, Additive Number Theory: The Classical Bases, Graduate Texts in Mathematics, Volume 165, Springer-Verlag, 1996. See Chapter 1.
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).
LINKS
Gino Loria, Sulla scomposizione di un intero nella somma di numeri poligonali. (Italian). Atti Accad. Naz. Lincei. Rend. Cl. Sci. Fis. Mat. Nat. (8) 1, (1946). 7-15. Also D. H. Lehmer, Review of Loria article, Math. Comp. 2 (1947), 301-302. [Annotated scanned copies]
James A. Sellers, Partitions Excluding Specific Polygonal Numbers As Parts, Journal of Integer Sequences, Vol. 7 (2004), Article 04.2.4.
EXAMPLE
0 : empty sum
1 : 1
2 : 1+1
3 : 3 = 1+1+1
4 : 3+1
5 : 3+1+1
6 : 6 = 3+3
7 : 6+1 = 3+3+1
...
13 : 10 + 3 = 6 + 6 + 1, so a(13) = 2.
MATHEMATICA
a = Table[ n(n + 1)/2, {n, 0, 15} ]; b = {0}; c = Table[ 0, {100} ]; Do[ b = Append[ b, a[ [ i ] ] + a[ [ j ] ] + a[ [ k ] ] ], {k, 1, 15}, {j, 1, k}, {i, 1, j} ]; b = Delete[ b, 1 ]; b = Sort[ b ]; l = Length[ b ]; Do[ If[ b[ [ n ] ] < 100, c[ [ b[ [ n ] ] + 1 ] ]++ ], {n, 1, l} ]; c
PROG
(PARI) first(n)=my(v=vector(n+1), A, B, C); for(a=0, n, A=a*(a+1)/2; if(A>n, break); for(b=0, a, B=A+b*(b+1)/2; if(B>n, break); for(c=0, b, C=B+c*(c+1)/2; if(C>n, break); v[C+1]++))); v \\ Charles R Greathouse IV, Jun 23 2017
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, Sep 18 2001
EXTENSIONS
More terms from Robert G. Wilson v, Sep 20 2001
Entry revised by N. J. A. Sloane, Feb 25 2007
STATUS
approved

Search completed in 0.036 seconds