A061317 Split positive integers into extending even groups and sum: 1+2, 3+4+5+6, 7+8+9+10+11+12, 13+14+15+16+17+18+19+20, ...
0, 3, 18, 57, 132, 255, 438, 693, 1032, 1467, 2010, 2673, 3468, 4407, 5502, 6765, 8208, 9843, 11682, 13737, 16020, 18543, 21318, 24357, 27672, 31275, 35178, 39393, 43932, 48807, 54030, 59613, 65568, 71907, 78642, 85785, 93348, 101343, 109782
Offset: 0
Examples
1+2 = 3; 3+4+5+6 = 18; 7+8+9+10+11+12 = 57; 13+14+15+16+17+18+19+20 = 132.
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).
Programs
-
Maple
A061317:=n->2*n^3+n; seq(A061317(n), n=0..100); # Wesley Ivan Hurt, Mar 20 2014
-
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 *)
-
PARI
a(n) = { 2*n^3 + n } \\ Harry J. Smith, Jul 21 2009
Comments