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.

A257546 Number of permutations of length n such that numbers at odd positions are monotone and numbers at even positions are also monotone.

This page as a plain text file.
%I A257546 #26 Nov 13 2024 23:02:27
%S A257546 1,1,2,6,24,40,80,140,280,504,1008,1848,3696,6864,13728,25740,51480,
%T A257546 97240,194480,369512,739024,1410864,2821728,5408312,10816624,20801200,
%U A257546 41602400,80233200,160466400,310235040,620470080,1202160780,2404321560,4667212440
%N A257546 Number of permutations of length n such that numbers at odd positions are monotone and numbers at even positions are also monotone.
%H A257546 Robert Israel, <a href="/A257546/b257546.txt">Table of n, a(n) for n = 0..2993</a>
%H A257546 Ran Pan, <a href="http://www.math.ucsd.edu/~projectp/warmups/eC.html">Exercise C</a>, Project P.
%F A257546 a(n) = 4*binomial(n,floor(n/2)) for n > 4; a(n) = n! for n <= 4.
%F A257546 From _Robert Israel_, Apr 30 2015: (Start)
%F A257546 G.f.: -3*(1+x)*(1+2*x^2) - 2/x + 2*(2+1/x)/sqrt(1-4*x^2).
%F A257546 a(n+2) = (4*(1+n)*a(n) + 2*a(n+1))/(n+3) for n >= 4. (End)
%p A257546 f:= gfun:-rectoproc({a(n+2)= 4*(1+n)*a(n)/(n+3) + 2*a(n+1)/(n+3), seq(a(n)=[1,1,2,6,24,40,80][n+1],n=0..5)},a(n),remember):
%p A257546 map(f, [$0..100]); # _Robert Israel_, May 12 2015
%t A257546 Table[If[n <= 4, n!, 4 Binomial[n, Floor[n/2]]], {n, 31}] (* _Michael De Vlieger_, Apr 29 2015 *)
%o A257546 (Magma) [1,1,2,6] cat [4*Binomial(n,Floor(n/2)): n in [4..40]]; // _Vincenzo Librandi_, Apr 30 2015
%Y A257546 Cf. A047073, A000142.
%K A257546 easy,nonn
%O A257546 0,3
%A A257546 _Ran Pan_, Apr 29 2015
%E A257546 More terms from _Vincenzo Librandi_, Apr 30 2015