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!)
A257546 Number of permutations of length n such that numbers at odd positions are monotone and numbers at even positions are also monotone. 1
1, 1, 2, 6, 24, 40, 80, 140, 280, 504, 1008, 1848, 3696, 6864, 13728, 25740, 51480, 97240, 194480, 369512, 739024, 1410864, 2821728, 5408312, 10816624, 20801200, 41602400, 80233200, 160466400, 310235040, 620470080, 1202160780, 2404321560, 4667212440 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
Ran Pan, Exercise C, Project P.
FORMULA
a(n) = 4*binomial(n,floor(n/2))) for n > 4; a(n) = n! for n <= 4.
From Robert Israel, Apr 30 2015: (Start)
G.f.: -3*(1+x)*(1+2*x^2) - 2/x + 2*(2+1/x)/sqrt(1-4*x^2).
a(n+2) = (4*(1+n)*a(n) + 2*a(n+1))/(n+3) for n >= 4. (End)
MAPLE
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):
map(f, [$0..100]); # Robert Israel, May 12 2015
MATHEMATICA
Table[If[n <= 4, n!, 4 Binomial[n, Floor[n/2]]], {n, 31}] (* Michael De Vlieger, Apr 29 2015 *)
PROG
(Magma) [1, 1, 2, 6] cat [4*Binomial(n, Floor(n/2)): n in [4..40]]; // Vincenzo Librandi, Apr 30 2015
CROSSREFS
Sequence in context: A263690 A137326 A163912 * A274038 A143383 A067653
KEYWORD
easy,nonn
AUTHOR
Ran Pan, Apr 29 2015
EXTENSIONS
More terms from Vincenzo Librandi, Apr 30 2015
STATUS
approved

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 July 11 21:44 EDT 2024. Contains 374234 sequences. (Running on oeis4.)