Partition an integer X into N primes