# Fastest Primality test using $N-1$ Factorization?

If $N-1$ could be factored easily with several small prime factors, then what is the fastest way to check $N$ for primality?

Updated

I'm aware of Pocklington primility test which is not good for small factors. I'm looking for a reduction in modular exponentitation when $N-1$ has several small factors.

-

1
– Gerry Myerson Dec 3 '12 at 9:59
It is not fast, since finally it requires modular exponentiation with $N-1$ in exponent, which requires the same time of Fermat Little Theorem PRP test. – Mohsen Afshin Dec 3 '12 at 10:15

1
The pocklington test relies on the fact that $N-1$ is divisible by some relatively large prime, which doesn't seem to be the case. – Arthur Dec 3 '12 at 11:05

1
– TonyK Dec 3 '12 at 11:11

1
@Arthur: You should do these exponentiation in parallel, to save even more time. I don't mean using multiple processors, I mean exponentiating them all at once by incorporating the successive square only in those results that have the appropriate bit set. (If you are familiar with square-and-multiply exponentiation, this might make some sense!) – TonyK Dec 3 '12 at 11:15
show 10 more comments
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 6, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9316571950912476, "perplexity_flag": "middle"}