|
|
A007800
|
|
From a problem in AI planning: a(n) = 4+a(n-1)+a(n-2)+a(n-3)+a(n-4)-a(n-5)-a(n-6)-a(n-7), n>7.
|
|
3
|
|
|
1, 2, 4, 8, 16, 31, 59, 111, 207, 384, 710, 1310, 2414, 4445, 8181, 15053, 27693, 50942, 93704, 172356, 317020, 583099, 1072495, 1972635, 3628251, 6673404, 12274314, 22575994, 41523738, 76374073, 140473833, 258371673, 475219609, 874065146
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
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:
|
|
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
|
|
|
|