A098182 a(n) = 3*a(n-1) - a(n-2) + a(n-3), a(0)=1,a(1)=1,a(2)=3.
1, 1, 3, 9, 25, 69, 191, 529, 1465, 4057, 11235, 31113, 86161, 238605, 660767, 1829857, 5067409, 14033137, 38861859, 107619849, 298030825, 825334485, 2285592479, 6329473777, 17528163337, 48540608713, 134423136579
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Olivier Carton, Jean-Michel Couvreur, Martin Delacourt, and Nicolas Ollinger, Linear Recurrence Sequence Automata and the Addition of Abstract Numeration Systems, 15th Int'l Conf. Comb. Words (WORDS 2025) Lecture Notes Comp. Sci. (LNCS Vol. 15729) 70-82. See p. 71.
- Index entries for linear recurrences with constant coefficients, signature (3,-1,1).
Programs
-
Mathematica
CoefficientList[Series[(1 - x)^2/(1 - 3 x + x^2 - x^3), {x,0,50}], x] (* G. C. Greubel, Mar 03 2017 *)
-
PARI
my(x='x+O(x^50)); Vec((1-x)^2/(1-3*x+x^2-x^3)) \\ G. C. Greubel, Mar 03 2017
Formula
G.f. : (1-x)^2/(1-3*x+x^2-x^3).
a(n) = Sum_{k=0..floor(n/2)} binomial(n+k, 3*k) * 2^k.