| Consider the permutation u which rotates P={1,2,...,p} forward by 1 and rotates
Q={p+1,p+2,...,2p} backward by 1. If a set A has k elements in P and p-k in Q,
and its sum mod p is c, call (k,p-k,c) the signature of A. Then Au will have
the signature (k,p-k,c+2k); and conversely, if Au has this signature, A has
signature (k,p-k,c). For k=0 or p this isn't too interesting, but otherwise,
since p is an odd prime, adding 2k repeatedly will cycle through all the values
mod p; so u, iterated if necessary, provides a 1-1 map between sets of signature
(k,p-k,a) and (k,p-k,b) for any a and b.
There is one set with signature (0,p,0) and one with signature (p,0,0): the
set's sum in both cases is == p(p+1)/2 == 0 (mod p). All other sets of
cardinality p divide according to their sum mod p, by using the above argument,
into equinumerous classes of size (C(2p,p) - 2)/p. So the answer is
2 + (C(2p,p) - 2)/p = (C(2p,p)+2p-2)/p
where C(a,b) = a!/(b!(a-b)!) is the combinations function.
|