cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A135036 Sums of the products of n consecutive pairs of numbers.

Original entry on oeis.org

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
Offset: 1

Views

Author

Cino Hilliard, Feb 10 2008

Keywords

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
This sequence is related to A001105 by the transform a(n) = (n-1)*A001105(n)-Sum_{i=0..n-1} A001105(i). - Bruno Berselli, Mar 12 2012
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

Examples

			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 + ...
		

Crossrefs

Programs

  • Magma
    [(n-1)*n*(4*n+1)/3: n in [1..40]]; // Bruno Berselli, Mar 12 2012
  • 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 *)
  • 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 */
    

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.
From R. J. Mathar, Feb 14 2008: (Start)
O.g.f.: 2*x^2*(3 + x)/(1 - x)^4.
a(n) = 2*A016061(n-1). (End)
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
From Amiram Eldar, Apr 30 2023: (Start)
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)
E.g.f.: exp(x)*x^2*(9 + 4*x)/3. - Stefano Spezia, Jun 14 2023

Extensions

First formula corrected by Harvey P. Dale, Jun 20 2013