probelm 7 update

optimizations to problem 7 to make it much faster. only checks up to
sqrt(num) now.