5,6 solved
7 solved lazily
noticed a dependance on primes, created better prime functions for use in other problems