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.

A246189 Number of endofunctions on [n] where the smallest cycle length equals 2.

This page as a plain text file.
%I A246189 #14 Dec 28 2020 09:52:31
%S A246189 1,6,51,580,8265,141246,2810437,63748728,1622579985,45775778950,
%T A246189 1417347491241,47776074289164,1741386177576409,68238497945688630,
%U A246189 2860625245955274225,127736893134458097136,6052712065187733972513,303322427195785592735502,16028016368907840953165425
%N A246189 Number of endofunctions on [n] where the smallest cycle length equals 2.
%H A246189 Alois P. Heinz, <a href="/A246189/b246189.txt">Table of n, a(n) for n = 2..200</a>
%F A246189 a(n) ~ (exp(-1) - exp(-3/2)) * n^n. - _Vaclav Kotesovec_, Aug 21 2014
%p A246189 with(combinat):
%p A246189 b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>n, 0,
%p A246189       add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
%p A246189       b(n-i*j, i+1), j=0..n/i)))
%p A246189     end:
%p A246189 A:= (n, k)-> add(binomial(n-1, j-1)*n^(n-j)*b(j, k), j=0..n):
%p A246189 a:= n-> A(n, 2) -A(n, 3):
%p A246189 seq(a(n), n=2..25);
%t A246189 multinomial[n_, k_List] := n!/Times @@ (k!);
%t A246189 b[n_, i_] := b[n, i] = If[n==0, 1, If[i>n, 0, Sum[(i - 1)!^j multinomial[ n, Join[{n - i*j}, Table[i, {j}]]]/j! b[n - i*j, i + 1], {j, 0, n/i}]]];
%t A246189 A[n_, k_] := Sum[Binomial[n - 1, j - 1] n^(n - j) b[j, k], {j, 0, n}];
%t A246189 a[n_] := A[n, 2] - A[n, 3];
%t A246189 a /@ Range[2, 25] (* _Jean-François Alcover_, Dec 28 2020, after _Alois P. Heinz_ *)
%Y A246189 Column k=2 of A246049.
%K A246189 nonn
%O A246189 2,2
%A A246189 _Alois P. Heinz_, Aug 18 2014