A231101 a(n) = 3*a(n-3) + a(n-2), a(0)=3, a(1)=0, a(2)=2.
3, 0, 2, 9, 2, 15, 29, 21, 74, 108, 137, 330, 461, 741, 1451, 2124, 3674, 6477, 10046, 17499, 29477, 47637, 81974, 136068, 224885, 381990, 633089, 1056645, 1779059, 2955912, 4948994
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1,3).
Programs
-
Maple
a:=proc(n) option remember: if n=0 then 3 elif n=1 then 0 elif n=2 then 2 else 3*a(n-3)+a(n-2) end if end proc: bign:=30: seq(a(n),n=0..bign);
-
Mathematica
CoefficientList[Series[(x^2 - 3)/(3*x^3 + x^2 - 1), {x, 0, 50}], x] (* Wesley Ivan Hurt, May 26 2024 *)
Formula
a(n) = 3*a(n-3)+a(n-2), a(0)=3, a(1)=0, a(2)=2.
a(n) = r^n+s^n+t^n, where r,s,t are the roots of x^3-x-3.
G.f.: (x^2-3)/(3*x^3+x^2-1).
Comments