|
|
A098077
|
|
a(n) = n^2*(n+1)*(2*n+1)/3.
|
|
10
|
|
|
2, 20, 84, 240, 550, 1092, 1960, 3264, 5130, 7700, 11132, 15600, 21294, 28420, 37200, 47872, 60690, 75924, 93860, 114800, 139062, 166980, 198904, 235200, 276250, 322452, 374220, 431984, 496190, 567300, 645792, 732160, 826914, 930580, 1043700
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Sum of all matrix elements M(i,j) = i^2 + j^2 (i,j = 1,...,n).
The sum of the antidiagonal of M(n) equals tr(M(n)).
M(n) = M(n)' (Symmetric).
(End)
Consider the partitions of 2n into two parts (p,q) where p <= q. Then a(n) is the total volume of the family of rectangular prisms with dimensions p, p and p+q. - Wesley Ivan Hurt, Apr 15 2018
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{j=1..n} Sum_{i=1..n} (i^2 + j^2).
G.f.: 2*x*(1 + 5*x + 2*x^2)/(1-x)^5. - Colin Barker, May 04 2012
E.g.f.: (1/3)*exp(x)*x*(6 + 24*x + 15*x^2 + 2*x^3) . - Stefano Spezia, Jan 06 2020
a(n) = a(n-1) + (8*n^3 - 3*n^2 + n)/3. - Torlach Rush, Jan 07 2020
Sum_{n>=1} 1/a(n) = Pi^2/2 + 24*log(2) - 21.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/4 - 6*Pi - 6*log(2) + 21. (End)
|
|
EXAMPLE
|
a(2) = (1^2 + 1^2) + (1^2 + 2^2) + (2^2 + 1^2) + (2^2 + 2^2) = 2 + 5 + 5 + 8 = 20.
|
|
MATHEMATICA
|
Table[ Sum[i^2 + j^2, {i, n}, {j, n}], {n, 35}]
LinearRecurrence[{5, -10, 10, -5, 1}, {2, 20, 84, 240, 550}, 40] (* Vincenzo Librandi, Apr 16 2018 *)
|
|
PROG
|
(Magma) [n^2*(n+1)*(2*n+1)/3: n in [1..40]]; // G. C. Greubel, Apr 09 2023
(SageMath) [n^2*(n+1)*(2*n+1)/3 for n in range(1, 41)] # G. C. Greubel, Apr 09 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|