login
Search: a166952 -id:a166952
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of ways of writing n as a sum of n squares.
+10
25
1, 2, 4, 8, 24, 112, 544, 2368, 9328, 34802, 129064, 491768, 1938336, 7801744, 31553344, 127083328, 509145568, 2035437440, 8148505828, 32728127192, 131880275664, 532597541344, 2153312518240, 8710505815360, 35250721087168, 142743029326162, 578472382307304
OFFSET
0,2
LINKS
John Holley-Reid and Jeremy Rouse, The number of representations of n as a growing number of squares, arXiv:1910.01001 [math.NT], 2019.
FORMULA
a(n) equals the coefficient of x^n in the n-th power of Jacobi theta_3(x) where theta_3(x) = 1 + 2*Sum_{n>=1} x^(n^2). - Paul D. Hanna, Oct 25 2009
a(n) ~ c * d^n / sqrt(n), where d = 4.13273137623493996302796465... (= 1/radius of convergence A166952), c = 0.2820942036723951157919967... . - Vaclav Kotesovec, Sep 12 2014
EXAMPLE
There are a(3) = 8 solutions (x,y,z) of 3 = x^2 + y^2 + z^2: (1,1,1), (-1,-1,-1), 3 permutations of (1,1,-1) and 3 permutations of (1,-1,-1).
MAPLE
b:= proc(n, t) option remember; `if`(n=0, 1, `if`(n<0 or t<1, 0,
b(n, t-1) +2*add(b(n-j^2, t-1), j=1..isqrt(n))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..30); # Alois P. Heinz, Jul 16 2014
MATHEMATICA
Join[{1}, Table[SquaresR[n, n], {n, 24}]]
PROG
(PARI) {a(n)=local(THETA3=1+2*sum(k=1, sqrtint(n), x^(k^2))+x*O(x^n)); polcoeff(THETA3^n, n)} /* Paul D. Hanna, Oct 25 2009 */
CROSSREFS
Cf. A122141, A166952. - Paul D. Hanna, Oct 25 2009
a(n^2) gives A361431.
KEYWORD
nonn
AUTHOR
Peter Bertok (peter(AT)bertok.com), Jan 07 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 12 2002
a(0) added by Paul D. Hanna, Oct 25 2009
Edited by R. J. Mathar, Oct 29 2009
STATUS
approved
a(n) = [x^n] theta_3(x)^n/(1 - x), where theta_3() is the Jacobi theta function.
+10
6
1, 3, 9, 27, 89, 333, 1341, 5449, 21697, 84663, 327829, 1275739, 5020457, 19964623, 79883141, 320317827, 1284656385, 5152761033, 20686311261, 83182322509, 335110196569, 1352277390001, 5463873556381, 22097867887045, 89441286136465, 362277846495883, 1468465431530457
OFFSET
0,2
COMMENTS
a(n) = number of integer lattice points inside the n-dimensional hypersphere of radius sqrt(n).
FORMULA
a(n) = A122510(n,n).
a(n) ~ c / (sqrt(n) * r^n), where r = 0.241970723224463308846762732757915397312... (= radius of convergence A166952) and c = 0.716940866073606328... - Vaclav Kotesovec, Apr 14 2018
MATHEMATICA
Table[SeriesCoefficient[EllipticTheta[3, 0, x]^n/(1 - x), {x, 0, n}], {n, 0, 26}]
Table[SeriesCoefficient[1/(1 - x) Sum[x^k^2, {k, -n, n}]^n, {x, 0, n}], {n, 0, 26}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 14 2018
STATUS
approved
Number of ways of writing n as a sum of n+1 squares.
+10
4
1, 4, 12, 32, 90, 312, 1288, 5504, 22608, 88660, 339064, 1297056, 5043376, 19975256, 80027280, 321692928, 1291650786, 5177295432, 20748447108, 83279292960, 335056780464, 1351064867328, 5456890474248, 22063059606912
OFFSET
0,2
LINKS
FORMULA
a(n) equals the coefficient of x^n in the (n+1)-th power of Jacobi theta_3(x) where theta_3(x) = 1 + 2*Sum_{n>=1} x^(n^2). - Paul D. Hanna, Oct 26 2009
a(n) is divisible by n+1: a(n)/(n+1) = A166952(n) for n>=0. - Paul D. Hanna, Oct 26 2009
a(n) ~ c * d^n / sqrt(n), where d = 4.13273137623493996302796465... (= 1/radius of convergence A166952), c = 0.70710538549959357505200... . - Vaclav Kotesovec, Sep 10 2014
EXAMPLE
There are a(2)=12 solutions (x,y,z) of 2=x^2+y^2+z^2: 3 permutations of (1,1,0), 3 permutations of (-1,-1,0) and 6 permutations of (1, -1,0).
MATHEMATICA
Join[{1}, Table[SquaresR[n+1, n], {n, 24}]]
(* Calculation of constants {d, c}: *) {1/r, Sqrt[s/(2*Pi*r^2*Derivative[0, 0, 2][EllipticTheta][3, 0, r*s])]} /. FindRoot[{s == EllipticTheta[3, 0, r*s], r*Derivative[0, 0, 1][EllipticTheta][3, 0, r*s] == 1}, {r, 1/4}, {s, 5/2}, WorkingPrecision -> 70] (* Vaclav Kotesovec, Nov 16 2023 *)
PROG
(PARI) {a(n)=local(THETA3=1+2*sum(k=1, sqrtint(n), x^(k^2))+x*O(x^n)); polcoeff(THETA3^(n+1), n)} /* Paul D. Hanna, Oct 26 2009*/
CROSSREFS
Cf. A122141, A166952. - Paul D. Hanna, Oct 26 2009
KEYWORD
nonn
AUTHOR
Peter Bertok (peter(AT)bertok.com), Jan 07 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 12, 2002
a(0) added by Paul D. Hanna, Oct 26 2009
Edited by R. J. Mathar, Oct 29 2009
STATUS
approved
G.f. satisfies: A(x) = theta_3( x*A(x) )^2, where theta_3(x) is Jacobi's theta_3 function.
+10
0
1, 4, 20, 112, 676, 4312, 28704, 197600, 1397060, 10090676, 74152456, 552666448, 4167528000, 31736182776, 243698432960, 1884809367456, 14668777816708, 114789815231560, 902661488046900, 7129068237647408, 56524456978032904, 449752267499647104
OFFSET
0,2
FORMULA
G.f. A(x) satisfies:
(1) A(x) = (1 + 2*Sum_{n>=1} (x*A(x))^(n^2) )^2.
(2) A(x) = 1 + 4*Sum_{n>=1} (x*A(x))^n / (1 + (x*A(x))^(2*n)).
(3) A(x) = Product_{n>=1} (1 - (-x)^n*A(x)^n)^2 / (1 + (-x)^n*A(x)^n)^2.
(4) A( x/theta_3(x)^2 ) = theta_3(x)^2.
(5) A(x) = (1/x)*Series_Reversion(x/theta_3(x)^2), where theta_3(x) = 1 + 2*Sum_{n>=1} x^(n^2).
a(n) = [x^n] theta_3(x)^(2*n+2) / (n+1).
a(n) ~ c * d^n / n^(3/2), where d = 8.54148362320612002563896433934021488424489314523756456892173912667254... and c = 1.2437677914754786190190604348779334425700766084860016245397106832001... - Vaclav Kotesovec, Nov 16 2023
EXAMPLE
G.f.: A(x) = 1 + 4*x + 20*x^2 + 112*x^3 + 676*x^4 + 4312*x^5 + 28704*x^6 +...
Given g.f. A(x), let q = x*A(x), then by a q-series identity:
A(x) = 1 + 4*q/(1+q^2) + 4*q^2/(1+q^4) + 4*q^3/(1+q^6) + 4*q^4/(1+q^8) +...
A(x) = (1 + 2*q + 2*q^4 + 2*q^9 + 2*q^16 + 2*q^25 +...)^2.
...
Illustrate a(n) = [x^n] theta_3(x)^(2*n+2) / (n+1) by the following table of coefficients in powers theta_3(x)^(2*n+2) for n>=0:
n=0: [(1), 4, 4, 0, 4, 8, 0, 0, 4, 4, 8, 0, 0, 8, 0, 0,...];
n=1: [1, (8), 24, 32, 24, 48, 96, 64, 24, 104, 144, 96, 96, 112,...];
n=2: [1, 12, (60), 160, 252, 312, 544, 960, 1020, 876, 1560, 2400,...];
n=3: [1, 16, 112, (448), 1136, 2016, 3136, 5504, 9328, 12112,...];
n=4: [1, 20, 180, 960, (3380), 8424, 16320, 28800, 52020, 88660,...];
n=5: [1, 24, 264, 1760, 7944, (25872), 64416, 133056, 253704,...];
n=6: [1, 28, 364, 2912, 16044, 64792, (200928), 503360, ...];
n=7: [1, 32, 480, 4480, 29152, 140736, 525952, (1580800), ...]; ...
where the coefficients in parenthesis form the initial terms of this sequence:
A = [1/1, 8/2, 60/3, 448/4, 3380/5, 25872/6, 200928/7, 1580800/8, ...].
MATHEMATICA
CoefficientList[1/x * InverseSeries[Series[x/EllipticTheta[3, 0, x]^2, {x, 0, 25}], x], x] (* Vaclav Kotesovec, Nov 16 2023 *)
(* Calculation of constants {d, c}: *) {1/r, s/Sqrt[Pi*(1 + 4 * r^2 * s^(3/2) * Derivative[0, 0, 2][EllipticTheta][3, 0, r*s])]} /. FindRoot[{s == EllipticTheta[3, 0, r*s]^2, 2*r*Sqrt[s]*Derivative[0, 0, 1][EllipticTheta][3, 0, r*s] == 1}, {r, 1/8}, {s, 3/2}, WorkingPrecision -> 70] (* Vaclav Kotesovec, Nov 16 2023 *)
PROG
(PARI) {a(n)=local(A=1+x); for(i=1, n, A=1+4*sum(m=1, n, (x*A)^m/(1+(x*A+x*O(x^n))^(2*m)))); polcoeff(A, n)}
(PARI) {a(n)=local(A=1+x); for(i=1, n, A=(1+2*sum(m=1, sqrtint(n+1), (x*A+x*O(x^n))^(m^2)))^2); polcoeff(A, n)}
(PARI) {a(n)=local(A=1+x); for(i=1, n, A=prod(m=1, n, (1-(-x)^m*A^m)/(1+(-x)^m*A^m +x*O(x^n)))^2); polcoeff(A, n)}
for(n=0, 30, print1(a(n), ", "))
CROSSREFS
Cf. A166952.
KEYWORD
nonn
AUTHOR
Paul D. Hanna, May 14 2012
STATUS
approved

Search completed in 0.005 seconds