login
Numbers of n-length words on alphabet {0..7} with no subwords ii, where i is from {0..2}.
12

%I #33 Sep 08 2022 08:46:11

%S 1,8,61,467,3574,27353,209341,1602152,12261769,93843143,718210846,

%T 5496691637,42067895689,321958728008,2464050574501,18858147661547,

%U 144327286503334,1104581743831073,8453708639334181,64698869194494632,495160627558133329,3789618738879406463

%N Numbers of n-length words on alphabet {0..7} with no subwords ii, where i is from {0..2}.

%H Colin Barker, <a href="/A254602/b254602.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (7,5).

%F G.f.: (1 + x)/(1 - 7*x - 5*x^2).

%F a(n) = 7*a(n-1) + 5*a(n-2) with n>1, a(0) = 1, a(1) = 8.

%F a(n) = (2^(-1-n) * ((7-sqrt(69))^n * (-9+sqrt(69)) + (7+sqrt(69))^n * (9+sqrt(69)))) / sqrt(69). - _Colin Barker_, Sep 08 2016

%p A254602:=n->(2^(-1-n) * ((7-sqrt(69))^n * (-9+sqrt(69)) + (7+sqrt(69))^n * (9+sqrt(69)))) / sqrt(69): seq(simplify(A254602(n)), n=0..30); # _Wesley Ivan Hurt_, Sep 08 2016

%t RecurrenceTable[{a[0] == 1, a[1] == 8, a[n] == 7 a[n - 1] + 5 a[n - 2]}, a[n], {n, 0, 25}]

%t LinearRecurrence[{7,5},{1,8},30] (* _Harvey P. Dale_, Jun 23 2017 *)

%o (Magma) [n le 1 select 8^n else 7*Self(n)+5*Self(n-1): n in [0..25]];

%o (PARI) Vec((1+x)/(1-7*x-5*x^2) + O(x^30)) \\ _Colin Barker_, Sep 08 2016

%Y Cf. A015562, A055099, A126473, A126501, A126528.

%K nonn,easy

%O 0,2

%A _Milan Janjic_, Feb 02 2015