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”).

A255814
Numbers of words on {0,1,2,3,4,} having no isolated zeros.
1
1, 4, 17, 73, 313, 1341, 5745, 24613, 105449, 451773, 1935521, 8292309, 35526553, 152205613, 652091089, 2793739205, 11969154121, 51279178141, 219694231041, 941231059125, 4032495084025, 17276328107789, 74016584439345, 317107590101669
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 11.
FORMULA
a(n+3) = 5*a(n+2) - 4*a(n+1)+ 4*a(n) with n>=0, a(0) = 1, a(1) = 4, a(2) = 17.
G.f.: (-1 + x - x^2)/(-1 + 5*x - 4*x^2 + 4*x^3). - R. J. Mathar, Nov 07 2015
MATHEMATICA
RecurrenceTable[{a[0] == 1, a[1] == 4, a[2]== 17, a[n] == 5 a[n - 1] - 4 a[n - 2] + 4 a[n - 3]}, a[n], {n, 0, 23}]
LinearRecurrence[{5, -4, 4}, {1, 4, 17}, 100] (* G. C. Greubel, Jun 02 2016 *)
CoefficientList[Series[(-1 + x - x^2) / (-1 + 5 x -4 x^2 + 4 x^3), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 26 2018 *)
PROG
(Magma) I:=[1, 4, 17]; [n le 3 select I[n] else 5*Self(n-1)-4*Self(n-2)+4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Feb 26 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Milan Janjic, Mar 07 2015
STATUS
approved