A285152
T(n,k) = Number of n X k 0..1 arrays with the number of 1s horizontally or antidiagonally adjacent to some 0 one less than the number of 0's adjacent to some 1.
Original entry on oeis.org
0, 0, 0, 1, 2, 0, 2, 14, 12, 0, 6, 58, 113, 56, 0, 12, 210, 820, 786, 236, 0, 28, 788, 5773, 11574, 5742, 950, 0, 56, 2960, 41620, 159060, 166624, 42176, 3752, 0, 119, 11168, 305641, 2284666, 4551741, 2446130, 314197, 14684, 0, 236, 42402, 2274080
Offset: 1
Some solutions for n=4, k=4
..1..1..1..1. .1..0..0..0. .1..1..0..0. .1..1..0..1. .0..1..1..1
..0..0..0..1. .0..1..1..0. .1..1..0..0. .0..0..1..1. .0..1..1..0
..0..0..1..0. .1..1..1..1. .1..0..0..0. .0..0..1..0. .1..0..0..1
..0..0..0..0. .1..1..1..1. .0..0..1..1. .0..1..1..0. .0..1..0..0
A285750
T(n,k) = Number of n X k 0..1 arrays with the number of 1's horizontally, diagonally or antidiagonally adjacent to some 0 one less than the number of 0's adjacent to some 1.
Original entry on oeis.org
0, 0, 0, 1, 4, 0, 2, 8, 14, 0, 6, 44, 105, 52, 0, 12, 150, 630, 550, 206, 0, 28, 540, 4850, 8544, 5105, 772, 0, 56, 2042, 31276, 119506, 125088, 30918, 2896, 0, 119, 7760, 250592, 1729212, 3640966, 1835412, 265920, 10996, 0, 236, 29654, 1727836
Offset: 1
Some solutions for n=4, k=4
..0..0..0..0. .0..1..1..1. .0..1..1..1. .0..0..0..1. .0..0..0..0
..1..0..1..0. .0..1..0..0. .1..0..0..0. .1..1..1..0. .1..0..1..1
..1..0..0..1. .1..0..0..1. .0..0..0..0. .0..1..0..1. .1..0..1..1
..1..1..0..0. .1..0..0..0. .1..0..0..0. .1..0..0..0. .0..1..0..0
A284771
T(n,k) = Number of n X k 0..1 arrays with the number of 1's horizontally or vertically adjacent to some 0 one less than the number of 0's adjacent to some 1.
Original entry on oeis.org
0, 0, 0, 1, 4, 1, 2, 14, 14, 2, 6, 52, 119, 52, 6, 12, 206, 720, 720, 206, 12, 28, 772, 5637, 10120, 5637, 772, 28, 56, 2896, 38792, 145822, 145822, 38792, 2896, 56, 119, 10996, 298003, 2134812, 4219759, 2134812, 298003, 10996, 119, 236, 41862, 2180148
Offset: 1
Some solutions for n=4, k=4
..0..0..1..0. .1..1..1..0. .0..0..1..1. .0..1..0..0. .0..0..0..1
..0..1..1..0. .1..0..0..0. .0..0..0..1. .0..1..1..0. .1..1..0..1
..0..1..0..1. .0..0..1..1. .0..1..1..0. .0..1..0..0. .0..0..0..0
..0..1..1..0. .0..1..1..1. .0..1..1..0. .1..0..1..1. .1..1..0..1
A285030
T(n,k) = Number of n X k 0..1 arrays with the number of 1's horizontally, antidiagonally or vertically adjacent to some 0 one less than the number of 0's adjacent to some 1.
Original entry on oeis.org
0, 0, 0, 1, 2, 1, 2, 6, 6, 2, 6, 26, 97, 26, 6, 12, 104, 442, 442, 104, 12, 28, 402, 4892, 6460, 4892, 402, 28, 56, 1578, 26226, 96458, 96458, 26226, 1578, 56, 119, 6196, 256732, 1449814, 3708321, 1449814, 256732, 6196, 119, 236, 24310, 1544872, 22043878
Offset: 1
Some solutions for n=4, k=4
..1..0..0..1. .0..1..0..0. .1..0..1..0. .0..0..0..0. .1..1..1..1
..1..0..0..0. .0..1..1..1. .0..1..0..0. .1..1..1..0. .0..1..0..1
..0..1..1..0. .0..0..1..0. .1..0..0..0. .0..1..0..1. .0..0..0..0
..1..1..0..0. .1..1..0..0. .1..1..1..0. .1..0..1..1. .0..0..1..0
A307796
Number T(n,k) of binary words of length n such that k is the difference of numbers of occurrences of subword 101 and subword 010; triangle T(n,k), n>=0, -floor(n/3)<=k<=floor(n/3), read by rows.
Original entry on oeis.org
1, 2, 4, 1, 6, 1, 2, 12, 2, 6, 20, 6, 1, 12, 38, 12, 1, 3, 28, 66, 28, 3, 10, 56, 124, 56, 10, 1, 24, 119, 224, 119, 24, 1, 4, 60, 236, 424, 236, 60, 4, 15, 134, 481, 788, 481, 134, 15, 1, 42, 304, 950, 1502, 950, 304, 42, 1, 5, 114, 656, 1902, 2838, 1902, 656, 114, 5
Offset: 0
T(8,2) = 10: 01101101, 10101101, 10110101, 10110110, 10110111, 10111011, 10111101, 11011011, 11011101, 11101101.
T(8,-2) = 10: 00010010, 00100010, 00100100, 01000010, 01000100, 01001000, 01001001, 01001010, 01010010, 10010010.
T(9,3) = 1: 101101101.
T(9,-3) = 1: 010010010.
Triangle T(n,k) begins:
: 1 ;
: 2 ;
: 4 ;
: 1, 6, 1 ;
: 2, 12, 2 ;
: 6, 20, 6 ;
: 1, 12, 38, 12, 1 ;
: 3, 28, 66, 28, 3 ;
: 10, 56, 124, 56, 10 ;
: 1, 24, 119, 224, 119, 24, 1 ;
: 4, 60, 236, 424, 236, 60, 4 ;
: 15, 134, 481, 788, 481, 134, 15 ;
: 1, 42, 304, 950, 1502, 950, 304, 42, 1 ;
T(3n-4,n-2) gives
A000217 for n >= 3.
-
b:= proc(n, t, h) option remember; `if`(n=0, 1, expand(
`if`(h=3, 1/x, 1)*b(n-1, [1, 3, 1][t], 2)+
`if`(t=3, x, 1)*b(n-1, 2, [1, 3, 1][h])))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=-iquo(n, 3)..iquo(n, 3)))(b(n, 1$2)):
seq(T(n), n=0..15);
-
b[n_, t_, h_] := b[n, t, h] = If[n == 0, 1, Expand[If[h == 3, 1/x, 1]* b[n-1, {1, 3, 1}[[t]], 2] + If[t == 3, x, 1]*b[n-1, 2, {1, 3, 1}[[h]]]]];
T[n_] := Table[Coefficient[#, x, i], {i, -Quotient[n, 3], Quotient[n, 3]}]& @ b[n, 1, 1];
Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, May 08 2019, after Alois P. Heinz *)
A303430
Number of binary words of length n with exactly twice as many occurrences of subword 101 as occurrences of subword 010.
Original entry on oeis.org
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
Offset: 0
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.
-
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);
Showing 1-6 of 6 results.
Comments