Problem

Source: 2017 Saudi Arabia BMO TST II p1

Tags: number theory, prime



Find the smallest prime $q$ such that $$q = a_1^2 + b_1^2 = a_2^2 + 2b_2^2 = a_3^2 + 3b_3^2 = ... = a_{10}^ 2 + 10b_{10}^2$$where $a_i, b_i(i = 1, 2, ...,10)$ are positive integers