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.

A317111 Number of permutations of [n] in which the length of every increasing run is 0 or 1 (mod 4).

This page as a plain text file.
%I A317111 #26 Jan 22 2024 16:07:02
%S A317111 1,1,1,1,2,10,50,210,840,4200,29400,231000,1755600,13213200,109309200,
%T A317111 1051050000,11099088000,120071952000,1320791472000,15317750448000,
%U A317111 192286654560000,2577944809440000,35885904294240000,513695427204960000,7641940962015360000
%N A317111 Number of permutations of [n] in which the length of every increasing run is 0 or 1 (mod 4).
%C A317111 Similarly, 1/(1 - x + x^2/2! - ... - x^(2m-1)/(2m-1)!) is the e.g.f. for permutations in which every increasing run has length 0 or 1 (mod 2m).
%H A317111 G. C. Greubel, <a href="/A317111/b317111.txt">Table of n, a(n) for n = 0..485</a>
%H A317111 David Galvin, John Engbers, and Clifford Smyth, <a href="https://arxiv.org/abs/2303.14057">Reciprocals of thinned exponential series</a>, arXiv:2303.14057 [math.CO], 2023.
%H A317111 Ira M. Gessel, <a href="https://arxiv.org/abs/1807.09290">Reciprocals of exponential polynomials and permutation enumeration</a>, arXiv:1807.09290 [math.CO], 2018.
%F A317111 E.g.f.: 1/(1 - x + x^2/2! - x^3/3!).
%F A317111 a(0) = a(1) = a(2) = 1; a(n) = n * a(n-1) - n * (n-1) * a(n-2) / 2 + n * (n-1) * (n-2) * a(n-3) / 6 for n > 2. - _Ilya Gutkovskiy_, Jan 22 2024
%e A317111 For n=4 the a(4)=2 permutations are 4321 and 1234.
%p A317111 gser:=series(1/(1-x+x^2/2!-x^3/3!), x, 21): seq(n!*coeff(gser,x,n), n=0..20);
%t A317111 With[{nmax = 25}, CoefficientList[Series[1/(1 -x +x^2/2! -x^3/3!), {x, 0, nmax}], x]*Range[0, nmax]!] (* _G. C. Greubel_, Nov 30 2018 *)
%o A317111 (PARI) my(x='x+O('x^25)); Vec(serlaplace(1/(1 -x +x^2/2 -x^3/6))) \\ _G. C. Greubel_, Nov 30 2018
%o A317111 (Magma) m:=25; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( 1/(1-x+x^2/2-x^3/6) )); [Factorial(n-1)*b[n]: n in [1..m]]; // _G. C. Greubel_, Nov 30 2018
%o A317111 (Sage)
%o A317111 f= 1/(1 -x +x^2/2 -x^3/6)
%o A317111 g=f.taylor(x,0,13)
%o A317111 L=g.coefficients()
%o A317111 coeffs={c[1]:c[0]*factorial(c[1]) for c in L}
%o A317111 coeffs  # _G. C. Greubel_, Nov 30 2018
%Y A317111 Cf. A097592, A097597.
%K A317111 easy,nonn
%O A317111 0,5
%A A317111 _Ira M. Gessel_, Jul 21 2018