A307795 Number of binary words of length n with three times as many occurrences of subword 101 as occurrences of subword 010.
1, 2, 4, 6, 10, 16, 26, 42, 70, 116, 196, 332, 572, 996, 1758, 3134, 5650, 10276, 18836, 34720, 64310, 119582, 223066, 417028, 780876, 1463800, 2746304, 5155556, 9682418, 18189458, 34178904, 64236714, 120749592, 227018306, 426886298, 802872340, 1510325700
Offset: 0
Keywords
Examples
a(8) = 70: 00000000, 00000001, 00000011, 00000110, 00000111, 00001100, 00001110, 00001111, 00011000, 00011001, 00011100, 00011110, 00011111, 00110000, 00110001, 00110011, 00111000, 00111001, 00111100, 00111110, 00111111, 01100000, 01100001, 01100011, 01100110, 01100111, 01110000, 01110001, 01110011, 01111000, 01111001, 01111100, 01111110, 01111111, 10000000, 10000001, 10000011, 10000110, 10000111, 10001100, 10001110, 10001111, 10011000, 10011001, 10011100, 10011110, 10011111, 10101101, 10110101, 11000000, 11000001, 11000011, 11000110, 11000111, 11001100, 11001110, 11001111, 11100000, 11100001, 11100011, 11100110, 11100111, 11110000, 11110001, 11110011, 11111000, 11111001, 11111100, 11111110, 11111111.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..3573
Crossrefs
Column k=3 of A303696.
Programs
-
Maple
b:= proc(n, t, h, c) option remember; `if`(abs(c)>3*n, 0, `if`(n=0, 1, b(n-1, [1, 3, 1][t], 2, c-`if`(h=3, 3, 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);