Number of ordered partitions of N into K distinct parts modulo P

combinatoricsdiscrete mathematicsinteger-partitionsorder-theory

I've come across a combinatorics problem where I'm fairly certain that a solution exists, yet I'm unable to find it.

I'm trying to find the number of vectors $(x_1,x_2,…,x_n)$ such that

$\sum x_i = 0 \mod P$ for some sufficiently large prime $P$ (i.e the resulting formula should hold for all but some finite number of $P$) and

$x_i \neq x_j, \ 1 \leq i < j \leq n$.

The answer should be $(p-1)(p-2)…(p-n+1)$.
What I would like to do is find a combinatorial proof of the number of partitions. However, I'm stumped.

Best Answer

Here is a simple combinatorial proof that does not use hyperplanes.

The number of vectors in $\mathbb F_p^n$ whose entries are pairwise different is $p(p-1)(p-2)\cdots(p-n+1)$. Given such a vector, $\def\x{{\bf x}}\x$, let $f(\x)$ be the vector obtained by adding one to each entry. As long as $n$ and $p$ are corprime, which occurs whenever $p>n$, the sums of the entries of the vectors $$\x,f(\x),f^2(\x),\dots,f^{p-1}(\x)$$ will each have a different remainder modulo $p$. Therefore, exactly one of them will have a sum whose remainder is zero. Since the set of all vectors with pairwise different entries are partitioned into groups like this, the number of such vectors whose sum congruent to zero is $1/p$ times the total number, which is $(p-1)(p-2)\dots(p-n+1)$.