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.

A202364 Number of n-permutations with at least one cycle of length >=4.

This page as a plain text file.
%I A202364 #23 Feb 08 2017 04:33:32
%S A202364 0,0,0,0,6,54,444,3828,34404,331812,3457224,38902104,472682088,
%T A202364 6185876904,86896701072,1305666612144,20907918062064,355572850545648,
%U A202364 6401460197543904,121637573726005152,2432837939316094944,51090380436082401504,1123995659389121919168
%N A202364 Number of n-permutations with at least one cycle of length >=4.
%C A202364 a(n) = n! - A057693(n). - _Vaclav Kotesovec_, Oct 09 2013
%D A202364 R. Sedgewick and P. Flajolet, Analysis of Algorithms, Addison Wesley, 1996, page 358.
%H A202364 Alois P. Heinz, <a href="/A202364/b202364.txt">Table of n, a(n) for n = 0..200</a>
%F A202364 E.g.f.: 1/(1-x) - exp(x + x^2/2 + x^3/3).
%p A202364 b:= proc(n) option remember; `if`(n<4, [6, 54, 444, 3828][n+1],
%p A202364       ((5*n+3+n^2)*b(n-1) -(n+3)*b(n-2) -(n+3)*(n+2)*b(n-3)
%p A202364       -(n+3)*(n+2)*(n+1)^2*b(n-4))/n)
%p A202364     end:
%p A202364 a:= n-> `if`(n<4, 0, b(n-4)):
%p A202364 seq(a(n), n=0..30);  # _Alois P. Heinz_, Jan 09 2013
%t A202364 nn=25;Range[0,nn]!CoefficientList[Series[1/(1-x)-Exp[x+x^2/2+x^3/3],{x,0,nn}],x]
%t A202364 (* Second program: *)
%t A202364 b[n_] := b[n] = If[n<4, {6, 54, 444, 3828}[[n+1]], ((5*n+3+n^2)*b[n-1] - (n + 3)*b[n-2] - (n+3)*(n+2)*b[n-3] - (n+3)*(n+2)*(n+1)^2*b[n-4])/n]; a[n_] := If[n<4, 0, b[n-4]]; Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Feb 08 2017, after _Alois P. Heinz_ *)
%Y A202364 Cf. A000142, A033312, A066052, A028418.
%K A202364 nonn
%O A202364 0,5
%A A202364 _Geoffrey Critzer_, Jan 09 2013