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 A052512 #49 Sep 08 2022 08:44:59 %S A052512 0,1,2,9,40,205,1176,7399,50576,372537,2936080,24617131,218521128, %T A052512 2045278261,20112821288,207162957135,2228888801056,24989309310961, %U A052512 291322555295904,3524580202643155,44176839081266360,572725044269255661,7668896804574138232,105920137923940473079 %N A052512 Number of rooted labeled trees of height at most 2. %C A052512 Equivalently, number of mappings f from a set of n elements into itself such that f o f (f applied twice) is constant. - _Robert FERREOL_, Mar 05 2016 %H A052512 Alois P. Heinz, <a href="/A052512/b052512.txt">Table of n, a(n) for n = 0..300</a> %H A052512 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=58">Encyclopedia of Combinatorial Structures 58</a> %F A052512 E.g.f.: x*exp(x*exp(x)). %F A052512 a(n) = n * A000248(n-1). - _Olivier Gérard_, Aug 03 2012. %F A052512 a(n) = Sum_{k=0..n-1} n*C(n-1,k)*(n-k-1)^k. - _Alois P. Heinz_, Mar 15 2013 %e A052512 From _Robert FERREOL_, Mar 05 2016: (Start) %e A052512 For n = 3 the a(3) = 9 mappings from {a,b,c} into itself are: %e A052512 f_1(a) = f_1(b) = f_1(c) = a %e A052512 f_2(c) = b, f_2(b) = f_2(a) = a %e A052512 f_3(b) = c, f_3(c) = f_3(a) = a %e A052512 and 6 others, associated to b and c. %e A052512 (End) %p A052512 spec := [S,{S=Prod(Z,Set(T1)), T2=Z, T1=Prod(Z,Set(T2))},labeled]: seq(combstruct[count](spec,size=n), n=0..20); %p A052512 # second Maple program: %p A052512 a:= n-> n*add(binomial(n-1, k)*(n-k-1)^k, k=0..n-1); %p A052512 seq(a(n), n=0..30); # _Alois P. Heinz_, Mar 15 2013 %t A052512 nn=20; a=x Exp[x]; Range[0,nn]! CoefficientList[Series[x Exp[a], {x,0,nn}], x] (* _Geoffrey Critzer_, Sep 19 2012 *) %o A052512 (PARI) %o A052512 N=33; x='x+O('x^N); %o A052512 egf=x*exp(x*exp(x)); %o A052512 v=Vec(serlaplace(egf)); %o A052512 vector(#v+1,n,if(n==1,0,v[n-1])) %o A052512 /* _Joerg Arndt_, Sep 15 2012 */ %o A052512 (Magma) m:=25; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( x*Exp(x*Exp(x)) )); [0] cat [Factorial(n)*b[n]: n in [1..m-1]]; // _G. C. Greubel_, May 13 2019 %o A052512 (Sage) m = 20; T = taylor(x*exp(x*exp(x)), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # _G. C. Greubel_, May 13 2019 %Y A052512 Cf. A000248 (forests with n nodes and height at most 1). %Y A052512 Cf. A000551. %K A052512 easy,nonn %O A052512 0,3 %A A052512 encyclopedia(AT)pommard.inria.fr, Jan 25 2000