cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A060226 a(n) = n^n - n*(n-1)^(n-1).

This page as a plain text file.
%I A060226 #27 Nov 04 2024 01:43:20
%S A060226 1,0,2,15,148,1845,27906,496951,10188872,236425545,6125795110,
%T A060226 175311670611,5492360400924,186965800764925,6871755333266474,
%U A060226 271213787997489135,11440441827615801616,513645612633274386705
%N A060226 a(n) = n^n - n*(n-1)^(n-1).
%C A060226 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 A060226 Harry J. Smith, <a href="/A060226/b060226.txt">Table of n, a(n) for n = 0..100</a>
%H A060226 D. Callan, <a href="http://www.stat.wisc.edu/~callan/problems/tree_bijection.pdf">A Bijection between Marked Trees</a>
%H A060226 Leonard Smiley, <a href="https://www.jstor.org/stable/2589443">Problem 10781</a>, Amer. Math. Monthly, 107, Feb. 2000, p. 176.
%F A060226 a(n) = n*A055869(n-1).
%F A060226 Limit_{n -> oo} ( a(n)/a(n-1) - a(n-1)/a(n-2) ) -> e.
%F A060226 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 A060226 f := n-> n*sum(binomial(n-1,j-1)*(n-1)^(n-j), j=2..n);
%p A060226 g := n-> n^n -n*(n-1)^(n-1);
%p A060226 h := n-> sum(binomial(n,j)*j^(j-1)*(n-j)^(n-j), j=2..n);
%p A060226 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)
%t A060226 Join[{1,0},Table[n^n-n*(n-1)^(n-1),{n,2,20}]] (* _Harvey P. Dale_, Nov 16 2012 *)
%o A060226 (PARI) { for (n=0, 100, write("b060226.txt", n, " ", n^n - n*(n - 1)^(n - 1)); ) } \\ _Harry J. Smith_, Jul 03 2009
%o A060226 (Haskell)
%o A060226 a060226 0 = 1
%o A060226 a060226 n = a000312 n - n * a000312 (n - 1)
%o A060226 -- _Reinhard Zumkeller_, Aug 27 2012
%o A060226 (Magma)
%o A060226 A060226:= func< n | n^n - n*(n-1)^(n-1) >;
%o A060226 [A060226(n): n in [0..30]]; // _G. C. Greubel_, Nov 03 2024
%o A060226 (SageMath)
%o A060226 def A060226(n): return n^n - n*(n-1)^(n-1)
%o A060226 [A060226(n) for n in range(31)] # _G. C. Greubel_, Nov 03 2024
%Y A060226 Cf. A000312, A045531, A055869.
%K A060226 nonn
%O A060226 0,3
%A A060226 _Henry Bottomley_, Jul 12 2001