|
|
A135036
|
|
Sums of the products of n consecutive pairs of numbers.
|
|
5
|
|
|
0, 6, 26, 68, 140, 250, 406, 616, 888, 1230, 1650, 2156, 2756, 3458, 4270, 5200, 6256, 7446, 8778, 10260, 11900, 13706, 15686, 17848, 20200, 22750, 25506, 28476, 31668, 35090, 38750, 42656, 46816, 51238, 55930, 60900, 66156, 71706, 77558, 83720
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Number of integer solutions to 1-n <= x <= y <= z <= n-1 where x - 2*y + z is nonzero. - Michael Somos, Dec 27 2011
a(n) is the maximum value obtainable by partitioning the set {x in the natural numbers | 0 <= x <= 2n+1} into pairs, taking the product of all such pairs, and taking the sum of all such products. - Thomas Anton, Oct 20 2020
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 0*1 + 2*3 + 4*5 + ... + 2*n*(2*n + 1).
a(n) = (4*n^3 - 3*n^2 - n)/3 = (n - 1)*n*(4*n + 1)/3.
O.g.f.: 2*x^2*(3 + x)/(1 - x)^4.
a(0)=0, a(1)=6, a(2)=26, a(3)=68, a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Jun 20 2013
Sum_{n>=2} 1/a(n) = 6*Pi/5 + 36*log(2)/5 - 213/25.
Sum_{n>=2} (-1)^n/a(n) = 6*sqrt(2)*Pi/5 + 6*(sqrt(2)+3)*log(2)/5 - 12*sqrt(2)*log(2-sqrt(2))/5 - 267/25. (End)
|
|
EXAMPLE
|
For n = 3, the sum of the first 3 pairs is 0*1+2*3+4*5 = 26, the 3rd entry in the sequence.
G.f.: 6*x^2 + 26*x^3 + 68*x^4 + 140*x^5 + 250*x^6 + 406*x^7 + 616*x^8 + 888*x^9 + ...
|
|
MATHEMATICA
|
Accumulate[Times@@@Partition[Range[0, 81], 2]] (* or *) LinearRecurrence[ {4, -6, 4, -1}, {0, 6, 26, 68}, 40] (* Harvey P. Dale, Jun 20 2013 *)
a[ n_] := n (n - 1) (4 n + 1)/3; (* Michael Somos, Oct 15 2015 *)
a[ n_] := If[ n >= 0, Length @ FindInstance[ 1 - n <= x <= y <= z <= n - 1 && x - 2 y + z != 0, {x, y, z}, Integers, 10^9], -(Length @ FindInstance[ n <= x < y <= z <= -n && x - 2 y + z != 0, {x, y, z}, Integers, 10^9] + n)]; (* Michael Somos, Oct 15 2015 *)
|
|
PROG
|
(PARI) sumprod(n) = { local(x, s=0); forstep(x=0, n, 2, s+=x*(x+1); print1(s", ") ) }
(PARI) {a(n) = n * (n - 1) * (4*n + 1) / 3}; /* Michael Somos, Dec 27 2011 */
(Magma) [(n-1)*n*(4*n+1)/3: n in [1..40]]; // Bruno Berselli, Mar 12 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|