Problem

Source: Kyiv City MO 2022 Round 1, Problem 9.4

Tags: number theory



Let's call integer square-free if it's not divisible by $p^2$ for any prime $p$. You are given a square-free integer $n>1$, which has exactly $d$ positive divisors. Find the largest number of its divisors that you can choose, such that $a^2 + ab - n$ isn't a square of an integer for any $a, b$ among chosen divisors. (Proposed by Oleksii Masalitin)