login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060226 a(n) = n^n - n*(n-1)^(n-1). 4

%I #23 Jul 11 2018 15:36:19

%S 1,0,2,15,148,1845,27906,496951,10188872,236425545,6125795110,

%T 175311670611,5492360400924,186965800764925,6871755333266474,

%U 271213787997489135,11440441827615801616,513645612633274386705

%N a(n) = n^n - n*(n-1)^(n-1).

%C For n > 0, a(n)= number of endofunctions of [n] mapping some x<>1 to 1. - _Len Smiley_, Nov 15 2001 (Endofunction interpretation from a(n) = n*(n^(n-1) - (n-1)^(n-1)).)

%H Harry J. Smith, <a href="/A060226/b060226.txt">Table of n, a(n) for n = 0..100</a>

%H D. Callan, <a href="http://www.stat.wisc.edu/~callan/problems/tree_bijection.pdf">A Bijection between Marked Trees</a>

%H Leonard Smiley, <a href="https://www.jstor.org/stable/2589443">Problem 10781</a>, Amer. Math. Monthly, 107, Feb. 2000, p. 176.

%F a(n) = n*A055869(n-1). As n increases, a(n)/a(n-1) - a(n-1)/a(n-2) tends towards e.

%F 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

%p 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)=k(n)

%t Join[{1,0},Table[n^n-n*(n-1)^(n-1),{n,2,20}]] (* _Harvey P. Dale_, Nov 16 2012 *)

%o (PARI) { for (n=0, 100, write("b060226.txt", n, " ", n^n - n*(n - 1)^(n - 1)); ) } \\ _Harry J. Smith_, Jul 03 2009

%o (Haskell)

%o a060226 0 = 1

%o a060226 n = a000312 n - n * a000312 (n - 1)

%o -- _Reinhard Zumkeller_, Aug 27 2012

%Y Cf. A000312, A045531, A055869.

%K nonn

%O 0,3

%A _Henry Bottomley_, Jul 12 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)