login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A152663 Number of leading odd entries in all permutations of {1,2,...,n} (see example). 2

%I

%S 1,1,6,16,120,540,5040,32256,362880,3024000,39916800,410572800,

%T 6227020800,76281004800,1307674368000,18598035456000,355687428096000,

%U 5762136335155200,121645100408832000,2211729098342400000

%N Number of leading odd entries in all permutations of {1,2,...,n} (see example).

%C a(n) = Sum_{k=0..ceiling(n/2)} k*A152662(n,k).

%F a(2n+1) = (2n+1)!;

%F a(2n) = n(2n)!/(n+1).

%e a(3)=6 because in the permutations 123, 132, 213, 231, 312, 321 we have 1+2+0+0+2+1 = 6 leading odd entries.

%p ao := proc (n) options operator, arrow; factorial(2*n+1) end proc: ae := proc (n) options operator, arrow: n*factorial(2*n)/(n+1) end proc: a := proc (n) if `mod`(n, 2) = 1 then ao((1/2)*n-1/2) else ae((1/2)*n) end if end proc: seq(a(n), n = 1 .. 20);

%Y Cf. A152662, A152664, A152665.

%K nonn

%O 1,3

%A _Emeric Deutsch_, Dec 13 2008

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 22 16:37 EST 2020. Contains 331152 sequences. (Running on oeis4.)