Maths Olympiad Prep

Library / Bulgarian Mathematical Competitions /9 of 92

Bulgarian Mathematical Competitions

Number theory Difficulty 5.0 AIME, harder Prove it Bulgaria

Problem:
Prove that for every positive integer nn there exist integers pp and qq such that
∣p2+2q2−n∣≤9n4 \left|p^{2}+2 q^{2}-n\right| \leq \sqrt[4]{9 n}

Solution

Solution:
Let qq be an integer such that
2q2≤n<2(q+1)2 2 q^{2} \leq n < 2(q+1)^{2}
Then
n−2q2<4q+2≤4n2+2=2(2n+1) n - 2 q^{2} < 4q + 2 \leq 4 \sqrt{\frac{n}{2}} + 2 = 2(\sqrt{2n} + 1)
Further, let tt be an integer such that t2≤n−2q2<(t+1)2t^{2} \leq n - 2 q^{2} < (t+1)^{2}. We choose pp to be either the number tt or t+1t+1 depending on the location of n−2q2n - 2 q^{2} with respect to the midpoint of the interval [t2,(t+1)2][t^{2}, (t+1)^{2}]. More precisely, we set
p={t, if n−2q2−t2≤tt+1, if n−2q2−t2>t p= \begin{cases} t, & \text{ if } n-2 q^{2}-t^{2} \leq t \\ t+1, & \text{ if } n-2 q^{2}-t^{2} > t \end{cases}
Then we have
∣p2+2q2−n∣≤t≤n−2q2≤2(2n+1) \left|p^{2}+2 q^{2}-n\right| \leq t \leq \sqrt{n-2 q^{2}} \leq \sqrt{2(\sqrt{2 n}+1)}
It remains to note that 2(2n+1)≤9n4\sqrt{2(\sqrt{2 n}+1)} \leq \sqrt[4]{9 n} for every n≥160n \geq 160 and that for n<160n < 160 the existence of pp and qq can be checked directly.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.