OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5, -10, 10, -5, 1).
FORMULA
a(n) = (3n^4-34n^3+141n^2-206n+144)/24.
G.f.: x*(2-7*x+10*x^2-8*x^3+6*x^4)/(1-x)^5. [Colin Barker, Mar 28 2012]
a(1)=2, a(2)=3, a(3)=5, a(4)=7, a(5)=11, a(n)=5*a(n-1)-10*a(n-2)+ 10*a(n-3)- 5*a(n-4)+a(n-5). - Harvey P. Dale, Oct 05 2012
EXAMPLE
a(6)=22 since first differences of (2,3,5,7,11) are (1,2,2,4), second differences (1,0,2), third differences (-1,2) and fourth differences (3), so a(6)=11+4+2+2+3=22.
MATHEMATICA
Table[(3n^4-34n^3+141n^2-206n+144)/24, {n, 40}] (* or *) LinearRecurrence[ {5, -10, 10, -5, 1}, {2, 3, 5, 7, 11}, 40] (* Harvey P. Dale, Oct 05 2012 *)
PROG
(PARI) for (n=1, 1000, write("b061165.txt", n, " ", (3*n^4 - 34*n^3 + 141*n^2 - 206*n + 144)/24)) \\ Harry J. Smith, Jul 18 2009
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Apr 18 2001
STATUS
approved