login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A255117
Number of n-length words on {0,1,2,3,4} in which 0 appears only in runs of length 2.
5
1, 4, 17, 72, 304, 1284, 5424, 22912, 96784, 408832, 1726976, 7295040, 30815488, 130169856, 549859584, 2322700288, 9811480576, 41445360640, 175072243712, 739534897152, 3123921031168, 13195973099520, 55742031986688, 235463812071424, 994639140683776
OFFSET
0,2
LINKS
D. Birmajer, J. B. Gil, and M. D. Weiner, On the Enumeration of Restricted Words over a Finite Alphabet, J. Int. Seq. 19 (2016) # 16.1.3, example 10.
FORMULA
a(n+3) = 4*a(n+2) + 4*a(n) with n>1, a(0) = 1, a(1) = 4, a(2) = 17.
G.f.: -(x^2+1) / (4*x^3+4*x-1). - Colin Barker, Feb 15 2015
a(n) = A089979(n) + A089979(n-2). - R. J. Mathar, Aug 04 2019
MATHEMATICA
RecurrenceTable[{a[0] == 1, a[1] == 4, a[2]== 17, a[n] == 4 a[n - 1] + 4 a[n - 3]}, a[n], {n, 0, 25}]
PROG
(PARI) Vec(-(x^2+1)/(4*x^3+4*x-1) + O(x^100)) \\ Colin Barker, Feb 15 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Milan Janjic, Feb 14 2015
STATUS
approved