"Binary Quadratic Forms: An Algorithmic Approach" - читать интересную книгу автора (Johannes Buchmann, Ulrich Vollmer)