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.

A152873 Number of permutations of {1,2,...,n} (n>=2) having a single run of even entries. For example, the permutation 513284679 has a single run of even entries: 2846.

This page as a plain text file.
%I A152873 #20 Sep 24 2024 10:19:39
%S A152873 2,6,12,48,144,720,2880,17280,86400,604800,3628800,29030400,203212800,
%T A152873 1828915200,14631321600,146313216000,1316818944000,14485008384000,
%U A152873 144850083840000,1738201006080000,19120211066880000,248562743869440000,2982752926433280000,41758540970065920000
%N A152873 Number of permutations of {1,2,...,n} (n>=2) having a single run of even entries. For example, the permutation 513284679 has a single run of even entries: 2846.
%F A152873 a(n) = A152667(n,1).
%F A152873 a(2n) = (n+1)(n!)^2;
%F A152873 a(2n+1) = n!(n+2)!
%F A152873 E.g.f.: 24*sqrt(4-x^2)*arcsin(x/2)/[(2-x)^3*(2+x)^2] - x(6-8x-3x^2+2x^3)/ [(2+x)(2-x)^2].
%F A152873 G.f.: G(0)/x^2 -1/x^2 -2/x, where G(k) = 1 + x*(k+2)/(1 - x*(k+1)/ (x*(k+1) + 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, Jun 07 2013
%F A152873 D-finite with recurrence 4*a(n) -2*a(n-1) -(n+2)*(n-1)*a(n-2)=0. - _R. J. Mathar_, Jul 24 2022
%F A152873 Sum_{n>=2} 1/a(n) = BesselI(1, 2) + BesselI(2, 2) - 3/2 = A096789 + A229020 - 3/2. - _Amiram Eldar_, Jan 22 2023
%e A152873 a(4) = 12 because we have 2413, 2431, 4213, 4231, 1243, 1423 and their reverses.
%p A152873 ae := proc (n) options operator, arrow: factorial(n)^2*(n+1) end proc: ao := proc (n) options operator, arrow: factorial(n)*factorial(n+2) end proc: a := proc (n) if `mod`(n, 2) = 0 then ae((1/2)*n) else ao((1/2)*n-1/2) end if end proc; seq(a(n), n = 2 .. 23);
%p A152873 # second Maple program:
%p A152873 a:= n-> (h-> h!*(h+1+(n mod 2))!)(iquo(n, 2)):
%p A152873 seq(a(n), n=2..25);  # _Alois P. Heinz_, Sep 24 2024
%t A152873 a[n_] := If[OddQ[n], ((n - 1)/2)!*((n + 3)/2)!, (n/2 + 1) ((n/2)!)^2]; Array[a, 25, 2] (* _Amiram Eldar_, Jan 22 2023 *)
%Y A152873 Cf. A152667.
%Y A152873 Cf. A096789, A229020.
%K A152873 nonn
%O A152873 2,1
%A A152873 _Emeric Deutsch_, Dec 14 2008