# program to find carmichael number

• September 8th 2009, 08:37 AM
silversand
program to find carmichael number
trivialdivision() to test primality
powermod( a, N ) to find out $a^{N-1} mod N$

so how can you make a C program to find out carmichael numbers in range [c,d] ?
• September 8th 2009, 09:45 AM
aidan
Quote:

Originally Posted by silversand
trivialdivision() to test primality
powermod( a, N ) to find out $a^{N-1} mod N$

so how can you make a C program to find out carmichael numbers in range [c,d] ?

There are several (many actually) programs available on the internet for doing that -- a bunch of them have all the coding done.

If your range [c,d] is less than 2^32 you should have no really difficult problems to run that on a PC.

Between 2^32 and 2^64, you will be plagued with negative/negative, negative/positive, positive/negative, and positive/positive modular number comparisions/reductions.

Beyond 2^64 you will need a BigInterger package.

Best of Luck!