Parity of the partition function