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.

A258213 Number of permutations of {1,2,3,...,n} such that no even numbers are adjacent.

This page as a plain text file.
%I A258213 #22 Feb 14 2024 16:47:45
%S A258213 1,1,2,6,12,72,144,1440,2880,43200,86400,1814400,3628800,101606400,
%T A258213 203212800,7315660800,14631321600,658409472000,1316818944000,
%U A258213 72425041920000,144850083840000,9560105533440000,19120211066880000,1491376463216640000,2982752926433280000
%N A258213 Number of permutations of {1,2,3,...,n} such that no even numbers are adjacent.
%F A258213 a(n) = factorial(ceiling(n/2))*fallfac(ceiling(n/2)+1, floor(n/2)), with fallfac = A008279.
%F A258213 a(2n) = A010790(n), a(2n-1) = A010790(n)/2.
%F A258213 D-finite with recurrence: (4*(n-2)^2 + 24*n - 80)*a(n) + (16*n+24)*a(n-1) - (n+2)*n*((n-2)^2 + 8*n - 17)*a(n-2) = 0. - _Georg Fischer_, Nov 23 2022
%p A258213 a:= n-> (m-> m!^2*(m+1))(iquo(n+1, 2, 'r'))/(2-r):
%p A258213 seq(a(n), n=0..24);  # _Alois P. Heinz_, Feb 14 2024
%o A258213 (PARI) T(n,k) = n!/(n-k)!; \\ A008279
%o A258213 a(n) = ceil(n/2)!*T(ceil(n/2)+1, n\2); \\ _Michel Marcus_, Nov 24 2022
%Y A258213 Cf. A008279, A010790.
%K A258213 nonn
%O A258213 0,3
%A A258213 _Ran Pan_, May 23 2015