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!)
A161133 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having exactly k odd fixed points (0 <= k <= ceiling(n/2)). 2
1, 0, 1, 1, 1, 3, 2, 1, 14, 8, 2, 64, 42, 12, 2, 426, 234, 54, 6, 2790, 1704, 468, 72, 6, 24024, 12864, 3024, 384, 24, 205056, 120120, 32160, 5040, 480, 24, 2170680, 1145400, 272400, 37200, 3000, 120, 22852200, 13024080, 3436200, 544800, 55800 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
Row n contains 1 + ceiling(n/2) entries.
Sum of row n is n! = A000142(n).
T(n,0) = A161131(n).
Sum_{k>=0} k*T(n,k) = A052558(n-1).
LINKS
Indranil Ghosh, Rows 0..100, flattened
FORMULA
T(n,k) = binomial(ceiling(n/2), k)*Sum_{j=0..ceiling(n/2)-k} (-1)^j*(n-k-j)!*binomial(ceiling(n/2)-k, j).
EXAMPLE
T(3,0)=3 because we have 312, 231, 321; T(3,2)=1 because we have 123.
Triangle starts:
1;
0, 1;
1, 1;
3, 2, 1;
14, 8, 2;
64, 42, 12, 2;
426, 234, 54, 6;
MAPLE
T := proc (n, k) options operator, arrow: binomial(ceil((1/2)*n), k)*add((-1)^j*binomial(ceil((1/2)*n)-k, j)*factorial(n-k-j), j = 0 .. ceil((1/2)*n)-k) end proc: for n from 0 to 12 do seq(T(n, k), k = 0 .. ceil((1/2)*n)) end do; # yields sequence in triangular form
MATHEMATICA
Flatten[Table[Binomial[Ceiling[n/2], k]*Sum[(-1)^j*(n - k - j)!*Binomial[Ceiling[n/2] - k, j], {j, 0, Ceiling[n/2] - k}], {n, 0, 11}, {k, 0, Ceiling[n/2]}]] (* Indranil Ghosh, Mar 08 2017 *)
PROG
(PARI) tabf(nn) = { for(n=0, nn, for(k = 0, ceil(n/2), print1(binomial(ceil(n/2), k) * sum(j=0, ceil(n/2) - k, (-1)^j*(n - k - j)! * binomial(ceil(n/2) - k, j)), ", "); ); print(); ); };
tabf(12); \\ Indranil Ghosh, Mar 08 2017
CROSSREFS
Sequence in context: A154921 A127126 A371461 * A112911 A152405 A152400
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Jul 18 2009
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 April 25 12:28 EDT 2024. Contains 371969 sequences. (Running on oeis4.)