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.
%I A152170 #26 Sep 08 2022 08:45:39 %S A152170 0,1,6,57,700,10505,186186,3805249,88099320,2278824849,65132155990, %T A152170 2038428376721,69332064858420,2546464715771353,100444826158022178, %U A152170 4234886922345707265,190053371487946575856,9045570064018726951457,455099825218118626519470 %N A152170 a(n) is the total size of all the image sets of all functions from [n] to [n]. I.e., a(n) is the sum of the cardinalities of every image set of every function whose domain and co-domain is {1,2,...,n}. %C A152170 a(n)/n^n is the expected value for the cardinality of the image set of a function that takes [n] to [n]. %C A152170 a(n)/n^(n+1) is the probability that any particular element of [n] will be in the range of a function f : [n] to [n]. %F A152170 a(n) = n*(n^n - (n-1)^n). %F A152170 a(n) = Sum_{i=1..n} S(n,i)*i!*binomial(n,i)*i where S(n,i) is the Stirling number of the second kind. %F A152170 a(n) = Sum_{k=1..n} A090657(n,k)*k. %F A152170 Limit_{n->infinity} a(n)/n^(n+1) = (e-1)/e. - _Thomas Dybdahl Ahle_, Apr 24 2011 %e A152170 a(2) = 6 because the image sets of the functions from [2] to [2] are {1},{2},{1,2},{1,2}. %t A152170 Table[Sum[StirlingS2[n, i] i! Binomial[n, i] i, {i, 1, n}], {n, 0, 20}] (* _Geoffrey Critzer_, Mar 17 2009 *) %o A152170 (Magma) [n*(n^n-(n-1)^n): n in [0..20]]; // _Vincenzo Librandi_, Jul 23 2017 %K A152170 nonn %O A152170 0,3 %A A152170 _Geoffrey Critzer_, Nov 27 2008 %E A152170 More terms from _Geoffrey Critzer_, Mar 17 2009