login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

This sequence is related to A001105 by the transform a(n) = (n-1)*A001105(n)-sum(A001105(i), i=0..n-1). - Bruno Berselli, Mar 12 2012

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (4, -6, 4, -1).

FORMULA

a(n) = 0*1 + 2*3 + 4*5 + ... + 2n*(2n+1).

a(n) = (4n^3-3n^2-n)/3 = (n-1)n(4n+1)/3.

O.g.f.: 2*x^2*(3+x)/(-1+x)^4 . a(n) = 2*A016061(n-1). - R. J. Mathar, Feb 14 2008

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

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

Cf. A016061, A001105.

Sequence in context: A136892 A254527 A190095 * A166796 A001701 A241452

Adjacent sequences:  A135033 A135034 A135035 * A135037 A135038 A135039

KEYWORD

nonn,easy

AUTHOR

Cino Hilliard, Feb 10 2008

EXTENSIONS

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

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 17:21 EDT 2019. Contains 321330 sequences. (Running on oeis4.)