A121448
Triangle read by rows: T(n,k) is the number of binary trees with n edges and having k vertices of outdegree 1 (n>=0, k>=0). A binary tree is a rooted tree in which each vertex has at most two children and each child of a vertex is designated as its left or right child.
Original entry on oeis.org
1, 0, 2, 1, 0, 4, 0, 6, 0, 8, 2, 0, 24, 0, 16, 0, 20, 0, 80, 0, 32, 5, 0, 120, 0, 240, 0, 64, 0, 70, 0, 560, 0, 672, 0, 128, 14, 0, 560, 0, 2240, 0, 1792, 0, 256, 0, 252, 0, 3360, 0, 8064, 0, 4608, 0, 512, 42, 0, 2520, 0, 16800, 0, 26880, 0, 11520, 0, 1024, 0, 924, 0, 18480, 0
Offset: 0
T(2,2)=4 because, denoting by L (R) an edge going from a vertex to a left (right) child, we have the paths: LL, LR, RL and RR.
Triangle starts:
1;
0,2;
1,0,4;
0,6,0,8;
2,0,24,0,16;
-
T:=proc(n,k) if n-k mod 2 = 0 then 2^k*binomial(n+1,k)*binomial(n+1-k,(n-k)/2)/(n+1) else 0 fi end: for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
-
nn=10;Drop[CoefficientList[Series[(1-2x y - ((-4x^2+(1-2x y)^2))^(1/2))/(2 x),{x,0,nn}],{x,y}],1]//Grid (* Geoffrey Critzer, Feb 20 2013 *)
A125107
Subtract compositions (A011782) from Catalan numbers (A000108).
Original entry on oeis.org
0, 0, 0, 1, 6, 26, 100, 365, 1302, 4606, 16284, 57762, 205964, 738804, 2666248, 9678461, 35324902, 129579254, 477507628, 1767001046, 6563596132, 24465218444, 91480466488, 343055419346, 1289895758716, 4861929624236, 18367319517720, 69533483807140, 263747817532632
Offset: 0
A000108 begins 1 1 2 5 14 42 132 429 ...
A011782 begins 1 1 2 4 8 16 32 64 ...
so we get .... 0 0 0 1 6 26 100 365 ...
.
The 26 Touchard walks of length 4 that have at least one N-step are:
NNSS, NSNS, NSEE, NSEW, NSWE, NSWW, NESE, NESW, NWSE,
NWSW, NEES, NEWS, NWES, NWWS, ENSE, ENSW, WNSE, WNSW,
ENES, ENWS, WNES, WNWS, EENS, EWNS, WENS, WWNS.
-
# From Peter Luschny, Nov 28 2024: (Start)
a := n -> ifelse(n = 0, 0, binomial(2*n, n)/(n+1) - 2^(n-1)): seq(a(n), n = 0..28);
# Series expansion:
gf := (1 - sqrt(1 - 4*x)) / (2*x) - (1 - x) / (1 - 2*x): ser := series(gf, x, 30): seq(coeff(ser, x, n), n = 0..28);
# Evaluating polynomials:
p := (n, x) -> ifelse(n = 0, 0, 2^(n-1)*(hypergeom([1 - n/2, 1/2 - n/2], [2], x) - 1)): seq(subs(x = 1, expand(simplify(p(n, x)))), n = 0..28); # (End)
-
Table[CatalanNumber[n] - If[n==0, 1, 2^(n-1)], {n, 0, 30}] (* David Scambler, Sep 14 2012 *)
-
# Generates the walks (for illustration only).
C = str.count
def aGen(n: int) -> Generator[str, Any, list[str]]:
a = [""]
if n <= 0: return a
for w in a:
if len(w) == n - 1:
if C(w, "N") > 0 and C(w, "N") == C(w, "S"):
yield w
else:
for j in "NSEW":
U = w + j
if C(U, "N") >= C(U, "S"):
a += [U]
return a
for n in range(6): print([w for w in aGen(n)]) # Peter Luschny, Dec 03 2024
A127529
Triangle read by rows: T(n,k) is the number of ordered trees with n edges and jump-length equal to k (n >= 0, 0 <= k <= n-2).
Original entry on oeis.org
1, 1, 2, 4, 1, 8, 5, 1, 16, 17, 8, 1, 32, 49, 38, 12, 1, 64, 129, 141, 77, 17, 1, 128, 321, 453, 361, 143, 23, 1, 256, 769, 1326, 1399, 834, 247, 30, 1, 512, 1793, 3640, 4776, 3869, 1765, 402, 38, 1, 1024, 4097, 9539, 14911, 15353, 9722, 3469, 623, 47, 1, 2048, 9217
Offset: 0
Triangle starts:
1;
1;
2;
4, 1;
8, 5, 1;
16, 17, 8, 1;
32, 49, 38, 12, 1;
Triangle (1,1,0,1,0,1,0,1,0,1, ...) DELTA (0,0,1,0,1,0,1,0,1,0,1,0,...) begins:
1;
1, 0;
2, 0, 0;
4, 1, 0, 0;
8, 5, 1, 0, 0;
16, 17, 8, 1, 0, 0;
32, 49, 38, 12, 1, 0, 0;
64, 129, 141, 77, 17, 1, 0, 0; ... - _Philippe Deléham_, Feb 06 2012
- E. Deutsch, Dyck path enumeration, Discrete Math., 204, 1999, 167-202 (see Table 2).
- FindStat - Combinatorial Statistic Finder, The number of valleys not on the x-axis of a Dyck path.
- W. Krandick, Trees and jumps and real roots, J. Computational and Applied Math., 162, 2004, 51-55.
-
G:=1/2/(1-2*z-t+t*z)*(-2*t+1+t*z-z+sqrt(-2*t*z+1-2*z+t^2*z^2-2*t*z^2+z^2)): Gser:=simplify(series(G,z=0,13)): for n from 0 to 12 do P[n]:=sort(coeff(Gser,z,n)) od: 1;1;for n from 2 to 12 do seq(coeff(P[n],t,j),j=0..n-2) od; # yields sequence in triangular form
-
n = 12; g[t_, z_] := 1/2/(1 - 2z - t + t*z)*(-2t + 1 + t*z - z + Sqrt[-2t*z + 1 - 2z + t^2*z^2 - 2t*z^2 + z^2]); Flatten[ CoefficientList[#, t]& /@ CoefficientList[ Simplify[Series[g[t, z], {z, 0, n}]], z]] (* Jean-François Alcover, Jul 22 2011, after g.f. *)
-
T(n,m):=if n=0 and m=0 then 1 else if n=0 then 0 else sum(k*binomial(n,m+k)*binomial(n-k-1,m),k,0,n-m)/(n); /* Vladimir Kruchinin, Oct 29 2020 */
A152225
Number of Dyck paths of semilength n with no peaks at height 0 (mod 3) and no valleys at height 2 (mod 3).
Original entry on oeis.org
1, 1, 2, 4, 9, 22, 56, 146, 388, 1048, 2869, 7942, 22192, 62510, 177308, 506008, 1451866, 4185788, 12119696, 35227748, 102753800, 300672368, 882373261, 2596389190, 7658677856, 22642421206, 67081765932, 199128719896, 592179010350, 1764044315540, 5263275015120
Offset: 0
Majun (majun(AT)math.sinica.edu.tw), Nov 29 2008
- Robert Israel, Table of n, a(n) for n = 0..2025
- Jean-Luc Baril, Sergey Kirgizov, and Armen Petrossian, Forests and pattern-avoiding permutations modulo pure descents, Permutation Patterns 2017, Reykjavik University, Iceland, June 26-30, 2017. See Section 5.
- Jean-Luc Baril and José Luis Ramírez, Descent distribution on Catalan words avoiding ordered pairs of Relations, arXiv:2302.12741 [math.CO], 2023.
- Paul Barry, Jacobsthal Decompositions of Pascal's Triangle, Ternary Trees, and Alternating Sign Matrices, Journal of Integer Sequences, 19, 2016, #16.3.5.
- Paul Barry, Riordan Pseudo-Involutions, Continued Fractions and Somos 4 Sequences, arXiv:1807.05794 [math.CO], 2018.
- Shu-Chung Liu, Jun Ma, and Yeong-Nan Yeh, Dyck Paths with Peak- and Valley-Avoiding Sets, Stud. Appl Math. 121 (3) (2008) 263-289.
-
f:= gfun:-rectoproc({(n+2)*a(n) - 2*(2*n+1)*a(n-1) + 4*(n-1)*a(n-2) + 2*(5-2*n)*a(n-3)=0,a(0)=1,a(1)=1,a(2)=2,a(3)=4},a(n),remember):
map(f, [$0..40]); # Robert Israel, Jan 09 2018
-
CoefficientList[Series[(1 - 2 x + 2 x^2 - Sqrt[1 - 4 x + 4 x^2 - 4 x^3])/(2 x^2), {x, 0, 30}], x] (* Michael De Vlieger, Jan 09 2018 *)
A236406
Triangle read by rows: number of (1-2-3)-avoiding permutations on n letters with k peaks.
Original entry on oeis.org
1, 1, 2, 3, 2, 4, 10, 5, 32, 5, 6, 84, 42, 7, 198, 210, 14, 8, 438, 816, 168, 9, 932, 2727, 1152, 42, 10, 1936, 8250, 5940, 660, 11, 3962, 23276, 25630, 5775, 132, 12, 8034, 62400, 97812, 37180, 2574, 13, 16200, 160953, 341224, 196625, 27456, 429, 14, 32556, 402906, 1111656, 905086, 212212, 10010
Offset: 0
Triangle begins:
1;
1;
2;
3, 2;
4, 10;
5, 32, 5;
6, 84, 42;
7, 198, 210, 14;
8, 438, 816, 168;
9, 932, 2727, 1152, 42;
10, 1936, 8250, 5940, 660;
...
- Alois P. Heinz, Rows n = 0..120, flattened
- A. M. Baxter, Refining enumeration schemes to count according to permutation statistics, arXiv preprint arXiv:1401.0337 [math.CO], 2014.
- M. Bukata, R. Kulwicki, N. Lewandowski, L. Pudwell, J. Roth, and T. Wheeland, Distributions of Statistics over Pattern-Avoiding Permutations, arXiv preprint arXiv:1812.07112 [math.CO], 2018.
- L. Pudwell, On the distribution of peaks (and other statistics), 2018.
-
m = maxExponent = 15;
G = -(-2 z^3 q^2 + 4z^3 q - 2z^3 - 2z^2 q + 2z^2 - 1 + Sqrt[-4z^2 q + 4z^2 - 4z + 1])/(2z (z q - z + 1)^2);
CoefficientList[# + O[q]^m, q]& /@ CoefficientList[G + O[z]^m, z]// Flatten (* Jean-François Alcover, Aug 06 2018 *)
A319252
Triangle read by rows: T(n,k) is the number of permutations pi of [n] with k+1 valleys such that s(pi) avoids the patterns 132, 231, 312, and 321, where s denotes West's stack-sorting map (0 <= k <= floor((n-1)/2)).
Original entry on oeis.org
1, 2, 4, 2, 8, 10, 16, 36, 4, 32, 112, 36, 64, 320, 200, 10, 128, 864, 880, 130, 256, 2240, 3360, 980, 28, 512, 5632, 11648, 5600, 476, 1024, 13824, 37632, 26880, 4536, 84, 2048, 33280, 115200, 114240, 31920, 1764
Offset: 1
Triangle begins:
1;
2;
4, 2;
8, 10;
16, 36, 4;
32, 112, 36;
...
-
Flatten[Table[Table[(2^(n - 2 (m + 1) + 1)) Binomial[n - 1, 2 m] CatalanNumber[m] + Sum[Sum[(2^((n - i - 1) - 2 j + 1)) Binomial[n - i - 2, 2 j - 2] CatalanNumber[j - 1] (2^(i - 2 (m - j + 1) + 1)) Binomial[i - 1, 2 (m - j + 1) - 2] CatalanNumber[m - j], {j, 1, m}], {i, 1, n - 2}], {m, 0, Floor[(n - 1)/2]}], {n, 1, 12}]]
A377443
Triangular array T(n,k) read by rows, satisfies A377441(n, k+2) = Sum_{m=0..k} T(k, m)*n^m.
Original entry on oeis.org
2, 5, 1, 14, 6, 1, 42, 27, 8, 1, 132, 111, 45, 10, 1, 429, 441, 222, 67, 12, 1, 1430, 1728, 1029, 382, 93, 14, 1, 4862, 6733, 4608, 2005, 599, 123, 16, 1, 16796, 26181, 20199, 10018, 3495, 881, 157, 18, 1, 58786, 101763, 87270, 48445, 19188, 5641, 1236, 195, 20, 1
Offset: 0
Triangle T(n, k) starts:
[0] 2
[1] 5, 1
[2] 14, 6, 1
[3] 42, 27, 8, 1
[4] 132, 111, 45, 10, 1
[5] 429, 441, 222, 67, 12, 1
[6] 1430, 1728, 1029, 382, 93, 14, 1
[7] 4862, 6733, 4608, 2005, 599, 123, 16, 1
[8] 16796, 26181, 20199, 10018, 3495, 881, 157, 18, 1
[9] 58786, 101763, 87270, 48445, 19188, 5641, 1236, 195, 20, 1
-
A377441(n, max_k) = Vec(-2*((n+1)*x-1)/((x-1)*(n*x-1)+((n*x^2-(n+1)*x+1)^2-4*x*(x-1)*((n+1)*x-1)+O(x^max_k))^(1/2)))
T(n, k) = Vec(A377441(y, n+5)[n+3])[n-k+1]
-
A091894(n, k) = 2^(n-2*k-1)*binomial(n-1, 2*k)*(binomial(2*k, k)/(k + 1))
A175136(n, k) = sum(m=0,(n - k)/2,A091894(n-k, m)*binomial(n-m-1, n-k))
T(n, k) = sum(m=1, n+1-k, A175136(n+2-k, n-m+2-k)*binomial(m+k-1, m-1))+(k==0)
A319030
Triangle read by rows: T(n,k) is the number of permutations pi of [n] such that pi has k+1 valleys and s(pi) avoids the patterns 132 and 321, where s is West's stack-sorting map (0 <= k <= floor((n-1)/2)).
Original entry on oeis.org
1, 2, 4, 2, 8, 14, 16, 64, 8, 32, 240, 92, 64, 800, 624, 34, 128, 2464, 3248, 534, 256, 7168, 14336, 4736, 144, 512, 19968, 56448, 31200, 2852, 1024, 53760, 204288, 169920, 31120, 604, 2048, 140800, 692736, 808896, 247280, 14412
Offset: 1
Triangle begins:
1,
2,
4, 2,
8, 14,
16, 64, 8,
32, 240, 92,
64, 800, 624, 34,
128, 2464, 3248, 534,
...
-
DeleteCases[Flatten[CoefficientList[Series[(1 - 2 x - Sqrt[(1 - 2 x)^2 - 4 x^2 y])/(2 x*y) + x^3*y (D[(1 - 2 x - Sqrt[(1 - 2 x)^2 - 4 x^2 y])/(2 x*y), x])^2, {x, 0, 10}], {x, y}]], 0]
A118929
a(n) = Sum_{k=0..[n/2]} 2^(n-2*k-1)*C(n-1,2*k)*C(2*k,k)/(k+1)*a(k), with a(0)=1.
Original entry on oeis.org
1, 1, 2, 5, 14, 44, 152, 569, 2270, 9524, 41576, 187432, 868144, 4117216, 19945408, 98523013, 495521686, 2534420852, 13167361256, 69417635240, 370991119792, 2008036459744, 10997771773888, 60896581502800, 340633178891872
Offset: 0
-
{a(n)=if(n==0,1,sum(k=0,n\2,2^(n-2*k-1)*binomial(n-1,2*k)*binomial(2*k,k)/(k+1)*a(k)))}
A274883
Triangle read by rows, T(n,k) = 2^k*binomial(n,k)*A057977(n-k) for n>=0 and 0<=k<=n.
Original entry on oeis.org
1, 1, 2, 1, 4, 4, 3, 6, 12, 8, 2, 24, 24, 32, 16, 10, 20, 120, 80, 80, 32, 5, 120, 120, 480, 240, 192, 64, 35, 70, 840, 560, 1680, 672, 448, 128, 14, 560, 560, 4480, 2240, 5376, 1792, 1024, 256, 126, 252, 5040, 3360, 20160, 8064, 16128, 4608, 2304, 512
Offset: 0
Triangle starts:
1;
1, 2;
1, 4, 4;
3, 6, 12, 8;
2, 24, 24, 32, 16;
10, 20, 120, 80, 80, 32;
5, 120, 120, 480, 240, 192, 64;
35, 70, 840, 560, 1680, 672, 448, 128;
14, 560, 560, 4480, 2240, 5376, 1792, 1024, 256;
-
T := (n,k) -> 2^k*binomial(n,k)*((n-k)!/floor((n-k)/2)!^2)/(floor((n-k)/2)+1);
seq(seq(T(n,k), k=0..n), n=0..9);
Comments