|
|
[1, 0, 0, 1, 0, 0, 0, 0, 0, 1] [1, 0, 0, 1, 0, 0, 0, 0, 0, 1] |
521 521 |
7 7 |
|
|
Problem: Compute 3^{521} \pmod{10000}.
|
|
521 521 |
[1, 0, 0, 1, 0, 0, 0, 0, 0, 1] [1, 0, 0, 1, 0, 0, 0, 0, 0, 1] |
'1000001001' '1000001001' |
True True |
|
|
3203 3203 |
3203 3203 |
3203 3203 |
|
|
Click to the left again to hide and once more to show the dynamic interactive window |
|
|
If 2^{n-1} \equiv 1 \pmod{n} then n has a chance of being prime.
157 157 |
1 1 |
172693837716124418522092982979366532296314630498967 79829587767292159558640084729953131077372528003242 Time: CPU 0.00 s, Wall: 0.00 s 172693837716124418522092982979366532296314630498967 79829587767292159558640084729953131077372528003242 Time: CPU 0.00 s, Wall: 0.00 s |
3 * 449862907000167013519 * 127960344532295706107782898131 Time: CPU 1.70 s, Wall: 1.70 s 3 * 449862907000167013519 * 127960344532295706107782898131 Time: CPU 1.70 s, Wall: 1.70 s |
|
|
True True |
Click to the left again to hide and once more to show the dynamic interactive window |
|
|
Idle Question: Is there an elementary argument that the percentage of failures go to 0 as n\to\infty?
|
|
|
|
n = 561 n = 1105 n = 1729 n = 2465 n = 2821 n = 6601 n = 561 n = 1105 n = 1729 n = 2465 n = 2821 n = 6601 |
1729 1729 |
|
|
An extremely powerful probabilistic primality test. Every call increases the chances of a correct conclusion.
|
|
Click to the left again to hide and once more to show the dynamic interactive window |
|
|