A288953
Number of relaxed compacted binary trees of right height at most one with minimal sequences between branch nodes except after the last branch node on level 0.
Original entry on oeis.org
1, 1, 3, 10, 51, 280, 1995, 15120, 138075, 1330560, 14812875, 172972800, 2271359475, 31135104000, 471038042475, 7410154752000, 126906349444875, 2252687044608000, 43078308695296875, 851515702861824000, 17984171447178811875, 391697223316439040000
Offset: 0
Denote by L the leaf and by o nodes. Every node has exactly two out-going edges or pointers. Internal edges are denoted by - or |. Pointers are omitted and may point to any node further right. The root is at level 0 at the very left.
The general structure is
L-o-o-o-o-o-o-o-o
| | | | |
o o o o o.
For n=0 the a(0)=1 solution is L.
For n=1 the a(1)=1 solution is L-o.
For n=2 the a(2)=3 solutions are
L-o-o L-o
|
o
2 + 1 solutions of this shape with pointers.
Cf.
A288954 (variation with additional initial sequence).
Cf.
A177145 (variation without final sequence).
Cf.
A001147 (relaxed compacted binary trees of right height at most one).
Cf.
A082161 (relaxed compacted binary trees of unbounded right height).
A211871
Number T(n,k) of permutations of n elements with no fixed points and largest cycle of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
Original entry on oeis.org
1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 3, 0, 6, 0, 0, 0, 20, 0, 24, 0, 0, 15, 40, 90, 0, 120, 0, 0, 0, 210, 420, 504, 0, 720, 0, 0, 105, 1120, 2520, 2688, 3360, 0, 5040, 0, 0, 0, 4760, 15120, 27216, 20160, 25920, 0, 40320, 0, 0, 945, 25200, 126000, 193536, 226800, 172800, 226800, 0, 362880
Offset: 0
T(0,0) = 1: (), the empty permutation.
T(2,2) = 1: (2,1).
T(3,3) = 2: (2,3,1), (3,1,2).
T(4,2) = 3: (2,1,4,3), (3,4,1,2), (4,3,2,1).
T(4,4) = 6: (2,4,1,3), (2,3,4,1), (3,1,4,2), (3,4,2,1), (4,1,2,3), (4,3,1,2).
Triangle T(n,k) begins:
1;
0, 0;
0, 0, 1;
0, 0, 0, 2;
0, 0, 3, 0, 6;
0, 0, 0, 20, 0, 24;
0, 0, 15, 40, 90, 0, 120;
0, 0, 0, 210, 420, 504, 0, 720;
0, 0, 105, 1120, 2520, 2688, 3360, 0, 5040;
...
- Alois P. Heinz, Rows n = 0..140, flattened
- Steven Finch, Permute, Graph, Map, Derange, arXiv:2111.05720 [math.CO], 2021.
- D. Panario and B. Richmond, Exact largest and smallest size of components, Algorithmica, 31 (2001), 413--432.
Diagonal gives:
A000142(n-1) for n>1.
T(n,0) + T(n,2) + T(n,3) gives
A055814(n).
-
A:= proc(n,k) option remember; `if`(n<0, 0, `if`(n=0, 1,
add(mul(n-i, i=1..j-1)*A(n-j,k), j=2..k)))
end:
T:= (n, k)-> A(n, k) -`if`(k=0,0,A(n, k-1)):
seq(seq(T(n,k), k=0..n), n=0..12);
-
A[n_, k_] := A[n, k] = If[n < 0, 0, If[n == 0, 1,
Sum[Product[n-i, {i, 1, j-1}]*A[n-j, k], {j, 2, k}]]];
T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k-1]];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
A288954
Number of relaxed compacted binary trees of right height at most one with minimal sequences between branch nodes except before the first and after the last branch node on level 0.
Original entry on oeis.org
1, 1, 3, 13, 79, 555, 4605, 42315, 436275, 4894155, 60125625, 794437875, 11325612375, 172141044075, 2793834368325, 48009995908875, 874143494098875, 16757439016192875, 338309837281040625, 7157757510792763875, 158706419654857449375, 3673441093896736036875
Offset: 2
Cf.
A288953 (variation without initial sequence).
Cf.
A177145 (variation without initial and final sequence).
Cf.
A001147 (relaxed compacted binary trees of right height at most one).
Cf.
A082161 (relaxed compacted binary trees of unbounded right height).
-
terms = 22; egf = 1/(3(1-z))(1/Sqrt[1-z^2] + (3z^3 - z^2 - 2z + 2)/((1-z)(1-z^2))) + O[z]^terms;
CoefficientList[egf, z] Range[0, terms-1]! (* Jean-François Alcover, Dec 13 2018 *)
A359760
Triangle read by rows. The Kummer triangle, the coefficients of the Kummer polynomials. K(n, k) = binomial(n, k) * oddfactorial(k/2) if k is even, otherwise 0, where oddfactorial(z) := (2*z)!/(2^z*z!).
Original entry on oeis.org
1, 1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 6, 0, 3, 1, 0, 10, 0, 15, 0, 1, 0, 15, 0, 45, 0, 15, 1, 0, 21, 0, 105, 0, 105, 0, 1, 0, 28, 0, 210, 0, 420, 0, 105, 1, 0, 36, 0, 378, 0, 1260, 0, 945, 0, 1, 0, 45, 0, 630, 0, 3150, 0, 4725, 0, 945, 1, 0, 55, 0, 990, 0, 6930, 0, 17325, 0, 10395, 0
Offset: 0
Triangle K(n, k) starts:
[0] 1;
[1] 1, 0;
[2] 1, 0, 1;
[3] 1, 0, 3, 0;
[4] 1, 0, 6, 0, 3;
[5] 1, 0, 10, 0, 15, 0;
[6] 1, 0, 15, 0, 45, 0, 15;
[7] 1, 0, 21, 0, 105, 0, 105, 0;
[8] 1, 0, 28, 0, 210, 0, 420, 0, 105;
[9] 1, 0, 36, 0, 378, 0, 1260, 0, 945, 0;
- John Riordan, Introduction to Combinatorial Analysis, Dover (2002), pp. 85-86.
- Pierre Humbert, Monographie des polynômes de Kummer, Nouvelles annales de mathématiques, journal des candidats aux écoles polytechnique et normale, Serie 5, Volume 1 (1922), pp. 81-92.
- E. E. Kummer, Über die hypergeometrische Reihe, Journal für die reine und angewandte Mathematik 15 (1836): 39-83.
- T. Mansour, M. Schork and M. Shattuck, The Generalized Stirling and Bell Numbers Revisited, Journal of Integer Sequences, Vol. 15 (2012), #12.8.3.
- Ladislav Truksa, Hypergeometric orthogonal systems of polynomials III, Aktuárské vědy, Vol. 2 (1931), No. 4, 177-203, (see p.200).
-
oddfactorial := proc(z) (2*z)! / (2^z*z!) end:
K := (n, k) -> ifelse(irem(k, 2) = 1, 0, binomial(n, k) * oddfactorial(k/2)):
seq(seq(K(n, k), k = 0..n), n = 0..11);
# Alternative, as coefficients of polynomials:
p := (n, x) -> 2^(n/2)*(-1/x^2)^(-n/2)*KummerU(-n/2, 1/2, -1/(2*x^2)):
seq(print(seq(coeff(simplify(p(n, x)), x, k), k = 0..n)), n = 0 ..9);
# Using the exponential generating function:
egf := exp(x + (t*x)^2 / 2): ser := series(egf, x, 12):
seq(print(seq(coeff(n! * coeff(ser, x, n), t, k), k = 0..n)), n = 0..9);
-
K[n_, k_] := K[n, k] = Which[OddQ[k], 0, k == 0, 1, n == k, K[n - 1, n - 2], True, K[n - 1, k] n/(n - k)];
Table[K[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 25 2023 *)
-
from functools import cache
@cache
def K(n: int, k: int) -> int:
if k % 2: return 0
if n < 3: return 1
if n == k: return K(n - 1, n - 2)
return (K(n - 1, k) * n) // (n - k)
for n in range(10): print([K(n, k) for k in range(n + 1)])
A380364
Number of rooted combinatorial maps with n edges and without faces of degree 1.
Original entry on oeis.org
1, 1, 4, 30, 284, 3240, 43282, 662760, 11446844, 220193310, 4669558564, 108251161920, 2723857695362, 73941952968000, 2154117314613604, 67038931862069790, 2219781607638887804, 77922680046440538600, 2890682855602209593362, 112998995448368143038120, 4642614436461699746566364
Offset: 0
-
seq(n)={my(A=O(x^(2*n+1)), g=serconvol(exp(x^2/2 + A),exp(-x + A)/(1-x))); Vec(substpol(1 + x*deriv(log(serlaplace(g))), x^2, x))}
A211880
Number of permutations of n elements with no fixed points and largest cycle of length 3.
Original entry on oeis.org
0, 0, 0, 2, 0, 20, 40, 210, 1120, 4760, 25200, 157850, 800800, 5345340, 35035000, 222472250, 1648046400, 12000388400, 88529240800, 720929459250, 5786188408000, 48072795270500, 424300329453000, 3731123025279650, 34083741984292000, 323768324084205000
Offset: 0
a(3) = 2: (2,3,1), (3,1,2).
-
egf:= (exp(x^3/3)-1)*exp(x^2/2):
a:= n-> n! *coeff(series(egf, x, n+1), x, n):
seq(a(n), n=0..30);
-
A[n_, k_] := A[n, k] = If[n < 0, 0, If[n == 0, 1,
Sum[Product[n - i, {i, 1, j - 1}] A[n - j, k], {j, 2, k}]]];
T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
a[n_] := T[n, 3];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Sep 03 2021, after Alois P. Heinz in A211871 *)
A333158
Irregular triangle read by rows: T(n,k) is the number of k-regular graphs on n labeled nodes with loops allowed, n >= 1, 0 <= k <= n + 1.
Original entry on oeis.org
1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 3, 8, 8, 3, 1, 1, 0, 38, 0, 38, 0, 1, 1, 15, 208, 730, 730, 208, 15, 1, 1, 0, 1348, 0, 20670, 0, 1348, 0, 1, 1, 105, 10126, 188790, 781578, 781578, 188790, 10126, 105, 1, 1, 0, 86174, 0, 37885204, 0, 37885204, 0, 86174, 0, 1
Offset: 1
Triangle begins:
1, 0, 1;
1, 1, 1, 1;
1, 0, 2, 0, 1;
1, 3, 8, 8, 3, 1;
1, 0, 38, 0, 38, 0, 1;
1, 15, 208, 730, 730, 208, 15, 1;
1, 0, 1348, 0, 20670, 0, 1348, 0, 1;
1, 105, 10126, 188790, 781578, 781578, 188790, 10126, 105, 1;
...
A368213
Triangular array read by rows: Number of permutations of [n] that factor into exactly k-cycles, ordered by n (rows) and divisors k of n (columns).
Original entry on oeis.org
1, 1, 1, 1, 0, 2, 1, 3, 0, 6, 1, 0, 0, 0, 24, 1, 15, 40, 0, 0, 120, 1, 0, 0, 0, 0, 0, 720, 1, 105, 0, 1260, 0, 0, 0, 5040, 1, 0, 2240, 0, 0, 0, 0, 0, 40320, 1, 945, 0, 0, 72576, 0, 0, 0, 0, 362880, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3628800, 1, 10395, 246400, 1247400, 0, 6652800, 0, 0, 0, 0, 0, 39916800
Offset: 1
Row n=6 is 1, 15, 40, 120 because there is one permutation of [6] consisting of six fixed points, there are 15 permutations consisting of three transpositions, there are forty permutations consisting of two three-cycles and there are one hundred and twenty permutations consisting of just one six-cycle (6!/6).
Triangular array starts:
[ 1] 1;
[ 2] 1, 1;
[ 3] 1, 0, 2;
[ 4] 1, 3, 0, 6;
[ 5] 1, 0, 0, 0, 24;
[ 6] 1, 15, 40, 0, 0, 120;
[ 7] 1, 0, 0, 0, 0, 0, 720;
[ 8] 1, 105, 0, 1260, 0, 0, 0, 5040;
[ 9] 1, 0, 2240, 0, 0, 0, 0, 0, 40320;
[10] 1, 945, 0, 0, 72576, 0, 0, 0, 0, 362880;
- P. Flajolet and R. Sedgewick, Analytic Combinatorics, Cambridge University Press, 2009, pages 120-122.
-
T:= (n, m)-> `if`(irem(n,m)=0, n!/m^(n/m)/(n/m)!, 0):
seq(seq(T(n, m), m = 1..n), n=1..15);
-
A368213[n_,k_]:=If[Divisible[n,k],n!/(k^(n/k)(n/k)!),0];
Table[A368213[n,k],{n,15},{k,n}] (* Paolo Xausa, Dec 18 2023 *)
-
def T(n, d): return factorial(n) // (d ** (n//d) * factorial(n//d))
for n in range(1, 19):
print([T(n, d) if n % d == 0 else 0 for d in range(1, n+1)])
# Peter Luschny, Dec 17 2023
A227937
Partitions of n labeled elements into subsets of two or three elements.
Original entry on oeis.org
1, 0, 1, 1, 3, 10, 25, 105, 385, 1540, 7245, 32725, 164395, 870870, 4689685, 27152125, 161786625, 997196200, 6443061625, 42702885225, 292938721075, 2078239413250, 15119319039825, 113390111659825, 873538909468225, 6894294734827500, 55855506234653125, 463151808682688125, 3927996120260086875, 34081631999814148750, 301951521812713898125, 2731127272307562253125, 25208456056107710010625, 237164027532948085570000
Offset: 0
The five elements a, b, c, d, e have ten partitions into sets of size two or three: ab/cde, ac/bde, ad/bce, ae/bcd, bc/ade, bd/ace, be/acd, cd/abe, ce/abd, and de/abc.
-
Flatten[{1,RecurrenceTable[{2*a[n] - 2*(n-1)*a[n-2]-(n-2)*(n-1)*a[n-3] == 0,a[1]==0,a[2]==1,a[3]==1}, a, {n, 1, 20}]}] (* Vaclav Kotesovec, Oct 09 2013 *)
-
x='x+O('x^66); Vec( serlaplace( exp( x^2/2 + x^3/6 ) ) ) \\ Joerg Arndt, Oct 07 2013
A316666
Number of simple relaxed compacted binary trees of right height at most one with no sequences on level 1 and no final sequences on level 0.
Original entry on oeis.org
1, 0, 1, 3, 15, 87, 597, 4701, 41787, 413691, 4512993, 53779833, 695000919, 9680369943, 144560191149, 2303928046437, 39031251610227, 700394126116851, 13270625547477177, 264748979672169681, 5547121478845459983, 121784530649198053263, 2795749225338111831429, 66981491857058929294653
Offset: 0
- G. C. Greubel, Table of n, a(n) for n = 0..448
- Antoine Genitrini, Bernhard Gittenberger, Manuel Kauers and Michael Wallner, Asymptotic Enumeration of Compacted Binary Trees, arXiv:1703.10031 [math.CO], 2017.
- Michael Wallner, A bijection of plane increasing trees with relaxed binary trees of right height at most one, arXiv:1706.07163 [math.CO], 2017.
-
m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (3*Exp(-x) + x-2)/(1-x)^2 )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Dec 12 2018
-
aseq := n-> 3*round((n+2)*n!/exp(1))-(n+2)*n!: bseq := n-> (n+2)*n!- 2* round((n+2)*n!/exp(1)): s := (a,b,n)-> a*aseq(n) + b*bseq( n): seq(s(1,0,n),n = 0..20); # Gary Detlefs, Dec 11 2018
-
terms = 24;
CoefficientList[(3E^-z+z-2)/(1-z)^2 + O[z]^terms, z] Range[0, terms-1]! (* Jean-François Alcover, Sep 14 2018 *)
-
Vec(serlaplace((3*exp(-x + O(x^25)) + x - 2)/(1 - x)^2)) \\ Andrew Howroyd, Jul 10 2018
Comments