Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C

Name: Anonymous 2008-06-09 23:00

I have some questions on testing numbers.

How do I test for;
- Prime
- Multiples
- Penises

I'd like to be put on the right track to figuring this out or writing a solution, rather than having one handed to me, if possible.

Name: Anonymous 2008-06-10 0:22

>>1
I'm not sure what your application is, but it's best to try the simplest solution first and only get fancy if it's too slow.

If the naive approach  is not to your taste, you could try implementing this: http://en.wikipedia.org/wiki/Lucas%E2%80%93Lehmer_test

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List