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.

A286076 Number of permutations of [n] with alternating cycle size parities.

This page as a plain text file.
%I A286076 #7 May 28 2018 09:42:09
%S A286076 1,1,1,5,8,78,206,2722,10516,169544,883580,16569420,110272040,
%T A286076 2339828920,19127099680,450962267600,4399562960000,113769961266000,
%U A286076 1295735797694000,36390357922438000,475484093140888000,14390912055770276000,212715123602601932000
%N A286076 Number of permutations of [n] with alternating cycle size parities.
%C A286076 Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.
%H A286076 Alois P. Heinz, <a href="/A286076/b286076.txt">Table of n, a(n) for n = 0..450</a>
%H A286076 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation">Permutation</a>
%e A286076 a(3) = 5: (123), (132), (12)(3), (13)(2), (1)(23).
%e A286076 a(4) = 8: (1234), (1243), (1324), (1342), (1423), (1432), (1)(23)(4), (1)(24)(3).
%p A286076 b:= proc(n, t) option remember; `if`(n=0, 1, add(`if`((i+t)::odd,
%p A286076       b(n-i, 1-t)*(i-1)!*binomial(n-1, i-1), 0), i=1..n))
%p A286076     end:
%p A286076 a:= n-> `if`(n=0, 1, b(n, 0)+b(n, 1)):
%p A286076 seq(a(n), n=0..30);
%t A286076 b[n_, t_] := b[n, t] = If[n == 0, 1, Sum[If[(i + t) // OddQ, b[n - i, 1 - t]*(i - 1)!*Binomial[n - 1, i - 1], 0], {i, 1, n}]];
%t A286076 a[n_] := If[n == 0, 1, b[n, 0] + b[n, 1]];
%t A286076 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, May 28 2018, from Maple *)
%Y A286076 Cf. A275679, A286071, A286072, A286073, A286074, A286075, A286077.
%K A286076 nonn
%O A286076 0,4
%A A286076 _Alois P. Heinz_, May 01 2017