number theory

Execution time: 
real	2m23.781s
user	2m17.634s
sys	0m6.074s