[go: up one dir, main page]

login
Search: a000435 -id:a000435
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of connected functions on n labeled nodes.
(Formerly M3040 N1232)
+10
39
1, 3, 17, 142, 1569, 21576, 355081, 6805296, 148869153, 3660215680, 99920609601, 2998836525312, 98139640241473, 3478081490967552, 132705415800984825, 5423640496274200576, 236389784118231290049, 10944997108429625524224, 536484538620663729658993
OFFSET
1,2
COMMENTS
If one randomly selects a ball from an urn containing n different balls, with replacement, until exactly one ball has been selected twice, the probability that that ball was also the first ball selected once is a(n)/n^n. See also A000435. - Matthew Vandermast, Jun 15 2004
a(n) equals the permanent of the (n-1) X (n-1) matrix with n+1's along the main diagonal and 1's everywhere else. - John M. Campbell, Apr 20 2012
REFERENCES
D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, p. 112.
Ulrike Sattler, Decidable classes of formal power series with nice closure properties, Diplomarbeit im Fach Informatik, Univ. Erlangen - Nuernberg, Jul 27 1994
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).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..380 (first 50 terms from T. D. Noe)
H. Bergeron, E. M. F. Curado, J. P. Gazeau and L. M. C. S. Rodrigues, A note about combinatorial sequences and Incomplete Gamma function, arXiv preprint arXiv: 1309.6910 [math.CO], 2013.
Christian Brouder, William J. Keith, and Ângela Mestre, Closed forms for a multigraph enumeration, arXiv preprint arXiv:1301.0874 [math.CO], 2013.
Camille Combe, A geometric and combinatorial exploration of Hochschild lattices, arXiv:2007.00048 [math.CO], 2020. See p. 22.
L. Katz, Probability of indecomposability of a random mapping function, Ann. Math. Statist. 26, (1955), 512-517.
Frank Schmidt and Rodica Simion, Card shuffling and a transformation on S_n, Aequationes Math. 44 (1992), no. 1, 11-34.
Bernd Sturmfels and Ngoc Mai Tran, Combinatorial Types of Tropical Eigenvectors, arXiv:1105.5504 [math.CO], 2011-2012.
FORMULA
a(n) = Sum_{k=1..n} n!*n^(n-k-1) / (n-k)!.
E.g.f.: -log(1+LambertW(-x)). - Vladeta Jovovic, Apr 11 2001
E.g.f. satisfies 0=2y'^4+2y''^2-y'''y'-y''y'^2. - Michael Somos, Aug 23 2003
Integral representation in terms of the incomplete Gamma function: a(n) = exp(n+1)*Gamma(n+1,n+1) = exp(n+1)*Integral_{x=n+1..oo} x^n exp(-x) dx.
Asymptotics: sqrt(Pi*n/2)*n^(n-1). - N-E. Fahssi, Jan 25 2008, corrected by Vaclav Kotesovec, Nov 27 2012
a(n) = exp(1)*Integral_{x=1..oo} (n+x)^n*exp(-x) dx. - Gerald McGarvey, Apr 16 2008
a(n) = (1/n) * Sum_{k=1..n} C(n,k) * (n-k)^(n-k) * k^k. - Paul D. Hanna, Jul 04 2013
From Peter Bala, Jun 29 2016: (Start)
It appears that a(n) = (n-1)!*( e^n - Sum_{k >= 0} n^(n + k)/(n + k)!) ) = (n-1)!*( e^n - Sum_{k >= 0} k^2*n^(n + k - 1)/(n + k)!) ).
Note that (n-1)!*( e^n - Sum_{k >= 0} k^3*n^(n + k - 1)/(n + k)!) ) also appears to be an integer sequence beginning [1, 5, 37, 370, 4681, 71736, 1292005, ...]. (End)
a(n) = Sum_{k=1..n} (n!/(n-k)!) * k^2 * n^(n-k-2). - Brian P Hawkins, Feb 07 2024
MAPLE
spec := [B, {A=Prod(Z, Set(A)), B=Cycle(A)}, labeled]; [seq(combstruct[count](spec, size=n), n=0..20)];
seq(simplify(GAMMA(n, n)*exp(n)), n=1..20); # Vladeta Jovovic, Jul 21 2005
MATHEMATICA
t=Sum[n^(n-1)x^n/n!, {n, 1, 20}];
Range[0, 20]! CoefficientList[Series[Log[1/(1-t)]+1, {x, 0, 20}], x] (* Geoffrey Critzer, Mar 12 2011 *)
f[n_] := Sum[n! n^(n - k - 1)/(n - k)!, {k, n}]; Array[f, 18] (* Robert G. Wilson v *)
a[n_] := Exp[n]*Gamma[n, n]; Table[a[n] // FunctionExpand, {n, 1, 18}] (* Jean-François Alcover, May 13 2013, after Vladeta Jovovic *)
PROG
(PARI) a(n)=if(n<0, 0, n!*sum(k=1, n, n^(n-k-1)/(n-k)!))
(PARI) a(n)=(1/n)*sum(k=1, n, binomial(n, k)*(n-k)^(n-k)*k^k) \\ Paul D. Hanna, Jul 04 2013
(PARI) N=20; x='x+O('x^N); Vec(serlaplace(log(sum(k=0, N, (k*x)^k/k!)))) \\ Seiichi Manyama, May 27 2019
(Python)
from math import comb
def A001865(n): return ((sum(comb(n, k)*(n-k)**(n-k)*k**k for k in range(1, (n+1>>1)))<<1) + (0 if n&1 else comb(n, m:=n>>1)*m**n))//n + n**(n-1) # Chai Wah Wu, Apr 25-26 2023
CROSSREFS
a(n) = A000435(n) + n^(n-1). See also A063169.
Column k=1 of A060281.
KEYWORD
nonn,easy,nice
EXTENSIONS
More terms from James A. Sellers, May 23 2000
STATUS
approved
Total height of rooted trees with n labeled nodes.
(Formerly M2138 N0850)
+10
12
0, 2, 24, 312, 4720, 82800, 1662024, 37665152, 952401888, 26602156800, 813815035000, 27069937855488, 972940216546896, 37581134047987712, 1552687346633913000, 68331503866677657600, 3191386068123595166656, 157663539876436721860608
OFFSET
1,2
COMMENTS
a(n) is the total number of nonrecurrent elements mapped into a recurrent element in all functions f:{1,2,...,n}->{1,2,...,n}. a(n) = Sum_{k=1..n-1} A216971(n,k)*k. - Geoffrey Critzer, Jan 01 2013
a(n) is the sum of the lengths of all cycles over all functions f:{1,2,...,n}->{1,2,...,n}. Fixed points are taken to have length zero. a(n) = Sum_{k=2..n} A066324(n,k)*(k-1). - Geoffrey Critzer, Aug 19 2013
REFERENCES
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).
FORMULA
a(n) = n*A000435(n).
E.g.f: (LambertW(-x)/(1+LambertW(-x)))^2. - Vladeta Jovovic, Apr 10 2001
a(n) = Sum_{k=1..n-1} binomial(n, k)*(n-k)^(n-k)*k^k. - Benoit Cloitre, Mar 22 2003
a(n) ~ sqrt(Pi/2)*n^(n+1/2). - Vaclav Kotesovec, Aug 07 2013
a(n) = n! * Sum_{k=0..n-2} n^k/k!. - Jianing Song, Aug 08 2022
MAPLE
A001864 := proc(n) local k; add(n!*n^k/k!, k=0..n-2); end;
MATHEMATICA
Table[Sum[Binomial[n, k](n-k)^(n-k) k^k, {k, 1, n-1}], {n, 20}] (* Harvey P. Dale, Oct 10 2011 *)
a[n_] := n*(n-1)*Exp[n]*Gamma[n-1, n] // Round; Table[a[n], {n, 1, 18}] (* Jean-François Alcover, Jun 24 2013 *)
PROG
(PARI) a(n)=sum(k=1, n-1, binomial(n, k)*(n-k)^(n-k)*k^k)
(Python)
from math import comb
def A001864(n): return (sum(comb(n, k)*(n-k)**(n-k)*k**k for k in range(1, (n+1>>1)))<<1) + (0 if n&1 else comb(n, m:=n>>1)*m**n) # Chai Wah Wu, Apr 25-26 2023
CROSSREFS
KEYWORD
nonn,easy,nice
STATUS
approved
The exponential transform of sigma(n).
+10
12
1, 1, 4, 14, 69, 367, 2284, 15430, 115146, 924555, 7991892, 73547322, 718621516, 7410375897, 80405501540, 914492881330, 10873902417225, 134808633318271, 1738734267608613, 23282225008741565, 323082222240744379, 4638440974576329923, 68794595993688306903
OFFSET
0,3
COMMENTS
The exponential transform [EXP] transforms an input sequence b(n) into the output sequence a(n). The EXP transform is the inverse of the logarithmic transform [LOG], see the Weisstein link and the Sloane and Plouffe reference. This relation goes by the name of Riddell's formula. For information about the logarithmic transform see A274805. The EXP transform is related to the multinomial transform, see A274760 and the second formula.
The definition of the EXP transform, see the second formula, shows that n >= 1. To preserve the identity LOG[EXP[b(n)]] = b(n) for n >= 0 for a sequence b(n) with offset 0 the shifted sequence b(n-1) with offset 1 has to be used as input for the exponential transform, otherwise information about b(0) will be lost in transformation.
In the a(n) formulas, see the examples, the multinomial coefficients A178867 appear.
We observe that a(0) = 1 and provides no information about any value of b(n), this notwithstanding it is customary to start the a(n) sequence with a(0) = 1.
The Maple programs can be used to generate the exponential transform of a sequence. The first program uses a formula found by Alois P. Heinz, see A007446 and the first formula. The second program uses the definition of the exponential transform, see the Weisstein link and the second formula. The third program uses information about the inverse of the exponential transform, see A274805.
Some EXP transform pairs are, n >= 1: A000435(n) and A065440(n-1); 1/A000027(n) and A177208(n-1)/A177209(n-1); A000670(n) and A075729(n-1); A000670(n-1) and A014304(n-1); A000045(n) and A256180(n-1); A000290(n) and A033462(n-1); A006125(n) and A197505(n-1); A053549(n) and A198046(n-1); A000311(n) and A006351(n); A030019(n) and A134954(n-1); A038048(n) and A053529(n-1); A193356(n) and A003727(n-1).
REFERENCES
Frank Harary and Edgar M. Palmer, Graphical Enumeration, 1973.
Robert James Riddell, Contributions to the theory of condensation, Dissertation, University of Michigan, Ann Arbor, 1951.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, 1995, pp. 18-23.
LINKS
M. Bernstein and N. J. A. Sloane, Some Canonical Sequences of Integers, Linear Algebra and its Applications, Vol. 226-228 (1995), pp. 57-72. Erratum 320 (2000), 210. [Link to arXiv version]
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
N. J. A. Sloane, Transforms.
Eric W. Weisstein MathWorld, Exponential Transform.
FORMULA
a(n) = Sum_{j=1..n} (binomial(n-1,j-1) * b(j) * a(n-j)), n >= 1 and a(0) = 1, with b(n) = A000203(n) = sigma(n).
E.g.f. exp(Sum_{n >= 1}(b(n)*x^n/n!) with b(n) = sigma(n) = A000203(n).
EXAMPLE
Some a(n) formulas, see A178867:
a(0) = 1
a(1) = x(1)
a(2) = x(1)^2 + x(2)
a(3) = x(1)^3 + 3*x(1)*x(2) + x(3)
a(4) = x(1)^4 + 6*x(1)^2*x(2) + 4*x(1)*x(3) + 3*x(2)^2 + x(4)
a(5) = x(1)^5 + 10*x(1)^3*x(2) + 10*x(1)^2*x(3) + 15*x(1)*x(2)^2 + 5*x(1)*x(4) + 10*x(2)*x(3) + x(5)
MAPLE
nmax:=21: with(numtheory): b := proc(n): sigma(n) end: a:= proc(n) option remember; if n=0 then 1 else add(binomial(n-1, j-1) * b(j) *a(n-j), j=1..n) fi: end: seq(a(n), n=0..nmax); # End first EXP program.
nmax:= 21: with(numtheory): b := proc(n): sigma(n) end: t1 := exp(add(b(n)*x^n/n!, n=1..nmax+1)): t2 := series(t1, x, nmax+1): a := proc(n): n!*coeff(t2, x, n) end: seq(a(n), n=0..nmax); # End second EXP program.
nmax:=21: with(numtheory): b := proc(n): sigma(n) end: f := series(log(1+add(q(n)*x^n/n!, n=1..nmax+1)), x, nmax+1): d := proc(n): n!*coeff(f, x, n) end: a(0):=1: q(0):=1: a(1):=b(1): q(1):=b(1): for n from 2 to nmax+1 do q(n) := solve(d(n)-b(n), q(n)): a(n):=q(n): od: seq(a(n), n=0..nmax); # End third EXP program.
MATHEMATICA
a[0] = 1; a[n_] := a[n] = Sum[Binomial[n-1, j-1]*DivisorSigma[1, j]*a[n-j], {j, 1, n}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 22 2017 *)
nmax = 20; CoefficientList[Series[Exp[Sum[DivisorSigma[1, k]*x^k/k!, {k, 1, nmax}]], {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Jun 08 2021 *)
KEYWORD
nonn
AUTHOR
Johannes W. Meijer, Jul 27 2016
STATUS
approved
Normalized total height of rooted trees with n nodes.
(Formerly M3614 N1466)
+10
9
0, 1, 4, 26, 236, 2760, 39572, 672592, 13227804, 295579520, 7398318500, 205075286784, 6236796259916, 206489747516416, 7393749269685300, 284714599444490240, 11733037015160276348, 515240326393584058368, 24019843795708471562564, 1184776250223810469888000
OFFSET
1,3
COMMENTS
a(n) is the number of partial functions f from [n-1] into [n-1] such that f^k(1) is undefined for some k>=1. - Geoffrey Critzer, Mar 05 2022
REFERENCES
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).
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..385 (terms 1..100 from T. D. Noe)
H. Bergeron, E. M. F. Curado, J. P. Gazeau and L. M. C. S. Rodrigues, A note about combinatorial sequences and Incomplete Gamma function, arXiv preprint arXiv: 1309.6910 [math.CO], 2013.
J. Riordan and N. J. A. Sloane, Enumeration of rooted trees by total height, J. Austral. Math. Soc., vol. 10 pp. 278-282, 1969.
FORMULA
E.g.f.: -exp(1)*x*(Ei(-1-LambertW(-x))-Ei(-1)) - LambertW(-x) + log(1+LambertW(-x)). - Vladeta Jovovic, Sep 29 2003
a(n)*(n-1) = A000435(n). - M. F. Hasler, Dec 10 2018
E.g.f.: x*diff(A000169(x),x)^2. - Vladimir Kruchinin, Jun 07 2020
a(n) = (n-2)! * Sum_{k=0..n-2} n^k/k! for n > 1. - Jianing Song, Aug 08 2022
MAPLE
A001863 := n->add((n-2)!*n^k/k!, k=0..n-2); # for n>1. Equals A001864(n)/(n^2-n)
seq(simplify(GAMMA(n-1, n)*exp(n)), n=2..20); # Vladeta Jovovic, Jul 21 2005
MATHEMATICA
a[n_] := Sum[(n-2)!*n^k/k!, {k, 0, n-2}]; Table[a[n], {n, 1, 15}] (* Jean-François Alcover, Oct 09 2012, from Maple *)
Table[Sum[(n-2)! n^k/k!, {k, 0, n-2}], {n, 30}] (* Harvey P. Dale, Jun 19 2016 *)
PROG
(PARI) apply( A001863(n)=sum(k=0, n-2, (n-2)!/k!*n^k), [1..20]) \\ This defines the function A001863; apply(...) provides a check and illustration. - G. C. Greubel, Nov 14 2017, edited by M. F. Hasler, Dec 09 2018
(Magma) [0] cat [&+[Factorial(n-2)*n^k div Factorial(k): k in [0..n-2]]: n in [2..24]]; // Vincenzo Librandi, Dec 10 2018
(Python)
from math import comb
def A001863(n): return 0 if n<2 else ((sum(comb(n, k)*(n-k)**(n-k)*k**k for k in range(1, (n+1>>1)))<<1) + (0 if n&1 else comb(n, m:=n>>1)*m**n))//n//(n-1) # Chai Wah Wu, Apr 25-26 2023
CROSSREFS
KEYWORD
nonn,nice,easy
STATUS
approved
Triangle read by rows giving number of rooted labeled trees with n >= 2 nodes and height d >= 1.
+10
9
2, 3, 6, 4, 36, 24, 5, 200, 300, 120, 6, 1170, 3360, 2520, 720, 7, 7392, 38850, 43680, 22680, 5040, 8, 50568, 475776, 757680, 551040, 221760, 40320, 9, 372528, 6231960, 13747104, 12836880, 7136640, 2358720, 362880, 10, 2936070, 87530400, 264181680
OFFSET
2,1
LINKS
J. Riordan, Enumeration of trees by height and diameter, IBM J. Res. Dev. 4 (1960), 473-478. [broken link]
J. Riordan, Enumeration of trees by height and diameter, IBM J. Res. Dev. 4 (1960), 473-478.
J. Riordan, The enumeration of trees by height and diameter, IBM Journal 4 (1960), 473-478. (Annotated scanned copy)
FORMULA
Riordan reference gives recurrence.
EXAMPLE
2;
3, 6;
4, 36, 24;
5, 200, 300, 120;
6, 1170, 3360, 2520, 720;
7, 7392, 38850, 43680, 22680, 5040;
MAPLE
gf:= proc(k) gf(k):= `if`(k=0, x, x*exp(gf(k-1))) end:
A:= proc(n, k) A(n, k):= n!*coeff(series(gf(k), x, n+1), x, n) end:
T:= (n, d)-> A(n, d) -A(n, d-1):
seq(seq(T(n, d), d=1..n-1), n=2..12); # Alois P. Heinz, Sep 21 2012
MATHEMATICA
gf[k_] := gf[k] = If[k == 0, x, x*E^gf[k - 1]]; a[n_, k_] := n!*Coefficient[ Series[gf[k], {x, 0, n + 1}], x, n]; t[n_, d_] := a[n, d] - a[n, d - 1]; Table[t[n, d], {n, 2, 12}, {d, 1, n - 1}] // Flatten (* Jean-François Alcover, Jan 15 2013, translated from Alois P. Heinz's Maple program *)
CROSSREFS
KEYWORD
nonn,tabl,easy,nice
EXTENSIONS
More terms from Pab Ter (pabrlos(AT)yahoo.com), May 27 2004
STATUS
approved
Total height of all rooted trees on n labeled nodes.
(Formerly M2081 N0822)
+10
8
0, 2, 15, 148, 1785, 26106, 449701, 8927192, 200847681, 5053782070, 140679853941, 4293235236324, 142553671807729, 5116962926162738, 197459475792232725, 8152354312656732976, 358585728464893234305, 16741214317684425260142, 826842457727306803110997, 43073414675338753123113980
OFFSET
1,2
COMMENTS
Take any one of the n^(n-1) rooted trees on n labeled nodes, compute its height (maximal edge distance to root), sum over all trees.
Theorem [Renyi-Szekeres, (4,7)]. The average height if the tree is chosen at random is sqrt(2*n*Pi). - David desJardins, Jan 20 2017
REFERENCES
Rényi, A., and G. Szekeres. "On the height of trees." Journal of the Australian Mathematical Society 7.04 (1967): 497-507. See (4.7).
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).
LINKS
J. Riordan, Enumeration of trees by height and diameter, IBM J. Res. Dev. 4 (1960), 473-478.
J. Riordan, The enumeration of trees by height and diameter, IBM Journal 4 (1960), 473-478. (Annotated scanned copy)
FORMULA
a(n) = Sum_{k=1..n-1} A034855(n,k)*k. - Geoffrey Critzer, Mar 14 2013
A000435(n)/a(n) ~ 1/2 (see A000435 and the Renyi-Szekeres result mentioned in the Comments). - David desJardins, Jan 20 2017
MATHEMATICA
nn=20; a=NestList[ x Exp[#]&, x, nn]; f[list_]:=Sum[list[[i]]*i, {i, 1, Length[list]}]; Drop[Map[f, Transpose[Table[Range[0, nn]!CoefficientList[Series[a[[i+1]]-a[[i]], {x, 0, nn}], x], {i, 1, nn-1}]]], 1] (* Geoffrey Critzer, Mar 14 2013 *)
CROSSREFS
Also A234953(n) = a(n)/n.
KEYWORD
nonn
EXTENSIONS
More terms from Geoffrey Critzer, Mar 14 2013
STATUS
approved
a(n) = n!*Sum_{k=1..n} (-1)^(k+1)*n^(n-k-1)/(n-k)!.
+10
8
0, 1, 1, 5, 34, 329, 4056, 60997, 1082320, 22137201, 512801920, 13269953861, 379400765184, 11877265764025, 404067857880064, 14843708906336325, 585606019079612416, 24693567694861202273, 1108343071153648926720, 52757597474618636748421, 2654611611461360017408000
OFFSET
0,4
LINKS
FORMULA
E.g.f.: log(1-LambertW(-x)).
a(n) ~ n^(n-1)/2. - Vaclav Kotesovec, Sep 25 2013
Conjecture: a(n) = (n-1)!*( Sum_{k >= 0} (-1)^k * n^(n+k)/(n+k)! - (-1/e)^n ) for n >= 1. Cf. A000435. - Peter Bala, Jul 23 2021
From Thomas Scheuerle, Nov 17 2023: (Start)
This conjecture is true. Let "gamma" be the lower incomplete gamma function: gamma(n, x) = (n-1)! (1 - exp(-x)*Sum_{k = 0..n-1} x^k/k! ), then we can get the upper incomplete gamma function Gamma(n, x) = gamma(n, oo) - gamma(n, x). By inserting according the formula below, we will obtain the formula from Peter Bala.
a(n) = (-1)^(n+1)*Gamma(n, -n)/exp(n) = (-1)^(n+1)*A292977(n-1, n), for n > 0, where Gamma is the upper incomplete gamma function. (End)
MATHEMATICA
Table[n!*Sum[(-1)^(k+1)*n^(n-k-1)/(n-k)!, {k, n}], {n, 0, 25}] (* Stefan Steinerberger, Oct 19 2007 *)
With[{m=25}, CoefficientList[Series[Log[1-LambertW[-x]], {x, 0, m}], x]*Range[0, m]!] (* G. C. Greubel, Aug 02 2019 *)
PROG
(PARI) my(x='x+O('x^25)); concat([0], Vec(serlaplace( log(1-lambertw(-x)) ))) \\ G. C. Greubel, Aug 02 2019
(Magma)
a:= func< n | n eq 0 select 0 else Factorial(n)*(&+[(-1)^(k+1)*n^(n-k-1)/Factorial(n-k): k in [1..n]]) >;
[a(n): n in [0..25]]; // G. C. Greubel, Aug 02 2019
(SageMath)
def a(n):
if (n==0): return 0
else: return factorial(n)*sum((-1)^(k+1)*n^(n-k-1)/factorial(n-k) for k in (1..n))
[a(n) for n in (0..25)] # G. C. Greubel, Aug 02 2019
(GAP)
a:= function(n)
if n=0 then return 0;
else return Factorial(n)*Sum([1..n], k-> (-1)^(k+1)*n^(n-k-1)/Factorial(n-k));
fi;
end;
List([0..25], n-> a(n) ); # G. C. Greubel, Aug 02 2019
CROSSREFS
Cf. A001865 (Gamma(n, n)/exp(-n)).
KEYWORD
nonn,easy
AUTHOR
Vladeta Jovovic, Oct 17 2007
EXTENSIONS
More terms from Stefan Steinerberger, Oct 19 2007
STATUS
approved
Normalized total height of all rooted trees on n labeled nodes.
+10
7
0, 1, 5, 37, 357, 4351, 64243, 1115899, 22316409, 505378207, 12789077631, 357769603027, 10965667062133, 365497351868767, 13163965052815515, 509522144541045811, 21093278144993719665, 930067462093579181119, 43518024090910884374263, 2153670733766937656155699
OFFSET
1,3
COMMENTS
Equals A001854(n)/n. That is, similar to A001854, except here the root always has the fixed label 1.
This was in one of my thesis notebooks from 1964 (see the scans in A000435), but because it wasn't of central importance it was never added to the OEIS.
LINKS
FORMULA
a(n) = Sum_{k=1..n-1} k*A034855(n,k)/n = Sum_{k=1..n-1} k*A235595(n,k).
MATHEMATICA
gf[k_] := gf[k] = If[k == 0, x, x*E^gf[k-1]]; a[n_, k_] := n!*Coefficient[Series[gf[k], {x, 0, n+1}], x, n]; a[n_] := Sum[k*(a[n, k] - a[n, k-1]), {k, 1, n-1}]/n; Array[a, 20] (* Jean-François Alcover, Mar 18 2014, after Alois P. Heinz *)
PROG
(Python)
from sympy import binomial
from sympy.core.cache import cacheit
@cacheit
def b(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*j*b(j - 1, h - 1)*b(n - j, h) for j in range(1, n + 1)])
def T(n, k): return b(n - 1, k - 1) - b(n - 1, k - 2)
def a(n): return sum([k*T(n, k) for k in range(1, n)])
print([a(n) for n in range(1, 31)]) # Indranil Ghosh, Aug 26 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 14 2014
STATUS
approved
Triangle read by rows: T(n, k) = binomial(n, k - 1)*(k - 1)^(k - 1)*(n - k)*(n - k + 1)^(n - k).
+10
6
0, 0, 0, 0, 2, 0, 0, 18, 6, 0, 0, 192, 72, 48, 0, 0, 2500, 960, 720, 540, 0, 0, 38880, 15000, 11520, 9720, 7680, 0, 0, 705894, 272160, 210000, 181440, 161280, 131250, 0, 0, 14680064, 5647152, 4354560, 3780000, 3440640, 3150000, 2612736, 0
OFFSET
0,5
COMMENTS
A motivation for this triangle was to provide an alternative sum representation for A001864(n) = n! * Sum_{k=0..n-2} n^k/k!. See formula 3 and formula 15 in Riordan and Sloane.
LINKS
John Riordan and N. J. A. Sloane, Enumeration of rooted trees by total height, J. Austral. Math. Soc., vol. 10 pp. 278-282, 1969.
EXAMPLE
Triangle starts:
[0] [0]
[1] [0, 0]
[2] [0, 2, 0]
[3] [0, 18, 6, 0]
[4] [0, 192, 72, 48, 0]
[5] [0, 2500, 960, 720, 540, 0]
[6] [0, 38880, 15000, 11520, 9720, 7680, 0]
[7] [0, 705894, 272160, 210000, 181440, 161280, 131250, 0]
[8] [0, 14680064, 5647152, 4354560, 3780000, 3440640, 3150000, 2612736, 0]
MATHEMATICA
A368849[n_, k_] := Binomial[n, k-1] If[k == 1, 1, (k-1)^(k-1)] (n-k) (n-k+1)^(n-k);
Table[A368849[n, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Jan 13 2024 *)
PROG
(SageMath)
def T(n, k):
return binomial(n, k - 1)*(k - 1)^(k - 1)*(n - k)*(n - k + 1)^(n - k)
for n in range(0, 9): print([n], [T(n, k) for k in range(n + 1)])
CROSSREFS
T(n, 1) = A066274(n) for n >= 1.
T(n, 1)/(n - 1) = A000169(n) for n >= 2.
T(n, n - 1) = 2*A081133(n) for n >= 1.
Sum_{k=0..n} T(n, k) = A001864(n).
(Sum_{k=0..n} T(n, k)) / n = A000435(n) for n >= 1.
(Sum_{k=0..n} T(n, k)) * n / 2 = A262973(n) for n >= 1.
(Sum_{k=2..n} T(n, k)) / (2*n) = A057500(n) for n >= 1.
T(n, 1)/(n - 1) + (Sum_{k=2..n} T(n, k)) / (2*n) = A368951(n) for n >= 2.
Sum_{k=0..n} (-1)^(k-1) * T(n, k) = A368981(n).
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Jan 11 2024
STATUS
approved
Triangle read by rows: the triangle in A034855, with the n-th row normalized by dividing it by n.
+10
5
1, 1, 2, 1, 9, 6, 1, 40, 60, 24, 1, 195, 560, 420, 120, 1, 1056, 5550, 6240, 3240, 720, 1, 6321, 59472, 94710, 68880, 27720, 5040, 1, 41392, 692440, 1527456, 1426320, 792960, 262080, 40320, 1, 293607, 8753040, 26418168, 30560544, 21213360, 9676800, 2721600, 362880, 1, 2237920, 119723130, 490458240, 691331760, 570810240, 323114400, 125798400, 30844800, 3628800
OFFSET
2,3
COMMENTS
T(n,k) is the number of forests of labeled rooted trees with n nodes and height k Cf. A210725. Equivalently, T(n,k) is the number of nilpotent partial functions on [n] with index k+1. - Geoffrey Critzer, Nov 26 2021
LINKS
FORMULA
A234953(n) = Sum_{k=1..n} k*T(n,k).
EXAMPLE
Triangle begins:
1.
1, 2,
1, 9, 6,
1, 40, 60, 24,
1, 195, 560, 420, 120,
1, 1056, 5550, 6240, 3240, 720,
1, 6321, 59472, 94710, 68880, 27720, 5040,
1, 41392, 692440, 1527456,1426320, 792960, 262080, 40320,
1, 293607, 8753040, 26418168, 30560544, 21213360, 9676800, 2721600, 362880,
...
MAPLE
b:= proc(n, h) option remember; `if`(min(n, h)=0, 1, add(
binomial(n-1, j-1)*j*b(j-1, h-1)*b(n-j, h), j=1..n))
end:
T:= (n, k)-> b(n-1, k-1)-b(n-1, k-2):
seq(seq(T(n, d), d=1..n-1), n=2..12); # Alois P. Heinz, Aug 21 2017
MATHEMATICA
gf[k_] := gf[k] = If[k == 0, x, x*E^gf[k-1]]; a[n_, k_] := n!*Coefficient[Series[gf[k], {x, 0, n+1}], x, n]; t[n_, k_] := (a[n, k] - a[n, k-1])/n; Table[t[n, k], {n, 2, 11}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Mar 18 2014, after Alois P. Heinz *)
PROG
(Python)
from sympy import binomial
from sympy.core.cache import cacheit
@cacheit
def b(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*j*b(j - 1, h - 1)*b(n - j, h) for j in range(1, n + 1)])
def T(n, k): return b(n - 1, k - 1) - b(n - 1, k - 2)
for n in range(2, 13): print([T(n, d) for d in range(1, n)]) # Indranil Ghosh, Aug 26 2017, after Maple code
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Jan 14 2014
STATUS
approved

Search completed in 0.023 seconds