i made functions,

trivialdivision() to test primality

powermod( a, N ) to find out $\displaystyle a^{N-1} mod N $

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

Printable View

- Sep 8th 2009, 07:37 AMsilversandprogram to find carmichael number
i made functions,

trivialdivision() to test primality

powermod( a, N ) to find out $\displaystyle a^{N-1} mod N $

so how can you make a C program to find out carmichael numbers in range [c,d] ? - Sep 8th 2009, 08:45 AMaidan
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!