Carmichael 3 strong pseudoprimes
Template:Draft Task A lot of composite numbers can be detected by the Miller Rabin Test, but there are some that evade it.
The purpose of this task is to investigate such numbers. The method suggested is based on ....
The objective is to find Carmichael numbers of the form Prime1 X Prime2 X Prime3. Prime1 < Prime2 < Prime3 for all Prime1 upto 61 see page 7 of.
For a given Prime1
for 1 < h3 < Prime1
for 0 < d < h3+Prime1 if (h3+Prime1)*(Prime1-1) mod d == 0 and -Prime1 squared mod h3 == d mod h3 then Prime2 = 1 + ((Prime1-1) * g/d) next d if Prime2 is not prime Prime3 = 1 + (Prime1*Prime2/h3) next d if Prime3 is not prime next d if (Prime2*Prime3) mod (Prime1-1) not equal 1 Prime1 * Prime2 * Prime3 is a Carmichael Number