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
0, 1, 4, 13, 40, 41, 172, 85, 464, 145, 980, 221, 1784, 313, 2940, 421, 4512, 545, 6564, 685, 9160, 841, 12364, 1013, 16240, 1201, 20852, 1405, 26264, 1625, 32540, 1861, 39744, 2113, 47940, 2381, 57192, 2665, 67564, 2965, 79120, 3281, 91924, 3613, 106040, 3961, 121532, 4325, 138464, 4705, 156900 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

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.

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.

REFERENCES

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

LINKS

Table of n, a(n) for n=0..50.

Index entries for linear recurrences with constant coefficients, signature (0,4,0,-6,0,4,0,-1).

FORMULA

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

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

From Chai Wah Wu, Mar 04 2021: (Start)

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

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)

CROSSREFS

Sequence in context: A000746 A271012 A272581 * A191132 A119915 A307577

Adjacent sequences:  A342156 A342157 A342158 * A342160 A342161 A342162

KEYWORD

nonn,easy

AUTHOR

Marlon Vanegas, Mar 02 2021

STATUS

approved

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 September 23 14:40 EDT 2021. Contains 347618 sequences. (Running on oeis4.)