A358581
Number of rooted trees with n nodes, most of which are leaves.
Original entry on oeis.org
1, 0, 1, 1, 4, 5, 20, 28, 110, 169, 663, 1078, 4217, 7169, 27979, 49191, 191440, 345771, 1341974, 2477719, 9589567, 18034670, 69612556, 132984290, 511987473, 991391707, 3807503552, 7460270591, 28585315026, 56595367747, 216381073935, 432396092153
Offset: 1
The a(1) = 1 through a(7) = 20 trees:
o . (oo) (ooo) (oooo) (ooooo) (oooooo)
((ooo)) ((oooo)) ((ooooo))
(o(oo)) (o(ooo)) (o(oooo))
(oo(o)) (oo(oo)) (oo(ooo))
(ooo(o)) (ooo(oo))
(oooo(o))
(((oooo)))
((o)(ooo))
((o(ooo)))
((oo)(oo))
((oo(oo)))
((ooo(o)))
(o((ooo)))
(o(o)(oo))
(o(o(oo)))
(o(oo(o)))
(oo((oo)))
(oo(o)(o))
(oo(o(o)))
(ooo((o)))
A358575 counts rooted trees by nodes and internal nodes, ordered
A090181.
-
art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n],Count[#,{},{0,Infinity}]>Count[#,[_],{0,Infinity}]&]],{n,0,10}]
-
\\ See A358584 for R(n).
seq(n) = {my(A=R(n)); vector(n, n, my(u=Vecrev(A[n]/y)); vecsum(u[n\2+1..#u]))} \\ Andrew Howroyd, Dec 31 2022
A005558
a(n) is the number of n-step walks on square lattice such that 0 <= y <= x at each step.
Original entry on oeis.org
1, 1, 3, 6, 20, 50, 175, 490, 1764, 5292, 19404, 60984, 226512, 736164, 2760615, 9202050, 34763300, 118195220, 449141836, 1551580888, 5924217936, 20734762776, 79483257308, 281248448936, 1081724803600, 3863302870000, 14901311070000, 53644719852000
Offset: 0
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Alin Bostan, Computer Algebra for Lattice Path Combinatorics, Slides for Séminaire de Combinatoire Ph. Flajolet, Mar 28 2013.
- Alin Bostan, Calcul Formel pour la Combinatoire des Marches [The text is in English], Habilitation à Diriger des Recherches, Laboratoire d'Informatique de Paris Nord, Université Paris 13, December 2017.
- Alin Bostan, Frédéric Chyzak, Mark van Hoeij, Manuel Kauers, and Lucien Pech, Hypergeometric expressions for generating functions of walks with small steps in the quarter plane, Eur. J. Comb. 61, 242-275 (2017)
- Sergi Elizalde, The degree of symmetry of lattice paths, arXiv:2002.12874 [math.CO], 2020.
- R. K. Guy, Letter to N. J. A. Sloane, May 1990
- R. K. Guy, Catwalks, Sandsteps and Pascal Pyramids, J. Integer Seqs., Vol. 3 (2000), #00.1.6. See Column 1 of Figure 5.
- Heinrich Niederhausen, A Note on the Enumeration of Diffusion Walks in the First Octant by Their Number of Contacts with the Diagonal, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.3.
-
[Binomial(n+1, Ceiling(n/2))*Binomial(n, Floor(n/2)) - Binomial(n+1, Ceiling((n-1)/2))*Binomial(n, Floor((n-1)/2)): n in [0..30]]; // Vincenzo Librandi, Sep 30 2015
-
A:= proc(n,x,y) option remember;
local j, xpyp, xp,yp, res;
xpyp:= [[x-1,y],[x+1,y],[x,y-1],[x,y+1]];
res:= 0;
for j from 1 to 4 do
xp:= xpyp[j,1];
yp:= xpyp[j,2];
if xp < 0 or xp > yp or xp + yp > n then next fi;
res:= res + procname(n-1,xp,yp)
od;
return res
end proc:
A(0,0,0) := 1:
seq(add(add(A(n,x,y), y = x .. n - x), x = 0 .. floor(n/2)), n = 0 .. 50); # Robert Israel, Oct 07 2015
-
a[n_] := 1/2*Binomial[2*Floor[n/2]+1, Floor[n/2]+1]*CatalanNumber[1/2*(n+Mod[n, 2])]*(Mod[n, 2]+2); Table[a[n]//Abs, {n, 0, 27}] (* Jean-François Alcover, Mar 13 2014 *)
-
a(n)=binomial(n+1,ceil(n/2))*binomial(n,floor(n/2)) - binomial(n+1,ceil((n-1)/2))*binomial(n,floor((n-1)/2))
-
from sympy import ceiling as c, binomial
def a(n):
return binomial(n + 1, c(n/2))*binomial(n, n//2) - binomial(n + 1, c((n - 1)/2))*binomial(n, (n - 1)//2)
print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 02 2017
A358575
Triangle read by rows where T(n,k) is the number of unlabeled n-node rooted trees with k = 0..n-1 internal (non-leaf) nodes.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 8, 6, 1, 0, 1, 5, 14, 18, 9, 1, 0, 1, 6, 21, 39, 35, 12, 1, 0, 1, 7, 30, 72, 97, 62, 16, 1, 0, 1, 8, 40, 120, 214, 212, 103, 20, 1, 0, 1, 9, 52, 185, 416, 563, 429, 161, 25, 1
Offset: 1
Triangle begins:
1
0 1
0 1 1
0 1 2 1
0 1 3 4 1
0 1 4 8 6 1
0 1 5 14 18 9 1
0 1 6 21 39 35 12 1
0 1 7 30 72 97 62 16 1
0 1 8 40 120 214 212 103 20 1
0 1 9 52 185 416 563 429 161 25 1
Column k = n - 2 appears to be
A002620.
Column k = 3 appears to be
A006578.
The version for height instead of internal nodes is
A034781.
-
art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n],Count[#,[_],{0,Infinity}]==k&]],{n,1,10},{k,0,n-1}]
A358579
Numbers k such that the k-th standard ordered rooted tree has the same number of leaves as internal (non-leaf) nodes.
Original entry on oeis.org
2, 6, 7, 9, 20, 22, 23, 26, 27, 29, 35, 41, 66, 76, 78, 79, 84, 86, 87, 90, 91, 93, 97, 102, 103, 106, 107, 109, 115, 117, 130, 136, 138, 139, 141, 146, 153, 163, 169, 193, 196, 197, 201, 226, 241, 262, 263, 296, 300, 302, 303, 308, 310, 311, 314, 315, 317
Offset: 1
The terms together with their corresponding rooted trees begin:
2: (o)
6: (o(o))
7: ((oo))
9: ((o)(o))
20: (oo((o)))
22: (o(((o))))
23: (((o)(o)))
26: (o(o(o)))
27: ((o)(o)(o))
29: ((o((o))))
35: (((o))(oo))
41: (((o(o))))
66: (o(o)(((o))))
76: (oo(ooo))
78: (o(o)(o(o)))
79: ((o(((o)))))
84: (oo(o)(oo))
86: (o(o(oo)))
These ordered trees are counted by
A000891.
-
stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
srt[n_]:=If[n==1,{},srt/@stc[n-1]];
Select[Range[100],Count[srt[#],{},{0,Infinity}]==Count[srt[#],[_],{0,Infinity}]&]
A358588
Number of n-node ordered rooted trees of height equal to the number of internal (non-leaf) nodes.
Original entry on oeis.org
0, 0, 0, 0, 1, 8, 41, 171, 633, 2171, 7070, 22195, 67830, 203130, 598806, 1743258, 5023711, 14356226, 40737383, 114904941, 322432215, 900707165, 2506181060, 6948996085, 19207795836, 52944197508, 145567226556, 399314965956, 1093107693133, 2986640695436
Offset: 1
The a(5) = 1 and a(6) = 8 ordered trees:
((o)(o)) ((o)(o)o)
((o)(oo))
((o)o(o))
((oo)(o))
(o(o)(o))
(((o))(o))
(((o)(o)))
((o)((o)))
For leaves instead of height we have
A000891, unordered
A185650 aerated.
For leaves instead of internal nodes we have
A358590, unordered
A358589.
A001263 counts ordered rooted trees by nodes and leaves, unordered
A055277.
A080936 counts ordered rooted trees by nodes and height, unordered
A034781.
A090181 counts ordered rooted trees by nodes and internals, unord.
A358575.
-
aot[n_]:=If[n==1,{{}},Join@@Table[Tuples[aot/@c],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[aot[n],Count[#,[_],{0,Infinity}]==Depth[#]-1&]],{n,1,10}]
-
\\ Needs R(n,f) defined in A358590.
seq(n) = {Vec(R(n, (h,p)->polcoef(subst(p, x, x/y), -h, y)), -n)} \\ Andrew Howroyd, Jan 01 2023
A000356
Number of rooted cubic maps with 2n nodes and a distinguished Hamiltonian cycle: (2n)!(2n+1)! / (n!^2*(n+1)!(n+2)!).
Original entry on oeis.org
1, 5, 35, 294, 2772, 28314, 306735, 3476330, 40831076, 493684828, 6114096716, 77266057400, 993420738000, 12964140630900, 171393565105575, 2291968851019650, 30961684478686500, 422056646314726500
Offset: 1
- Amitai Regev, Preprint. [From Amitai Regev (amitai.regev(AT)weizmann.ac.il), Mar 10 2010]
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Vincenzo Librandi, Table of n, a(n) for n = 1..800
- R. K. Guy, Catwalks, sandsteps and Pascal pyramids, J. Integer Sequences, Vol. 3 (2000), Article #00.1.6.
- Anatol N. Kirillov, Notes on Schubert, Grothendieck and key polynomials, SIGMA, Symmetry Integrability Geom. Methods Appl. 12, Paper 034, 56 p. (2016).
- W. T. Tutte, A census of Hamiltonian polygons, Canad. J. Math., 14 (1962), 402-417.
- W. T. Tutte, On the enumeration of four-colored maps, SIAM J. Appl. Math., 17 (1969), 454-460.
-
A000356 := proc(n)
binomial(2*n,n)*binomial(2*n+1,n+1)/(n+1)/(n+2) ;
end proc:
-
CoefficientList[ Series[1 + (HypergeometricPFQ[{1, 3/2, 5/2}, {3, 4}, 16 x] - 1), {x, 0, 17}], x]
Table[(2*n)!*(2*n+2)!/(2*n!*(n+1)!^2*(n+2)!),{n,30}] (* Vincenzo Librandi, Mar 25 2012 *)
A103905
Square array T(n,k) read by antidiagonals: number of tilings of an hexagon.
Original entry on oeis.org
1, 1, 2, 1, 6, 3, 1, 20, 20, 4, 1, 70, 175, 50, 5, 1, 252, 1764, 980, 105, 6, 1, 924, 19404, 24696, 4116, 196, 7, 1, 3432, 226512, 731808, 232848, 14112, 336, 8, 1, 12870, 2760615, 24293412, 16818516, 1646568, 41580, 540, 9, 1, 48620, 34763300
Offset: 1
Array begins:
1, 2, 3, 4, 5, 6, ...
1, 6, 20, 50, 105, 196, ...
1, 20, 175, 980, 4116, 14112, ...
1, 70, 1764, 24696, 232848, 1646568, ...
1, 252, 19404, 731808, 16818516, 267227532, ...
...
- Peter J. Forrester and Alex Gamburd, Counting formulas associated with some random matrix averages, arXiv:math/0503002 [math.CO], 2005.
- Anthony J. Guttmann, Aleksandr L. Owczarek and Xavier G. Viennot, Vicious walkers and Young tableaux. I. Without walls, J. Phys. A 31 (1998) 8123-8135.
- Harald Helfgott and Ira M. Gessel, Enumeration of tilings of diamonds and hexagons with defects, arXiv:math/9810143 [math.CO], 1998.
- Christian Krattenthaler, Advanced Determinant Calculus: A Complement, Linear Algebra Appl. 411 (2005), 68-166; arXiv:math/0503507 [math.CO], 2005.
- Feihu Liu, Guoce Xin, and Chen Zhang, Ehrhart Polynomials of Order Polytopes: Interpreting Combinatorial Sequences on the OEIS, arXiv:2412.18744 [math.CO], 2024. See p. 28.
- Percy A. MacMahon, Combinatory Analysis, vol. 2, Cambridge University Press, 1916; reprinted by Chelsea, New York, 1960.
-
t[n_, k_] := Product[j!*(j + 2*n)!/(j + n)!^2, {j, 0, k - 1}]; Join[{1}, Flatten[ Table[ t[n - k , k], {n, 1, 10}, {k, 1, n}]]] (* Jean-François Alcover, May 16 2012, from 2nd formula *)
A123610
Triangle read by rows, where T(n,k) = (1/n)*Sum_{d|(n,k)} phi(d) * binomial(n/d,k/d)^2 for n >= k > 0, with T(n,0) = 1 for n >= 0.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 10, 4, 1, 1, 5, 20, 20, 5, 1, 1, 6, 39, 68, 39, 6, 1, 1, 7, 63, 175, 175, 63, 7, 1, 1, 8, 100, 392, 618, 392, 100, 8, 1, 1, 9, 144, 786, 1764, 1764, 786, 144, 9, 1, 1, 10, 205, 1440, 4420, 6352, 4420, 1440, 205, 10, 1, 1, 11, 275, 2475, 9900
Offset: 0
Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins:
1;
1, 1;
1, 2, 1;
1, 3, 3, 1;
1, 4, 10, 4, 1;
1, 5, 20, 20, 5, 1;
1, 6, 39, 68, 39, 6, 1;
1, 7, 63, 175, 175, 63, 7, 1;
1, 8, 100, 392, 618, 392, 100, 8, 1;
1, 9, 144, 786, 1764, 1764, 786, 144, 9, 1;
1, 10, 205, 1440, 4420, 6352, 4420, 1440, 205, 10, 1;
...
Example of column g.f.s are:
column 1: 1/(1 - x)^2;
column 2: Ser([1, 1, 3, 1]) / ((1 - x)^2*(1 - x^2)^2) = g.f. of A005997;
column 3: Ser([1, 2, 11, 26, 30, 26, 17, 6, 1]) / ((1 - x)^2*(1 - x^2)^2*(1 -x^3)^2);
column 4: Ser([1, 3, 28, 94, 240, 440, 679, 839, 887, 757, 550, 314, 148, 48, 11, 1]) / ((1 - x)^2*(1 - x^2)^2*(1 - x^3)^2*(1 - x^4)^2);
where Ser() denotes a polynomial in x with the given coefficients, as in Ser([1, 1, 3, 1]) = (1 + x + 3*x^2 + x^3).
-
T[, 0] = 1; T[n, k_] := 1/n DivisorSum[n, If[GCD[k, #] == #, EulerPhi[#]* Binomial[n/#, k/#]^2, 0]&]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 06 2015, adapted from PARI *)
-
{T(n,k)=if(k==0,1,(1/n)*sumdiv(n,d,if(gcd(k,d)==d, eulerphi(d)*binomial(n/d,k/d)^2,0)))}
A145600
a(n) is the number of walks from (0,0) to (0,1) that remain in the upper half-plane y >= 0 using (2*n - 1) unit steps either up (U), down (D), left (L) or right (R).
Original entry on oeis.org
1, 8, 75, 784, 8820, 104544, 1288287, 16359200, 212751396, 2821056160, 38013731756, 519227905728, 7174705330000, 100136810390400, 1409850293610375, 20002637245262400, 285732116760449700
Offset: 1
a(2) = 8: the 8 walks from (0,0) to (0,1) of three steps are
UDU, UUD, URL, ULR, RLU, LRU, RUL and LUR.
- M. Dukes and Y. Le Borgne, Parallelogram polyominoes, the sandpile model on a complete bipartite graph, and a q,t-Narayana polynomial, Journal of Combinatorial Theory, Series A, Volume 120, Issue 4, May 2013, Pages 816-842. - From N. J. A. Sloane, Feb 21 2013
A358584
Number of rooted trees with n nodes, at most half of which are leaves.
Original entry on oeis.org
0, 1, 1, 3, 5, 15, 28, 87, 176, 550, 1179, 3688, 8269, 25804, 59832, 186190, 443407, 1375388, 3346702, 10348509, 25632265, 79020511, 198670299, 610740694, 1555187172, 4768244803, 12276230777, 37546795678, 97601239282, 297831479850, 780790439063, 2377538260547
Offset: 1
The a(2) = 1 through a(6) = 15 trees:
(o) ((o)) ((oo)) (((oo))) (((ooo)))
(o(o)) ((o)(o)) ((o)(oo))
(((o))) ((o(o))) ((o(oo)))
(o((o))) ((oo(o)))
((((o)))) (o((oo)))
(o(o)(o))
(o(o(o)))
(oo((o)))
((((oo))))
(((o)(o)))
(((o(o))))
((o)((o)))
((o((o))))
(o(((o))))
(((((o)))))
A358575 counts rooted trees by nodes and internal nodes, ordered
A090181.
-
art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
Table[Length[Select[art[n],Count[#,{},{0,Infinity}]<=Count[#,[_],{0,Infinity}]&]],{n,0,10}]
-
R(n) = {my(A = O(x)); for(j=1, n, A = x*(y - 1 + exp( sum(i=1, j, 1/i * subst( subst( A + O(x*x^(j\i)), x, x^i), y, y^i) ) ))); Vec(A)};
seq(n) = {my(A=R(n)); vector(n, n, vecsum(Vecrev(A[n]/y)[1..n\2]))} \\ Andrew Howroyd, Dec 30 2022
Comments