Java program to calculate the prime factors of a number. Produces nice exponent output