A089741
Triangle read by rows: T(n,k) = number of peakless Motzkin paths of length n containing k UHH...HD's, where U=(1,1), D=(1,-1) and H=(1,0) (can be easily expressed using RNA secondary structure terminology).
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 3, 1, 7, 1, 15, 1, 1, 31, 5, 1, 63, 18, 1, 127, 56, 1, 1, 255, 160, 7, 1, 511, 432, 34, 1, 1023, 1120, 138, 1, 1, 2047, 2816, 500, 9, 1, 4095, 6912, 1672, 55, 1, 8191, 16640, 5264, 275, 1, 1, 16383, 39424, 15808, 1205, 11, 1, 32767, 92160, 45696, 4797
Offset: 0
T(7,2)=5 because we have H(UHD)(UHD), (UHD)H(UHD), (UHD)(UHD)H, (UHD)(UHHD) and (UHHD)(UHD) (the required subwords are shown between parentheses).
Triangle begins:
1;
1;
1;
1, 1;
1, 3;
1, 7;
1, 15, 1;
1, 31, 5;
1, 63, 18;
1, 127, 56, 1;
1, 255, 160, 7;
...
- I. L. Hofacker, P. Schuster and P. F. Stadler, Combinatorics of RNA secondary structures, Discrete Appl. Math., 88, 1998, 207-237.
- P. R. Stein and M. S. Waterman, On some new sequences generalizing the Catalan and Motzkin numbers, Discrete Math., 26 (1979), 261-272.
- M. Vauchassade de Chaumont and G. Viennot, Polynômes orthogonaux et problèmes d'énumération en biologie moléculaire, Publ. I.R.M.A. Strasbourg, 1984, 229/S-08; Sem. Loth. Comb. B08l (1984) 79-86.
A097229
Triangle read by rows: number of Motzkin paths by length and by number of humps.
Original entry on oeis.org
1, 1, 1, 1, 3, 1, 7, 1, 1, 15, 5, 1, 31, 18, 1, 1, 63, 56, 7, 1, 127, 160, 34, 1, 1, 255, 432, 138, 9, 1, 511, 1120, 500, 55, 1, 1, 1023, 2816, 1672, 275, 11, 1, 2047, 6912, 5264, 1205, 81, 1, 1, 4095, 16640, 15808, 4797, 481, 13
Offset: 0
Example: Table begins
n|
-+------------------
0|1
1|1
2|1, 1
3|1, 3
4|1, 7, 1
5|1, 15, 5
6|1, 31, 18, 1
7|1, 63, 56, 7
8|1, 127, 160, 34, 1
T(5,2) = 5 counts FUDUD, UDFUD, UDUDF, UDUFD, UFDUD.
-
a[n_, k_]/;k<0 || k>n/2 := 0; a[n_, 0]/;n>=0 := 1; a[n_, k_]/;1<=k<=n := a[n, k] = a[n-1, k] + Sum[a[n-r, k-1], {r, 2, n}]+Sum[a[r-2, j]a[n-r, k-j], {r, 2, n}, {j, k}] (* This recurrence counts a(n, k) by first return to ground level. *)
-
N(n,k):=(binomial(n,k-1)*binomial(n,k))/n;
T(n,k):=if k=0 then 1 else sum(binomial(n, 2*i)*N(i,k),i,1,n); /* Vladimir Kruchinin, Jan 08 2022 */
A102841
a(n) = ((9*n^2 + 33*n + 26)*2^n + (-1)^n)/27.
Original entry on oeis.org
1, 5, 19, 61, 179, 493, 1299, 3309, 8211, 19949, 47635, 112109, 260627, 599533, 1366547, 3089901, 6937107, 15476205, 34331155, 75769325, 166451731, 364127725, 793500179, 1723082221, 3729512979, 8048092653, 17319057939
Offset: 0
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- M. Archibald, A. Blecher, A. Knopfmacher, M. E. Mays, Inversions and Parity in Compositions of Integers, J. Int. Seq., Vol. 23 (2020), Article 20.4.1.
- Index entries for linear recurrences with constant coefficients, signature (5,-6,-4,8).
-
[((9*n^2 + 33*n + 26)*2^n + (-1)^n)/27 : n in [0..40]]; // Wesley Ivan Hurt, Jul 03 2020
-
Table[(1/27)*((9 n^2 + 33 n + 26) 2^n + (-1)^n), {n, 0, 50}] (* or *) LinearRecurrence[{5,-6,-4,8}, {1,5,19,61}, 50] (* G. C. Greubel, Sep 27 2017 *)
A114593
Triangle read by rows: T(n,k) is the number of hill-free Dyck paths of semilength n, having k ascents of length at least 2 (1 <= k <= floor(n/2), n >= 2).
Original entry on oeis.org
1, 2, 4, 2, 8, 10, 16, 36, 5, 32, 112, 42, 64, 320, 224, 14, 128, 864, 960, 168, 256, 2240, 3600, 1200, 42, 512, 5632, 12320, 6600, 660, 1024, 13824, 39424, 30800, 5940, 132, 2048, 33280, 119808, 128128, 40040, 2574, 4096, 78848, 349440, 489216, 224224, 28028, 429
Offset: 2
T(4,2)=2 because we have (UU)D(UU)DDD and (UU)DD(UU)DD, where U=(1,1), D=(1,-1) (ascents of length at least two are shown between parentheses).
Triangle starts:
1;
2;
4, 2;
8, 10;
16, 36, 5;
32, 112, 42;
64, 320, 224, 14;
-
T:=proc(n,k) if k<=floor(n/2) then 2^(n-2*k)*binomial(n+1,k)*binomial(n-k-1,k-1)/(n+1) else 0 fi end: for n from 2 to 14 do seq(T(n,k),k=1..floor(n/2)) od;
-
m = 13(*rows*); G = 0; Do[G = Series[(1 + G^2 (2 + t z) z)/(1 + 2 z), {t, 0, m+1}, {z, 0, m+1}] // Normal // Expand, {m+2}]; Rest[CoefficientList[ #, t]]& /@ CoefficientList[G-1, z][[3;;]] // Flatten (* Jean-François Alcover, Jan 22 2019 *)
A136523
Triangle T(n,k) = A053120(n,k) + A053120(n-1,k), read by rows.
Original entry on oeis.org
1, 1, 1, -1, 1, 2, -1, -3, 2, 4, 1, -3, -8, 4, 8, 1, 5, -8, -20, 8, 16, -1, 5, 18, -20, -48, 16, 32, -1, -7, 18, 56, -48, -112, 32, 64, 1, -7, -32, 56, 160, -112, -256, 64, 128, 1, 9, -32, -120, 160, 432, -256, -576, 128, 256, -1, 9, 50, -120, -400, 432, 1120, -576, -1280, 256, 512
Offset: 0
Triangle begins as:
1;
1, 1;
-1, 1, 2;
-1, -3, 2, 4;
1, -3, -8, 4, 8;
1, 5, -8, -20, 8, 16;
-1, 5, 18, -20, -48, 16, 32;
-1, -7, 18, 56, -48, -112, 32, 64;
1, -7, -32, 56, 160, -112, -256, 64, 128;
1, 9, -32, -120, 160, 432, -256, -576, 128, 256;
-1, 9, 50, -120, -400, 432, 1120, -576, -1280, 256, 512;
-
function A053120(n,k)
if ((n+k) mod 2) eq 1 then return 0;
elif n eq 0 then return 1;
else return (-1)^Floor((n-k)/2)*(n/(n+k))*Binomial(Floor((n+k)/2), k)*2^k;
end if;
end function;
A136523:= func< n,k | A053120(n,k) + A053120(n-1,k) >;
[A136523(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 26 2023
-
A053120[n_, k_]:= Coefficient[ChebyshevT[n,x], x, k];
T[n_, k_]:= T[n, k]= A053120[n,k] + A053120[n-1,k];
Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten
-
def A053120(n,k):
if (n+k)%2==1: return 0
elif n==0: return 1
else: return floor((-1)^((n-k)//2)*(n/(n+k))*binomial((n+k)//2, k)*2^k)
def A136523(n,k): return A053120(n,k) + A053120(n-1,k)
flatten([[A136523(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 26 2023
A224288
Number of permutations of length n containing exactly 2 occurrences of 123 and 2 occurrences of 132.
Original entry on oeis.org
0, 0, 0, 0, 1, 6, 26, 94, 306, 934, 2732, 7752, 21488, 58432, 156288, 411904, 1071104, 2750976, 6984704, 17545216, 43634688, 107511808, 262602752, 636223488, 1529741312, 3652059136, 8660975616, 20412104704, 47826599936, 111446851584, 258360737792, 596044152832
Offset: 0
a(4) = 1: (1,2,4,3).
a(5) = 6: (2,3,5,1,4), (2,3,5,4,1), (2,5,1,3,4), (3,1,4,5,2), (4,1,2,5,3), (5,1,2,4,3).
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- B. Nakamura, Approaches for enumerating permutations with a prescribed number of occurrences of patterns, arXiv 1301.5080 [math.CO], 2013.
- B. Nakamura, A Maple package for enumerating n-permutations with r occurrences of the pattern 123 and s occurrences of the pattern 132 [Broken link]
- Index entries for linear recurrences with constant coefficients, signature (10,-40,80,-80,32).
-
# Programs can be obtained from the Nakamura link
-
Join[{0, 0, 0, 0, 1}, LinearRecurrence[{10, -40, 80, -80, 32}, {6, 26, 94, 306, 934}, 27]] (* Jean-François Alcover, Feb 29 2020 *)
A224290
Number of permutations of length n containing exactly 3 occurrences of 123 and 3 occurrences of 132.
Original entry on oeis.org
0, 0, 0, 0, 0, 1, 6, 30, 136, 566, 2176, 7808, 26440, 85332, 264632, 793792, 2315136, 6592640, 18390784, 50392064, 135921664, 361536512, 949708800, 2466807808, 6342115328, 16153509888, 40790523904, 102186352640, 254105092096, 627533152256, 1539764125696
Offset: 0
a(5) = 1: (1,4,3,2,5).
a(6) = 6: (2,5,4,3,1,6), (2,5,4,3,6,1), (3,5,1,4,6,2), (3,6,1,4,2,5), (5,1,4,3,2,6), (6,1,4,3,2,5).
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- B. Nakamura, Approaches for enumerating permutations with a prescribed number of occurrences of patterns, arXiv 1301.5080 [math.CO], 2013.
- B. Nakamura, A Maple package for enumerating n-permutations with r occurrences of the pattern 123 and s occurrences of the pattern 132 [Broken link]
- Index entries for linear recurrences with constant coefficients, signature (14,-84,280,-560,672,-448,128).
-
# Programs can be obtained from the Nakamura link
-
Join[{0, 0, 0, 0, 0, 1, 6}, LinearRecurrence[{14, -84, 280, -560, 672, -448, 128}, {30, 136, 566, 2176, 7808, 26440, 85332}, 33]] (* Jean-François Alcover, Nov 28 2018 *)
-
concat([0,0,0,0,0], Vec(x^5*(1 - 8*x + 30*x^2 - 60*x^3 + 62*x^4 - 36*x^5 + 24*x^6 - 8*x^7 + 4*x^8) / (1 - 2*x)^7 + O(x^40))) \\ Colin Barker, Nov 28 2018
A304635
Triangle T(n,j) read by rows: the number of j-faces in the hypersimplicial decomposition of the unit cube of n dimensions.
Original entry on oeis.org
1, 5, 2, 18, 14, 3, 56, 64, 27, 4, 160, 240, 150, 44, 5, 432, 800, 660, 288, 65, 6, 1120, 2464, 2520, 1456, 490, 90, 7, 2816, 7168, 8736, 6272, 2800, 768, 119, 8, 6912, 19968, 28224, 24192, 13440, 4896, 1134, 152, 9, 16640, 53760, 86400, 86016, 57120, 25920, 7980, 1600, 189, 10
Offset: 1
The triangle starts in row n>= for 1<=j<=n as:
1,
5,2,
18,14,3,
56,64,27,4,
160,240,150,44,5,
432,800,660,288,65,6,
1120,2464,2520,1456,490,90,7,
2816,7168,8736,6272,2800,768,119,8,
6912,19968,28224,24192,13440,4896,1134,152,9,
16640,53760,86400,86016,57120,25920,7980,1600,189,10,
A349427
a(n) = ((n+1)^2 - 2) * binomial(2*n-2,n-1) / 2.
Original entry on oeis.org
0, 1, 7, 42, 230, 1190, 5922, 28644, 135564, 630630, 2892890, 13117676, 58903572, 262303132, 1159666900, 5094808200, 22259364120, 96773942790, 418882316490, 1805951924700, 7758285404100, 33221013445620, 141830949914940, 603876402587640, 2564713671647400
Offset: 0
Cf.
A000108,
A000217,
A000984,
A001700,
A001793,
A002457,
A002544,
A008865,
A037966,
A088218,
A127736.
-
Table[((n + 1)^2 - 2) Binomial[2 n - 2, n - 1]/2, {n, 0, 24}]
nmax = 24; CoefficientList[Series[x (1 - x) (1 - 2 x)/(1 - 4 x)^(5/2), {x, 0, nmax}], x]
-
a(n) = ((n+1)^2 - 2) * binomial(2*n-2,n-1) / 2 \\ Andrew Howroyd, Nov 20 2021
A091977
Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k exterior pairs.
Original entry on oeis.org
1, 1, 2, 4, 1, 8, 5, 1, 16, 18, 7, 1, 32, 56, 34, 9, 1, 64, 160, 138, 55, 11, 1, 128, 432, 500, 275, 81, 13, 1, 256, 1120, 1672, 1205, 481, 112, 15, 1, 512, 2816, 5264, 4797, 2471, 770, 148, 17, 1, 1024, 6912, 15808, 17738, 11403, 4536, 1156, 189, 19, 1, 2048, 16640
Offset: 0
T(4,1)=5 because the Dyck paths of semilength 4 having 1 exterior pair are: ud(u)udud(d), (u)udud(d)ud, (u)ududud(d), (u)uduudd(d) and (u)uuuddud(d) [the u and d that form the unique exterior pair are shown between parentheses].
Triangle begins:
[1],
[1],
[2],
[4, 1],
[8, 5, 1],
[16, 18, 7, 1],
[32, 56, 34, 9, 1],
[64, 160, 138, 55, 11, 1],
[128, 432, 500, 275, 81, 13, 1]
Triangle (1,1,0,1,1,0,1,1,...) DELTA (0,0,1,0,0,1,0,0,1,...) begins :
1
1, 0
2, 0, 0
4, 1, 0, 0
8, 5, 1, 0, 0
16, 18, 7, 1, 0, 0
32, 56, 34, 9, 1, 0, 0
64, 160, 138, 55, 11, 1, 0, 0...- _Philippe Deléham_, Feb 06 2012
T(n, k)=
A091866(n, n-k), T(n, 0)=2^(n-1) (n>0), T(n, 1)=
A001793(n-2), row sums give the Catalan numbers (
A000108).
Comments