"Generalized strong pseudoprime tests and applications" - читать интересную книгу автора (Berrizbeitia, Berry.)