Added prime testing. Sundaram too slow.