"Algorithm 139, solutions of Diophantine equation" - читать интересную книгу автора (Peck.)