Use my own prime-finding function.

I tried to rewrite the prime-finding function from memory this morning,
to see whether I really did understand how it works.  This is what I
came up with; it seems to be somewhat slower but I'm using it since
it's my own.