login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A258213 Number of permutations of {1,2,3,...,n} such that no even numbers are adjacent. 1

%I #22 Feb 14 2024 16:47:45

%S 1,1,2,6,12,72,144,1440,2880,43200,86400,1814400,3628800,101606400,

%T 203212800,7315660800,14631321600,658409472000,1316818944000,

%U 72425041920000,144850083840000,9560105533440000,19120211066880000,1491376463216640000,2982752926433280000

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

%F a(n) = factorial(ceiling(n/2))*fallfac(ceiling(n/2)+1, floor(n/2)), with fallfac = A008279.

%F a(2n) = A010790(n), a(2n-1) = A010790(n)/2.

%F 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 a:= n-> (m-> m!^2*(m+1))(iquo(n+1, 2, 'r'))/(2-r):

%p seq(a(n), n=0..24); # _Alois P. Heinz_, Feb 14 2024

%o (PARI) T(n,k) = n!/(n-k)!; \\ A008279

%o a(n) = ceil(n/2)!*T(ceil(n/2)+1, n\2); \\ _Michel Marcus_, Nov 24 2022

%Y Cf. A008279, A010790.

%K nonn

%O 0,3

%A _Ran Pan_, May 23 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 20:50 EDT 2024. Contains 375284 sequences. (Running on oeis4.)