login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A196875
a(n) = a(n-4) + a(n-3) + a(n-2) + a(n-1) + (n-5).
1
1, 1, 1, 1, 4, 8, 16, 32, 64, 125, 243, 471, 911, 1759, 3394, 6546, 12622, 24334, 46910, 90427, 174309, 335997, 647661, 1248413, 2406400, 4638492, 8940988, 17234316, 33220220, 64034041, 123429591, 237918195, 458602075, 883983931, 1703933822, 3284438054
OFFSET
1,5
FORMULA
G.f.: (x^5-3*x^4+2*x-1)*x / ((x^4+x^3+x^2+x-1)*(x-1)^2 ).
a(n) = +3*a(n-1) -2*a(n-2) -a(n-5) +a(n-6).
a(n) = 5/9-n/3 +(10*A000078(n) +17*A000078(n+1) +21*A000078(n+2) -14*A000078(n+3))/9. - R. J. Mathar, Oct 16 2011
MAPLE
a:= n-> (Matrix(6, (i, j)-> `if`(i=j-1, 1, `if`(i=6, [1, -1, 0, 0, -2, 3][j], 0)))^n. <<-1, 1, 1, 1, 1, 4>>)[1, 1]: seq(a(n), n=1..50); # Alois P. Heinz, Oct 15 2011
MATHEMATICA
nn = 40; a[1] = a[2] = a[3] = a[4] = 1; Do[a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4] + (n - 5), {n, 5, nn}]; Table[a[n], {n, nn}] (* T. D. Noe, Oct 07 2011 *)
RecurrenceTable[{a[1]==a[2]==a[3]==a[4]==1, a[n]==a[n-1]+a[n-2]+a[n-3]+a[n-4]+(n-5)}, a, {n, 40}] (* or *) LinearRecurrence[{3, -2, 0, 0, -1, 1}, {1, 1, 1, 1, 4, 8}, 40] (* Harvey P. Dale, Aug 25 2014 *)
CROSSREFS
Sequence in context: A145108 A108569 A342868 * A111073 A298807 A353500
KEYWORD
nonn,easy
AUTHOR
Aditya Subramanian, Oct 07 2011
STATUS
approved