OFFSET
0,2
COMMENTS
5*a(n+1) is the sum of the products of the 10 distinct combinations of three consecutive numbers starting with n (using 1,2,3 the 10 combinations are 111 112 113 122 123 133 222 223 233 333; 1*1*1 + 1*1*2 + 1*1*3 + 1*2*2 + 1*2*3 + 1*3*3 + 2*2*2 + 2*2*3 + 2*3*3 + 3*3*3 = 90 = 5*a(2)). - J. M. Bergot, Mar 28 2014 [expanded by Jon E. Schoenfield, Feb 22 2015]
LINKS
Harry J. Smith, Table of n, a(n) for n=0,...,1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
EXAMPLE
1+2 = 3; 3+4+5+6 = 18; 7+8+9+10+11+12 = 57; 13+14+15+16+17+18+19+20 = 132.
MAPLE
MATHEMATICA
Table[2n^3+n, {n, 0, 5!}] (* Vladimir Joseph Stephan Orlovsky, Dec 04 2010 *)
LinearRecurrence[{4, -6, 4, -1}, {0, 3, 18, 57}, 40] (* Harvey P. Dale, Aug 23 2015 *)
With[{nn=40}, Total/@TakeList[Range[nn+nn^2], 2Range[0, nn]]] (* Requires Mathematica version 11 or later *) (* Harvey P. Dale, Mar 10 2018 *)
PROG
(PARI) { for (n=0, 1000, write("b061317.txt", n, " ", 2*n^3 + n) ) } \\ Harry J. Smith, Jul 21 2009
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Feb 13 2002
STATUS
approved