login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A027711 Number of binary sequences of length n with an even number of ones, at least two of the ones being contiguous. 1
0, 1, 2, 4, 9, 21, 47, 101, 212, 440, 907, 1859, 3791, 7699, 15586, 31476, 63445, 127689, 256671, 515433, 1034248, 2073968, 4156791, 8327911, 16679007, 33395527, 66851750, 133801708, 267762321, 535781757, 1071979535 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
G.f.: x^2*(1 - 2*x + x^2 + x^3)/((2*x-1)*(x^2 + x - 1)*(x^2 - x + 1)).
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3) + a(n-4) - 2*a(n-5).
MATHEMATICA
LinearRecurrence[{4, -5, 2, 1, -2}, {0, 1, 2, 4, 9}, 40] (* Vincenzo Librandi, Jun 20 2012 *)
CoefficientList[Series[x^2*(1-2*x+x^2+x^3)/((2*x-1)*(x^2+x-1)*(x^2-x+1)), {x, 0, 50}], x] (* G. C. Greubel, Jun 10 2017 *)
PROG
(Magma) I:=[0, 1, 2, 4, 9]; [n le 5 select I[n] else 4*Self(n-1)-5*Self(n-2)+2*Self(n-3)+Self(n-4)-2*Self(n-5): n in [1..40]]; // Vincenzo Librandi, Jun 20 2012
(PARI) x='x+O('x^50); Vec(x^2*(1-2*x+x^2+x^3)/((2*x-1)*(x^2+x-1)*(x^2-x+1))) \\ G. C. Greubel, Jun 10 207
CROSSREFS
Sequence in context: A091619 A061439 A351644 * A307548 A084634 A137256
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Typo in denominator of g.f. corrected by R. J. Mathar, Sep 03 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 18:44 EDT 2024. Contains 372222 sequences. (Running on oeis4.)