A339252
a(0) = 1, a(1) = 4, a(2) = 11, and a(n) = 4*a(n-1) - 4*a(n-2) for n >= 3.
Original entry on oeis.org
1, 4, 11, 28, 68, 160, 368, 832, 1856, 4096, 8960, 19456, 41984, 90112, 192512, 409600, 868352, 1835008, 3866624, 8126464, 17039360, 35651584, 74448896, 155189248, 322961408, 671088640, 1392508928, 2885681152, 5972688896, 12348030976, 25501368320, 52613349376
Offset: 0
-
a := proc(n) option remember; if n <= 2 then return [1, 4, 11][n+1] fi;
4*a(n - 1) - 4*a(n - 2) end: seq(a(n), n = 0..31);
-
CoefficientList[Series[(1 - x^2)/(1 - 2*x)^2, {x, 0, 50}], x]
A106471
A number triangle with duplicated columns of the form 2^n - Sum_{j=0..2k-1} C(n,j).
Original entry on oeis.org
1, 2, 1, 4, 2, 1, 8, 4, 4, 1, 16, 8, 11, 4, 1, 32, 16, 26, 11, 6, 1, 64, 32, 57, 26, 22, 6, 1, 128, 64, 120, 57, 64, 22, 8, 1, 256, 128, 247, 120, 163, 64, 37, 8, 1, 512, 256, 502, 247, 382, 163, 130, 37, 10, 1, 1024, 512, 1013, 502, 848, 382, 386, 130, 56, 10, 1, 2048, 1024
Offset: 0
Triangle begins
1;
2, 1;
4, 2, 1;
8, 4, 4, 1;
16, 8, 11, 4, 1;
32, 16, 26, 11, 6, 1;
64, 32, 57, 26, 22, 6, 1;
A296559
Triangle read by rows: T(n,k) is the number of compositions of n having k parts equal to 1 or 2 (0<=k<=n).
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 3, 1, 1, 4, 3, 3, 4, 1, 2, 4, 9, 5, 6, 5, 1, 3, 7, 12, 16, 9, 10, 6, 1, 4, 13, 18, 28, 26, 16, 15, 7, 1, 6, 19, 36, 42, 55, 41, 27, 21, 8, 1, 9, 29, 60, 82, 90, 97, 64, 43, 28, 9, 1, 13, 47, 94, 152, 170, 177, 160, 99, 65, 36, 10, 1, 19, 73, 158, 252, 335, 333, 323, 253, 151, 94, 45, 11, 1
Offset: 0
T(3,2) = 2 because we have [1,2],[2,1].
T(6,3) = 5 because we have [2,2,2],[1,1,1,3],[1,1,3,1],[1,3,1,1],[3,1,1,1].
Triangle begins:
1,
0, 1,
0, 1, 1,
1, 0, 2, 1,
1, 2, 1, 3, 1,
1, 4, 3, 3, 4, 1,
2, 4, 9, 5, 6, 5, 1,
3, 7, 12, 16, 9, 10, 6, 1,
4, 13, 18, 28, 26, 16, 15, 7, 1,
...
-
g := (1-x)/(1-(1+t)*x-(1-t)*x^3): gser := simplify(series(g, x = 0, 17)): for n from 0 to 15 do p[n] := sort(expand(coeff(gser, x, n))) end do: for n from 0 to 15 do seq(coeff(p[n], t, j), j = 0 .. n) end do; # yields sequence in triangular form
-
nmax = 12;
s = Series[(1-x)/(1 - (1+t) x - (1-t) x^3), {x, 0, nmax}, {t, 0, nmax}];
T[n_, k_] := SeriesCoefficient[s, {x, 0, n}, {t, 0, k}];
Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 16 2017 *)
A386878
Number of runs of 1's of length <= 3 over all binary strings of length n.
Original entry on oeis.org
0, 1, 3, 8, 19, 45, 104, 236, 528, 1168, 2560, 5568, 12032, 25856, 55296, 117760, 249856, 528384, 1114112, 2342912, 4915200, 10289152, 21495808, 44826624, 93323264, 193986560, 402653184, 834666496, 1728053248, 3573547008, 7381975040, 15233712128, 31406948352
Offset: 0
For n=3, the breakdown of the 8 runs of 1s is as follows: 001 (1), 010 (1), 011 (1), 100 (1), 101 (2), 110 (1) and 111 (1).
For n=4, the breakdown of the 19 runs of 1s is as follows: 0001 (1), 0010 (1), 0011 (1), 0100 (1), 0101 (2), 0110 (1), 0111 (1), 1000 (1), 1001 (2), 1010 (2), 1011 (2), 1100 (1), 1101 (2) and 1110 (1).
-
LinearRecurrence[{4, -4}, {0, 1, 3, 8, 19, 45}, 40] (* Paolo Xausa, Aug 19 2025 *)
-
def A386878(n): return (0,1,3,8,19)[n] if n<5 else 3+7*(n+1)<Chai Wah Wu, Aug 19 2025
Showing 1-4 of 4 results.
Comments