A060226 a(n) = n^n - n*(n-1)^(n-1).
1, 0, 2, 15, 148, 1845, 27906, 496951, 10188872, 236425545, 6125795110, 175311670611, 5492360400924, 186965800764925, 6871755333266474, 271213787997489135, 11440441827615801616, 513645612633274386705
Offset: 0
Keywords
Links
- Harry J. Smith, Table of n, a(n) for n = 0..100
- D. Callan, A Bijection between Marked Trees
- Leonard Smiley, Problem 10781, Amer. Math. Monthly, 107, Feb. 2000, p. 176.
Programs
-
Haskell
a060226 0 = 1 a060226 n = a000312 n - n * a000312 (n - 1) -- Reinhard Zumkeller, Aug 27 2012
-
Magma
A060226:= func< n | n^n - n*(n-1)^(n-1) >; [A060226(n): n in [0..30]]; // G. C. Greubel, Nov 03 2024
-
Maple
f := n-> n*sum(binomial(n-1,j-1)*(n-1)^(n-j), j=2..n); g := n-> n^n -n*(n-1)^(n-1); h := n-> sum(binomial(n,j)*j^(j-1)*(n-j)^(n-j), j=2..n); k := n-> sum(binomial(n,j-1)*(j-1)^(j-1)*(n-j)^(n-j), j=2..n); # then a(n)=f(n)=g(n)=h(n)=k(n)
-
Mathematica
Join[{1,0},Table[n^n-n*(n-1)^(n-1),{n,2,20}]] (* Harvey P. Dale, Nov 16 2012 *)
-
PARI
{ for (n=0, 100, write("b060226.txt", n, " ", n^n - n*(n - 1)^(n - 1)); ) } \\ Harry J. Smith, Jul 03 2009
-
SageMath
def A060226(n): return n^n - n*(n-1)^(n-1) [A060226(n) for n in range(31)] # G. C. Greubel, Nov 03 2024
Formula
a(n) = n*A055869(n-1).
Limit_{n -> oo} ( a(n)/a(n-1) - a(n-1)/a(n-2) ) -> e.
E.g.f.: (1-x)/(1-T), where T=T(x) is Euler's tree function (see A000169). The e.g.f. for n > 0 terms only (applicable to endofunctions) is (T - x)/(1 - T). - Len Smiley, Dec 10 2001
Comments