OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,1,-1).
FORMULA
From R. J. Mathar, May 15 2008: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-3) - a(n-4).
a(n+1) - a(n) = A008998(n+1). (End)
a(n) = 2*a(n-1) + a(n-3) + 1. - Greg Dresden, Apr 04 2021
MAPLE
a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <-1|1|-2|3>>^n)[4, 4]:
seq(a(n), n=0..30); # Alois P. Heinz, Nov 12 2017
MATHEMATICA
CoefficientList[Series[(1-x)^(-1)/(1-2x-x^3), {x, 0, 40}], x] (* or *) LinearRecurrence[{3, -2, 1, -1}, {1, 3, 7, 16}, 40] (* Harvey P. Dale, Oct 05 2012 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved