login
a(n)= 3*a(n-3) +3*a(n-6) +a(n-9).
1

%I #8 Sep 13 2022 12:42:04

%S 1,0,2,6,1,9,23,2,34,88,9,131,339,34,504,1304,131,1939,5017,504,7460,

%T 19302,1939,28701,74261,7460,110422,285706,28701,424829,1099203,

%U 110422,1634454,4228988,424829,6288271,16270279,1634454,24193004,62597004

%N a(n)= 3*a(n-3) +3*a(n-6) +a(n-9).

%C The recurrence shows that these are actually three interleaved sequences with

%C the same recurrence (and the same characteristic polynomial).

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,3,0,0,3,0,0,1).

%F G.f.: (1+2*x^2+3*x^3+x^4+3*x^5+2*x^6-x^7+x^8)/(1-3*x^3-3*x^6-x^9). [Sep 28 2009]

%t M1 = {{0, 1, 0}, {0, 0, 1}, {1, 1, 1}}; M2 = {{1, 1, 1}, {1, 0, 0}, {0, 1, 0}}; M3 = {{0, 1, 0}, {1, 1, 1}, {1, 0, 0}}; M[n_] = If[Mod[n, 3] == 1, M3, If[Mod[n, 3] == 2, M2, M1]]; v[0] = {0, 1, 1}; v[n_] := v[n] = M[n].v[n - 1] a = Table[v[n][[3]], {n, 0, 100}]

%t LinearRecurrence[{0,0,3,0,0,3,0,0,1},{1,0,2,6,1,9,23,2,34},60] (* _Harvey P. Dale_, Sep 13 2022 *)

%Y Cf. A000213, A109529 A109528.

%K nonn,easy

%O 0,3

%A _Roger L. Bagula_, Jun 18 2005

%E Definition replaced by recurrence by the Associate Editors of the OEIS, Sep 28 2009