Prime function functional. Need to look at parallel. Always outputting 0.