OFFSET
1,2
COMMENTS
The number of length n binary words with fewer than 3 zeros between any pair of consecutive ones. - Jeffrey Liese, Dec 23 2010
LINKS
Robert Israel, Table of n, a(n) for n = 1..3397
T. Langley, J. Liese, and J. Remmel, Generating Functions for Wilf Equivalence Under Generalized Factor Order, J. Int. Seq. 14 (2011) # 11.4.2.
Index entries for linear recurrences with constant coefficients, signature (3,-2,0,-1,1).
FORMULA
a(1)=1, a(2)=2, a(3)=4, a(4)=8, a(5)=16, a(n)=3*a(n-1)-2*a(n-2)+0*a(n-3)- a(n-4)+ a(n-5). - Harvey P. Dale, Apr 24 2013
G.f.: -x*(x^4-x+1) / ((x-1)^2*(x^3+x^2+x-1)). - Colin Barker, Aug 18 2014
2*a(n) = A001590(n+4)-n. - R. J. Mathar, Aug 16 2017
MAPLE
for n from 1 to 5 do a[n]:= [1, 2, 4, 8, 16][n] od:
for n from 6 to 100 do a[n]:= 3*a[n-1]-2*a[n-2]-a[n-4]+a[n-5] od:
seq(a[n], n=1..100); # Robert Israel, Aug 19 2014
MATHEMATICA
LinearRecurrence[{3, -2, 0, -1, 1}, {1, 2, 4, 8, 16}, 40] (* Harvey P. Dale, Apr 24 2013 *)
PROG
(PARI) Vec(-x*(x^4-x+1)/((x-1)^2*(x^3+x^2+x-1)) + O(x^100)) \\ Colin Barker, Aug 18 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Jonsson [ petej(AT)ida.liu.se ]
STATUS
approved