Prove that for each positive integer $n$ there are at most two pairs $(a, b)$ of positive integers with following two properties: (i) $a^2 + b = n$, (ii) $a+b$ is a power of two, i.e. there is an integer $k \ge 0$ such that $a+b = 2^k$.
Problem
Source: Dutch BxMO TST 2019 p1
Tags: number theory
14.01.2020 01:16
12.04.2024 09:18
Assume for the sake of contradiction there exist $n$ such that there are at least 3 pairs $(x,x_1)$, $(y,y_1)$, $(z,z_1)$ that satisfy the two properties. Therefore, by PHP at least two of $x,y,z$ have the same parity. WLOG $x\equiv y \pmod 2$ and $x>y$ Let $x+x_1 = 2^a \implies x^2-x = n-2^a$. Analogously, $y+y_1 = 2^b \implies y^2-y = n-2^b$. And because $x>y$, we get $x^2-x>y^2-y \implies n-2^a > n-2^b \implies 2^a<2^b$. Notice also that $(x-y)(x+y-1) = 2^b-2^a = 2^a(2^{b-a}-1)$. And because $x\equiv y \pmod 2$, therefore $x+y-1 \equiv 1\pmod 2 \implies 2^a\mid x-y \implies x>x-y\geq 2^a$. However, since $x+x_1 = 2^a$, therefore $2^a>x>2^a$, contradiction. Hence, for each positive integer $n$ there are at most two pairs that satisfies the two properties.