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!)
A303430 Number of binary words of length n with exactly twice as many occurrences of subword 101 as occurrences of subword 010. 4
1, 2, 4, 6, 10, 17, 28, 49, 84, 148, 263, 472, 858, 1568, 2893, 5372, 10034, 18824, 35428, 66898, 126683, 240483, 457334, 870956, 1660850, 3171112, 6061596, 11597587, 22206775, 42551339, 81591256, 156553245, 300565760, 577360360, 1109601934, 2133499936 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
a(0) = 1: the empty word.
a(1) = 2: 0, 1.
a(2) = 4: 00, 01, 10, 11.
a(3) = 6: 000, 001, 011, 100, 110, 111.
a(4) = 10: 0000, 0001, 0011, 0110, 0111, 1000, 1001, 1100, 1110, 1111.
a(5) = 17: 00000, 00001, 00011, 00110, 00111, 01100, 01110, 01111, 10000, 10001, 10011, 10101, 11000, 11001, 11100, 11110, 11111.
MAPLE
b:= proc(n, t, h, c) option remember; `if`(abs(c)>2*n, 0,
`if`(n=0, 1, b(n-1, [1, 3, 1][t], 2, c-`if`(h=3, 2, 0))
+ b(n-1, 2, [1, 3, 1][h], c+`if`(t=3, 1, 0))))
end:
a:= n-> b(n, 1$2, 0):
seq(a(n), n=0..50);
CROSSREFS
Column k=2 of A303696.
Sequence in context: A014216 A192683 A079961 * A144023 A018164 A321403
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 23 2018
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 March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)