Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a000152 -id:a000152
     Sort: relevance | references | number | modified | created      Format: long | short | data
Array: T(d,n) = number of ways of writing n as a sum of d squares, read by ascending antidiagonals.
+10
29
1, 1, 2, 1, 4, 0, 1, 6, 4, 0, 1, 8, 12, 0, 2, 1, 10, 24, 8, 4, 0, 1, 12, 40, 32, 6, 8, 0, 1, 14, 60, 80, 24, 24, 0, 0, 1, 16, 84, 160, 90, 48, 24, 0, 0, 1, 18, 112, 280, 252, 112, 96, 0, 4, 2, 1, 20, 144, 448, 574, 312, 240, 64, 12, 4, 0, 1, 22, 180, 672, 1136, 840, 544, 320, 24, 30, 8, 0
OFFSET
1,3
COMMENTS
This is the transpose of the array in A286815.
T(d,n) is divisible by 2d for any n != 0 iff d is a power of 2. - Jianing Song, Sep 05 2018
FORMULA
T(n,n) = A066535(n). - Alois P. Heinz, Jul 16 2014
EXAMPLE
Array T(d,n) with rows d = 1,2,3,... and columns n = 0,1,2,3,... reads
1 2 0 0 2 0 0 0 0 2 0 ...
1 4 4 0 4 8 0 0 4 4 8 ...
1 6 12 8 6 24 24 0 12 30 24 ...
1 8 24 32 24 48 96 64 24 104 144 ...
1 10 40 80 90 112 240 320 200 250 560 ...
1 12 60 160 252 312 544 960 1020 876 1560 ...
1 14 84 280 574 840 1288 2368 3444 3542 4424 ...
1 16 112 448 1136 2016 3136 5504 9328 12112 14112 ...
1 18 144 672 2034 4320 7392 12672 22608 34802 44640 ...
1 20 180 960 3380 8424 16320 28800 52020 88660 129064 ...
MAPLE
A122141 := proc(d, n) local i, cnts ; cnts := 0 ; for i from -trunc(sqrt(n)) to trunc(sqrt(n)) do if n-i^2 >= 0 then if d > 1 then cnts := cnts+procname(d-1, n-i^2) ; elif n-i^2 = 0 then cnts := cnts+1 ; fi ; fi ; od ; cnts ;
end:
for diag from 1 to 14 do for n from 0 to diag-1 do d := diag-n ; printf("%d, ", A122141(d, n)) ; od ; od;
# second Maple program:
A:= proc(d, n) option remember; `if`(n=0, 1, `if`(n<0 or d<1, 0,
A(d-1, n) +2*add(A(d-1, n-j^2), j=1..isqrt(n))))
end:
seq(seq(A(h-n, n), n=0..h-1), h=1..14); # Alois P. Heinz, Jul 16 2014
MATHEMATICA
Table[ SquaresR[d - n, n], {d, 1, 12}, {n, 0, d - 1}] // Flatten (* Jean-François Alcover, Jun 13 2013 *)
A[d_, n_] := A[d, n] = If[n==0, 1, If[n<0 || d<1, 0, A[d-1, n] + 2*Sum[A[d-1, n-j^2], {j, 1, Sqrt[n]}]]]; Table[A[h-n, n], {h, 1, 14}, {n, 0, h-1}] // Flatten (* Jean-François Alcover, Feb 28 2018, after Alois P. Heinz *)
PROG
(Python)
from sympy.core.power import isqrt
from functools import cache
@cache
def T(d, n):
if n == 0: return 1
if n < 0 or d < 1: return 0
return T(d-1, n) + sum(T(d-1, n-(j**2)) for j in range(1, isqrt(n)+1)) * 2 # Darío Clavijo, Feb 06 2024
CROSSREFS
Cf. A000122 (1st row), A004018 (2nd row), A005875 (3rd row), A000118 (4th row), A000132 (5th row), A000141 (6th row), A008451 (7th row), A000143 (8th row), A008452 (9th row), A000144 (10th row), A008453 (11th row), A000145 (12th row), A276285 (13th row), A276286 (14th row), A276287 (15th row), A000152 (16th row).
Cf. A005843 (2nd column), A046092 (3rd column), A130809 (4th column).
Cf. A010052 (1st row divides 2), A002654 (2nd row divides 4), A046897 (4th row divides 8), A008457 (8th row divides 16), A302855 (16th row divides 32), A302857 (32nd row divides 64).
KEYWORD
nonn,tabl
AUTHOR
R. J. Mathar, Oct 29 2006
STATUS
approved
Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of (Product_{j>=1} (1 - x^(2*j))^5/((1 - x^j)*(1 - x^(4*j)))^2)^k.
+10
26
1, 1, 0, 1, 2, 0, 1, 4, 0, 0, 1, 6, 4, 0, 0, 1, 8, 12, 0, 2, 0, 1, 10, 24, 8, 4, 0, 0, 1, 12, 40, 32, 6, 8, 0, 0, 1, 14, 60, 80, 24, 24, 0, 0, 0, 1, 16, 84, 160, 90, 48, 24, 0, 0, 0, 1, 18, 112, 280, 252, 112, 96, 0, 4, 2, 0, 1, 20, 144, 448, 574, 312, 240, 64, 12
OFFSET
0,5
COMMENTS
A(n,k) is the number of ways of writing n as a sum of k squares.
This is the transpose of the array in A122141.
FORMULA
G.f. of column k: (Product_{j>=1} (1 - x^(2*j))^5/((1 - x^j)*(1 - x^(4*j)))^2)^k.
EXAMPLE
Square array begins:
1, 1, 1, 1, 1, ...
0, 2, 4, 6, 8, ...
0, 0, 4, 12, 24, ...
0, 0, 0, 8, 32, ...
0, 2, 4, 6, 24, ...
MAPLE
A:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
A(n, k-1) +2*add(A(n-j^2, k-1), j=1..isqrt(n))))
end:
seq(seq(A(n, d-n), n=0..d), d=0..12); # Alois P. Heinz, May 27 2017
MATHEMATICA
A[n_, k_] := A[n, k] = If[n == 0, 1, If[n < 0 || k < 1, 0, A[n, k-1] + 2*Sum[A[n-j^2, k-1], {j, 1, Sqrt[n]}]]];
Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 28 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Seiichi Manyama, May 27 2017
STATUS
approved
Number of ways of writing n as a sum of 13 squares.
+10
6
1, 26, 312, 2288, 11466, 41808, 116688, 265408, 535704, 1031914, 1899664, 3214224, 5043376, 7801744, 12066912, 17689152, 24443978, 34039200, 48210760, 64966096, 83323344, 109157152, 145532816, 185245632, 227110416, 284788010, 363737712
OFFSET
0,2
COMMENTS
More generally, the ordinary generating function for the number of ways of writing n as a sum of k squares is theta_3(0, q)^k = 1 + 2*k*q + 2*(k - 1)*k*q^2 + (4/3)*(k - 2)*(k - 1)*k*q^3 + (2/3)*((k - 3)*(k - 2)*(k - 1) + 3)*k*q^4 + (4/15) *(k - 1)*k*(k^3 - 9*k^2 + 26*k - 9)*q^5 + ..., where theta is the Jacobi theta functions.
LINKS
Eric Weisstein's World of Mathematics, Sum of Squares Function
Eric Weisstein's World of Mathematics, Jacobi Theta Functions
FORMULA
G.f.: theta_3(0,q)^13, where theta_3(x,q) is the third Jacobi theta function.
a(n) = (26/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
MATHEMATICA
Table[SquaresR[13, n], {n, 0, 26}]
CROSSREFS
13th column of A286815. - Seiichi Manyama, May 27 2017
Row d=13 of A122141.
Cf. Number of ways of writing n as a sum of k squares: A004018 (k = 2), A005875 (k = 3), A000118 (k = 4), A000132 (k = 5), A000141 (k = 6), A008451 (k = 7), A000143 (k = 8), A008452 (k = 9), A000144 (k = 10), A008453 (k = 11), A000145 (k = 12), this sequence (k = 13), A000152 (k = 16).
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Aug 27 2016
STATUS
approved
(7*n)!
+10
5
1, 5040, 87178291200, 51090942171709440000, 304888344611713860501504000000, 10333147966386144929666651337523200000000, 1405006117752879898543142606244511569936384000000000
OFFSET
0,2
LINKS
PROG
(Magma) [Factorial(7*n): n in [0..10]]
(PARI) a(n)=(7*n)! \\ Charles R Greathouse IV, Dec 27 2011
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Sep 24 2011
STATUS
approved
Expansion of theta_4(q)^16 in powers of q = exp(Pi i t).
+10
5
1, -32, 480, -4480, 29152, -140736, 525952, -1580800, 3994080, -8945824, 18626112, -36714624, 67978880, -118156480, 197120256, -321692928, 509145568, -772845120, 1143441760, -1681379200, 2428524096, -3392205824, 4658843520, -6411152640, 8705492608, -11488092896
OFFSET
0,2
LINKS
FORMULA
Expansion of eta(q)^32 / eta(q^2)^16 in powers of q.
CROSSREFS
theta_4(q)^b: A002448 (b=1), A104794 (b=2), A213384 (b=3), A096727 (b=4), A035016 (b=8), A286346 (b=12), this sequence (b=16), A319308 (b=20), A319309 (b=24), A319310 (b=28).
Cf. A000152.
KEYWORD
sign
AUTHOR
Seiichi Manyama, Sep 16 2018
STATUS
approved
Theta series of D_16 lattice.
+10
4
1, 480, 29152, 525952, 3994080, 18626112, 67978880, 197120256, 509145568, 1143441760, 2428524096, 4658843520, 8705492608, 15000919872, 25593401600, 40864033536, 65187410400, 98098623936, 148724365664, 213678303360, 310833534528, 430766443520, 605650030464, 813970121472
OFFSET
0,2
REFERENCES
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 118.
LINKS
MATHEMATICA
terms = 18; s = EllipticTheta[3, 0, x]^16 + O[x]^(2 terms); Partition[ CoefficientList[s, x], 2][[All, 1]][[1 ;; terms]] (* Jean-François Alcover, Jul 06 2017 *)
CROSSREFS
a(n) = A000152(2*n).
KEYWORD
nonn
EXTENSIONS
More terms from Seiichi Manyama, Oct 16 2018
STATUS
approved
(8*n)!
+10
3
1, 40320, 20922789888000, 620448401733239439360000, 263130836933693530167218012160000000, 815915283247897734345611269596115894272000000000, 12413915592536072670862289047373375038521486354677760000000000
OFFSET
0,2
LINKS
PROG
(Magma) [Factorial(8*n): n in [0..10]]
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Sep 24 2011
STATUS
approved
Expansion of ((1 + 2 * Sum_{k>=1} q^(k^2))^16 - 1) / 32.
+10
3
1, 15, 140, 911, 4398, 16436, 49400, 124815, 279557, 582066, 1147332, 2124340, 3692390, 6160008, 10052904, 15910799, 24151410, 35732555, 52543100, 75891378, 106006432, 145588860, 200348520, 272046644, 359002903, 468778746, 615548600, 799793800, 1014602070, 1277001048
OFFSET
1,2
LINKS
FORMULA
a(n) = A000152(n) / 32.
CROSSREFS
Expansion of ((1 + 2 * Sum_{k>=1} q^(k^2))^(2^m) - 1) / 2^(m + 1): A002654 (m=1), A046897 (m=2), A008457 (m=3), this sequence (m=4), A302857 (m=5).
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Apr 14 2018
STATUS
approved
a(n) = (9*n)!.
+10
2
1, 362880, 6402373705728000, 10888869450418352160768000000, 371993326789901217467999448150835200000000, 119622220865480194561963161495657715064383733760000000000
OFFSET
0,2
LINKS
MATHEMATICA
(9Range[0, 10])! (* Harvey P. Dale, Jan 25 2023 *)
PROG
(Magma) [Factorial(9*n): n in [0..10]]
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Sep 24 2011
STATUS
approved
Expansion of (Sum x^(n^2), n = -inf .. inf )^(-16).
+10
1
1, -32, 544, -6528, 61984, -495040, 3453312, -21581568, 123040288, -648624288, 3194776000, -14823993472, 65231647104, -273714726080, 1100198199040, -4252621927680, 15859616674336, -57229459033664
OFFSET
0,2
LINKS
FORMULA
a(n) ~ (-1)^n * exp(Pi*sqrt(m*n)) * m^((m+1)/4) / (2^(3*(m+1)/2) * n^((m+3)/4)), set m = 16 for this sequence. - Vaclav Kotesovec, Aug 18 2015
From Ilya Gutkovskiy, Sep 20 2018: (Start)
G.f.: 1/theta_3(x)^16, where theta_3() is the Jacobi theta function.
G.f.: Product_{k>=1} 1/((1 - x^(2*k))*(1 + x^(2*k-1))^2)^16. (End)
MATHEMATICA
nmax = 30; CoefficientList[Series[Product[((1 + (-x)^k)/(1 - (-x)^k))^16, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 18 2015 *)
PROG
(PARI) q='q+O('q^99); Vec(((eta(q)*eta(q^4))^2/eta(q^2)^5)^16) \\ Altug Alkan, Sep 20 2018
CROSSREFS
KEYWORD
sign
STATUS
approved

Search completed in 0.016 seconds