OFFSET
0,2
LINKS
FORMULA
a(n)=2*a(n-1)+a(n-2)+2, with a(0)=1, a(1)=2.
EXAMPLE
a(2) = 2*a(1)+a(0)+2 = 2*2+1+2 = 7
a(3) = 2*a(2)+a(1)+2 = 2*7+2+2 = 18.
MATHEMATICA
CoefficientList[Series[(1-x+2x^2)/((1-x)*(1-2x-x^2)), {x, 0, 30}], x] (* or *) LinearRecurrence[{3, -1, -1}, {1, 2, 7}, 30] (* Harvey P. Dale, Jul 18 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 11 2010
EXTENSIONS
Terms corrected by R. J. Mathar, Oct 26 2011
STATUS
approved