login
Lengths of successive words (starting with a) under the substitution: {a -> aab, b -> aac, c -> ab}.
1

%I #19 Jul 31 2015 17:10:48

%S 1,3,9,26,76,221,644,1875,5461,15903,46314,134876,392791,1143896,

%T 3331289,9701475,28252921,82278978,239615244,697814501,2032195756,

%U 5918219771,17235212309,50192888175,146173193506,425689839228

%N Lengths of successive words (starting with a) under the substitution: {a -> aab, b -> aac, c -> ab}.

%H Harvey P. Dale, <a href="/A101169/b101169.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(n) = 2*a(n-1) + 3*a(n-2) - a(n-3).

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

%e a => aab => aabaabaac => aabaabaacaabaabaacaabaabab, thus a(0) = 1, a(1) = 3, a(2) = 9, a(3) = 26.

%p a:= n-> (<<0|1|0>, <0|0|1>, <-1|3|2>>^n. <<0, 1, 3>>)[2,1]:

%p seq(a(n), n=0..30); # _Alois P. Heinz_, May 06 2011

%t LinearRecurrence[{2,3,-1},{1,3,9},40] (* _Harvey P. Dale_, Feb 19 2012 *)

%Y Cf. A101399, A101400.

%K easy,nonn

%O 0,2

%A _Jeroen F.J. Laros_, Jan 22 2005

%E Terms >=1875 by _Alois P. Heinz_, May 06 2011