A143166 a(n) = n*(8*n^2 + 1)/3.
0, 3, 22, 73, 172, 335, 578, 917, 1368, 1947, 2670, 3553, 4612, 5863, 7322, 9005, 10928, 13107, 15558, 18297, 21340, 24703, 28402, 32453, 36872, 41675, 46878, 52497, 58548, 65047, 72010, 79453, 87392, 95843, 104822, 114345, 124428, 135087, 146338, 158197
Offset: 0
Examples
The total sums S(n) are [0, 12, 100, 392, 1080, 2420, 4732, 8400, 13872, 21660, 32340, ...]. The 2n-frame sums are 4*a(n) = [0, 12, 88, 292, 688, 1340, 2312, 3668, 5472, 7788, 10680, 14212, 18448, 23452, 29288, 36020, 43712, 52428, 62232, 73188, 85360]. The sum is over 8*n numbers. For n=1 the 8 numbers of the 2-frame are 2,1,2; 1,1; 2,1,2, summing to 4*a(1)=12.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Wolfdieter Lang, The squares for n=0..4.
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Programs
-
Magma
[n*(8*n^2+1)/3: n in [0..40]]; // Vincenzo Librandi, Feb 05 2014
-
Maple
A143166:=n->n*(8*n^2+1)/3; seq(A143166(n), n=0..50); # Wesley Ivan Hurt, Feb 03 2014
-
Mathematica
Table[n (8 n^2 + 1)/3, {n, 0, 50}] (* Wesley Ivan Hurt, Feb 03 2014 *) CoefficientList[Series[x (3 + 10 x + 3 x^2)/(1 - x)^4,{x, 0, 40}], x] (* Vincenzo Librandi, Feb 05 2014 *)
Formula
a(n) = (1/4)*(S(n) - S(n-1)), with a(0)=0 and S(n):=sum(sum(p^2+q^2,p=-n..+n),q=-n..+n) = 2*sum(sum((p^2,p=-n..+n), q=-n..+n) = 2*sum(p^2,p=-n..+n)*sum(1,q=-n..n) = 2*2*(n*(n+1)*(2*n+1))/6)*(2*n+1) = (2/3)*n*(n+1)*(2*n+1)^2.
a(n) = n*(8*n^2 + 1)/3.
G.f.: x*(3 + 10*x + 3*x^2)/(1-x)^4. - Vincenzo Librandi, Feb 05 2014
a(n) = T(n, 0) + 2*(Sum_{k=1..n-1}T(n,k)) + T(n,k), with the triangle T(n, k) = A069011(n, k) = n^2 + k^2. - Wolfdieter Lang, Aug 15 2019
From Elmo R. Oliveira, Aug 07 2025: (Start)
E.g.f.: exp(x)*x*(9 + 24*x + 8*x^2)/3.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = A118465(n)/3. (End)
Comments