login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342159 Number of words of length n, over the alphabet {a,b,c}, which have an odd number of a's and the number of b's plus the number of c's is less than or equal to 3. 0

%I

%S 0,1,4,13,40,41,172,85,464,145,980,221,1784,313,2940,421,4512,545,

%T 6564,685,9160,841,12364,1013,16240,1201,20852,1405,26264,1625,32540,

%U 1861,39744,2113,47940,2381,57192,2665,67564,2965,79120,3281,91924,3613,106040,3961,121532,4325,138464,4705,156900

%N Number of words of length n, over the alphabet {a,b,c}, which have an odd number of a's and the number of b's plus the number of c's is less than or equal to 3.

%C The number of accepted words is obtained by raising the adjacency matrix to the n-th power and adding only the data corresponding to the acceptance states of the first row.

%C It is clear that the values of the sequence belong to the natural numbers, in addition, the amount of accepted words is not directly proportional.

%D Rodrigo De Castro, Teoria de la computaciĆ³n [Computer Theory], book published by National University of Colombia [date?].

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

%F a(n) = (14/3)*n - 4*n^2 + (4/3)*n^3 if n is even;

%F a(n) = 1 - 2*n + 2*n^2 if n is odd.

%F From _Chai Wah Wu_, Mar 04 2021: (Start)

%F a(n) = 4*a(n-2) - 6*a(n-4) + 4*a(n-6) - a(n-8) for n > 7.

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

%K nonn,easy

%O 0,3

%A _Marlon Vanegas_, Mar 02 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 26 20:15 EDT 2021. Contains 348269 sequences. (Running on oeis4.)