A111694 a(1) = 1+2-3 = 0, a(2) = 4+5+6-7 = 8, a(3) = 8+9+10+11-12 = 26, a(4) = 13+14+15+16+17-18 = 57, ...
0, 8, 26, 57, 104, 170, 258, 371, 512, 684, 890, 1133, 1416, 1742, 2114, 2535, 3008, 3536, 4122, 4769, 5480, 6258, 7106, 8027, 9024, 10100, 11258, 12501, 13832, 15254, 16770, 18383, 20096, 21912, 23834, 25865, 28008, 30266, 32642, 35139, 37760
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Crossrefs
Cf. A034856.
Programs
-
Magma
[(n^3 + 4*n^2 - 3*n - 2)/2: n in [1..60]]; // Vincenzo Librandi, May 21 2011
-
Maple
seq(sum(j,j=binomial(n+1,2)+n-1..binomial(n+2,2)+n-2) - binomial(n+2,2)-n+1,n=1..50); # Emeric Deutsch, Aug 27 2005
-
Mathematica
Table[(n^3 + 4n^2 - 3n - 2)/2, {n, 41}] (* Robert G. Wilson v, Aug 27 2005 *)
Formula
a(n) = (n-1)*(n^2 + 5*n + 2)/2.
G.f.: x^2*(x-2)*(x-4)/(1-x)^4. - Colin Barker, Mar 18 2012
a(n) = (n-1)*A034856(n+1). - R. J. Mathar, Aug 22 2016
Extensions
Edited and extended by Emeric Deutsch and Robert G. Wilson v, Aug 27 2005