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.

A131622 Number of cycles in all permutations of n elements with distinct cycle lengths.

This page as a plain text file.
%I A131622 #17 May 22 2020 12:20:08
%S A131622 1,1,8,22,124,948,6138,50832,468144,5165280,54704880,695854080,
%T A131622 9016051680,130427750880,1994479744320,32575206343680,555499414471680,
%U A131622 10284817657927680,196642556903116800,3994718386866278400,84989047758544742400,1895851170953432985600
%N A131622 Number of cycles in all permutations of n elements with distinct cycle lengths.
%H A131622 Alois P. Heinz, <a href="/A131622/b131622.txt">Table of n, a(n) for n = 1..450</a>
%F A131622 E.g.f.: Sum(x^n/(n+x^n), n=1..inf) * Product(1+x^n/n, n=1..inf).
%p A131622 A131622 := proc(n) local su,i ; su := add(x^i/(i+x^i),i=1..n+1) ; for i from 1 to n do su := taylor(su*(1+x^i/i),x=0,n+1) ; od: n!*coeftayl(su,x=0,n) ; end: seq(A131622(n),n=1..30) ; # _R. J. Mathar_, Oct 25 2007
%p A131622 # second Maple program:
%p A131622 b:= proc(n, i) option remember; `if`(n=0, [1, 0],
%p A131622       `if`(i<1, 0, `if`(i>n, 0, (p->[0, p[1]]+p)(
%p A131622        b(n-i, i-1)*binomial(n, i)*(i-1)!))+b(n, i-1)))
%p A131622     end:
%p A131622 a:= n-> b(n$2)[2]:
%p A131622 seq(a(n), n=1..30);  # _Alois P. Heinz_, May 14 2016
%t A131622 b[n_, i_] := b[n, i] = If[n == 0, {1, 0}, If[i < 1, {0, 0}, If[i > n, {0, 0}, Function[p, {0, p[[1]]} + p][b[n-i, i-1] Binomial[n, i] (i-1)!]] + b[n, i-1]]];
%t A131622 a[n_] := b[n, n][[2]];
%t A131622 Array[a, 30] (* _Jean-François Alcover_, May 22 2020, after _Alois P. Heinz_ *)
%t A131622 nmax = 30; Rest[CoefficientList[Series[Sum[x^k/(k + x^k), {k, 1, nmax}] * Product[1 + x^k/k, {k, 1, nmax}], {x, 0, nmax}], x] * Range[0, nmax]!] (* _Vaclav Kotesovec_, May 22 2020 *)
%Y A131622 Cf. A000254, A007838.
%K A131622 easy,nonn
%O A131622 1,3
%A A131622 _Vladeta Jovovic_, Sep 02 2007
%E A131622 More terms from _R. J. Mathar_, Oct 25 2007