A118647 a(n) is the number of binary strings of length n such that no subsequence of length 4 contains 3 or more ones.
2, 4, 7, 11, 19, 33, 57, 97, 166, 285, 489, 838, 1436, 2462, 4221, 7236, 12404, 21264, 36453, 62491, 107127, 183646, 314822, 539695, 925191, 1586041, 2718927, 4661017, 7990313, 13697676, 23481725, 40254377, 69007488, 118298524, 202797424
Offset: 1
References
- G. Minkler and J. Minkler, CFAR: The Principles of Automatic Radar Detection in Clutter, Magellan, Baltimore, 1990.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,0,1,0,-1).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( x*(2+2*x+x^2-x^4-x^5)/(1-x-x^2-x^4+x^6) )); // G. C. Greubel, May 05 2023 -
Mathematica
LinearRecurrence[{1,1,0,1,0,-1},{2,4,7,11,19,33},40] (* Harvey P. Dale, Oct 03 2016 *)
-
PARI
Vec(x*(2+2*x+x^2-x^4-x^5)/(1-x-x^2-x^4+x^6) + O(x^100)) \\ Colin Barker, Oct 01 2014
-
SageMath
def A118647_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( x*(2+2*x+x^2-x^4-x^5)/(1-x-x^2-x^4+x^6) ).list() a=A118647_list(41); a[1:] # G. C. Greubel, May 05 2023
Formula
a(n) = a(n-1) + a(n-2) + a(n-4) - a(n-6). - suggested by Jon E. Schoenfield
G.f.: x*(2+2*x+x^2-x^4-x^5) / (1-x-x^2-x^4+x^6). - Colin Barker, Oct 01 2014
Extensions
More terms from Joshua Zucker, Aug 04 2006
Comments