OFFSET
3,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 3..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
n(2n^2 - 3n + 13)/6. - Ralf Stephan, Apr 30 2004
G.f.: -x^3*(-11 + 22*x - 18*x^2 + 5*x^3) / (x - 1)^4 . - R. J. Mathar, Apr 17 2011
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 20 2012
MATHEMATICA
s=0; lst={}; Do[s+=n^2+2; If[s>10, AppendTo[lst, s]], {n, 0, 6!, 1}]; lst (* Vladimir Joseph Stephan Orlovsky, Nov 07 2008 *)
Table[n (2n^2-3n+13)/6, {n, 3, 60}] (* Harvey P. Dale, Apr 22 2011 *)
LinearRecurrence[{4, -6, 4, -1}, {11, 22, 40, 67}, 50] (* Vincenzo Librandi, Jun 20 2012 *)
PROG
(Magma) I:=[11, 22, 40, 67]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jun 20 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved