OFFSET
0,2
COMMENTS
Partial sums of A002939.
a(n) is the maximum value obtainable by partitioning the set {x in the natural numbers | 1 <= x <= 2n} into pairs, taking the products of all such pairs, and taking the sum of all such products. - Thomas Anton, Oct 20 2020
LINKS
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: 2*x*(3*x + 1)/(x - 1)^4.
a(n) = Sum_{k = 0..n} 2*k*(2*k - 1).
Sum_{n>=1} 1/a(n) = -3*(2*Pi - 12*log(2) + 1)/5 = 0.620748515723854...
a(n) mod 2 = 0.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*(1 + 2*sqrt(2)*Pi - 2*(3 + sqrt(2))*log(2) + 4*sqrt(2)*log(2-sqrt(2)))/5. - Amiram Eldar, Nov 05 2020
EXAMPLE
a(0) = 0;
a(1) = 0 + 1*2 = 2;
a(2) = 0 + 1*2 + 3*4 = 14;
a(3) = 0 + 1*2 + 3*4 + 5*6 = 44;
a(4) = 0 + 1*2 + 3*4 + 5*6 + 7*8 = 100;
a(5) = 0 + 1*2 + 3*4 + 5*6 + 7*8 + 9*10 = 190, etc.
MATHEMATICA
Table[n (n + 1) ((4 n - 1)/3), {n, 0, 40}] (* or *)
LinearRecurrence[{4, -6, 4, -1}, {0, 2, 14, 44}, 40]
CoefficientList[Series[2 x (3 x + 1) / (x - 1)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Feb 11 2016 *)
PROG
(Magma) [n*(n + 1)*(4*n - 1)/3: n in [0..40]]; // Vincenzo Librandi, Feb 11 2016
(PARI) a(n)=n*(n+1)*(4*n-1)/3 \\ Charles R Greathouse IV, Jul 26 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Feb 11 2016
STATUS
approved