login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236291 Number of length n binary words that contain an even number of 0's or exactly two 1's. 0
1, 1, 2, 7, 8, 26, 32, 85, 128, 292, 512, 1079, 2048, 4174, 8192, 16489, 32768, 65672, 131072, 262315, 524288, 1048786, 2097152, 4194557, 8388608, 16777516, 33554432, 67109215, 134217728, 268435862, 536870912, 1073742289, 2147483648, 4294967824, 8589934592 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Table of n, a(n) for n=0..34.

Index entries for linear recurrences with constant coefficients, signature (2,3,-6,-3,6,1,-2).

FORMULA

G.f.: (1- x - 3*x^2 + 6*x^3 - 3*x^4 - 2*x^5 - 3*x^6 + x^7)/( (1 - 2*x)*(1 - x^2)^3 ).

a(n) = (2^(1+n))/4 for n even; a(n) = (2^(1+n)-2*n+2*n^2)/4 for n odd. - Colin Barker, Jan 23 2014

EXAMPLE

a(3)=7 because we have: 001, 010, 011, 100, 101, 110, 111.

MATHEMATICA

nn=30; CoefficientList[Series[(1-x-3*x^2+6*x^3-3*x^4-2*x^5-3*x^6+x^7)/ ((1-2*x)*(1-x^2)^3), {x, 0, nn}], x]

CROSSREFS

Cf. A161680 (words containing exactly two 1's), A011782 (words containing an even number of 0's), A000384 (words containing an even number of 0's and exactly 2 1's).

Sequence in context: A291629 A117558 A117559 * A190175 A081700 A093795

Adjacent sequences:  A236288 A236289 A236290 * A236292 A236293 A236294

KEYWORD

nonn,easy

AUTHOR

Geoffrey Critzer, Jan 21 2014

EXTENSIONS

More terms from Colin Barker, Jan 23 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 5 16:55 EST 2021. Contains 341827 sequences. (Running on oeis4.)