finally solved problem 2
started problem 7
started problem 8
working on primeality test