Integer partition function