Jump to content

Carmichael 3 strong pseudoprimes: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1:
{{task}}
A lot of composite numbers can be seperated from primes by FermatsFermat's Little Theorem, but there are some that completely confound it. The [[Miller-Rabin primality test|Miller Rabin Test]] uses a combination of Fermat's Little Theorem and Chinese Division Theorem to overcome this.
 
The purpose of this task is to investigate such numbers using a method based on [[wp:Carmichael number|Carmichael numbers]], as suggested in [http://www.maths.lancs.ac.uk/~jameson/carfind.pdf Notes by G.J.O Jameson March 2010].
Line 9:
 
<tt>for 1 < h3 < Prime<sub>1</sub></tt>
:<tt>g=h3+Prime<sub>1</sub></tt>
:<tt>for 0 < d < h3+Prime<sub>1</sub></tt>
::<tt>if (h3+Prime<sub>1</sub>)*(Prime<sub>1</sub>-1) mod d == 0 and -Prime<sub>1</sub> squared mod h3 == d mod h3</tt>
::<tt>then</tt>
:::<tt>Prime<sub>2</sub> = 1 + ((Prime<sub>1</sub>-1) * g(h3+Prime<sub>1</sub>)/d)</tt>
:::<tt>next d if Prime<sub>2</sub> is not prime</tt>
:::<tt>Prime<sub>3</sub> = 1 + (Prime<sub>1</sub>*Prime<sub>2</sub>/h3)</tt>
2,172

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.