A positive integer $n$ is called $oeirense$ if there exist two positive integers $a$ and $b$, not necessarily distinct, such that $n=a^2+b^2$. Determine the greatest integer $k$ such that there exist infinitely many positive integers $n$ such that $n$, $n+1$, $\dots$, $n+k$ are oeirenses.
Problem
Source: Lusophon Mathematical Olympiad 2024 Day 2 Problem 6
Tags: number theory
26.07.2024 19:47
This is the same as Putnam 2000 A2: https://artofproblemsolving.com/community/c7h429336p2429210 -*Aiden
26.07.2024 19:50
The answer is $k=2$. For the construction, choose $n=4m^4+4m^2$. Then $n=4m^4+4m^2=(2m^2)^2+(2m)^2$, $n+1=4m^4+4m^2+1=(2m^2+1)^2$, $n+2=4m^4+4m^2+2=(2m^2+1)^2+1^2$. For $k \geq 3$, note that the integers $n, n+1, \cdots, n+k$ contain at least one integer $x \equiv 3$ (mod $4$), which is never the sum of two squares.
26.07.2024 20:54
weaving2 wrote: This is the same as Putnam 2000 A2: https://artofproblemsolving.com/community/c7h429336p2429210 -*Aiden No, it isn't. Note that contrary to the Putnam problem, here we require the squares to be positive. In particular, the solution in #3 is wrong, as for the representation of $n+1$, one of the squares is zero. (It is not hard to fix though, but still.)
26.07.2024 21:36
Aiden-1089 wrote: The answer is $k=2$. For the construction, choose $n=4m^4+4m^2$. Then $n=4m^4+4m^2=(2m^2)^2+(2m)^2$, $n+1=4m^4+4m^2+1=(2m^2+1)^2$, $n+2=4m^4+4m^2+2=(2m^2+1)^2+1^2$. For $k \geq 3$, note that the integers $n, n+1, \cdots, n+k$ contain at least one integer $x \equiv 3$ (mod $4$), which is never the sum of two squares. The question asks that a and b be positive integers. The solutions to the Pell equation $x^2-2y^2=1$ are $(x, y)=(((3-\sqrt{2})^m+(3+\sqrt{2})^m)/2, ((3+\sqrt{2})^m-(3-\sqrt{2})^m)/2)$. If we pick 16|m, then 17|y from FLT. Rewrite $17y'=y$ and pick $n=4y^2$. $n=256y'^2+900y'^2, n+1=4y^2+1, n+2=x^2+x^2$.
26.07.2024 21:52
Davdav1232 wrote: Aiden-1089 wrote: The answer is $k=2$. For the construction, choose $n=4m^4+4m^2$. Then $n=4m^4+4m^2=(2m^2)^2+(2m)^2$, $n+1=4m^4+4m^2+1=(2m^2+1)^2$, $n+2=4m^4+4m^2+2=(2m^2+1)^2+1^2$. For $k \geq 3$, note that the integers $n, n+1, \cdots, n+k$ contain at least one integer $x \equiv 3$ (mod $4$), which is never the sum of two squares. The question asks that a and b be positive integers. Then I think following works with the same constuction: It is known that number of solitions $a^2+b^2=n=2^x \cdot p_1^{a_1}\cdot ... \cdot p_k^{a_k} \cdot q_1^{b_1}\cdot ... \cdot q_m^{b_m}$, there $4|p_i-1, q_i-3$, equals to $f(n)=[((a_1+1)\cdot ... \cdot (a_k+1)+1)/2]$ ($[t]$ is integer part of $t$). So if $f((2m^2+1)^2)>2$ then there exist solution of $a^2+b^2=(2m^2+1)^2$, there $a, b$ are positive integers. But we, sure, can take such $m$: by CRT we can take $p_1p_2|2m^2+1$ for some $8|p_i-1$. For example, we can take $17 \cdot 41 |2m^2+1$. It is possible by CRT and QLR.
26.07.2024 22:21
Tintarn wrote: weaving2 wrote: This is the same as Putnam 2000 A2: https://artofproblemsolving.com/community/c7h429336p2429210 -*Aiden No, it isn't. Note that contrary to the Putnam problem, here we require the squares to be positive. In particular, the solution in #3 is wrong, as for the representation of $n+1$, one of the squares is zero. (It is not hard to fix though, but still.) Oops, I didn't notice the condition. Here's my (ugly) construction: Choose $n=2x^2$. Then $n=x^2+x^2$ and $n+2=(x+1)^2+(x-1)^2$. We show that there are infinitely many $x \geq 2$ such that $2x^2+1$ is a sum of two positive squares. Consider the equation $2x^2+1=y^2+8^2 \implies y^2-2x^2=-63$. Let $(x_1,y_1)=(6,3)$ and define $(x_{n+1},y_{n+1}) = (3x_n+2y_n,4x_n+3y_n)$ for all positive integers $n$. Clearly $(6,3)$ is a solution, and that $y_{n+1}^2-2x_{n+1}^2=(4x_n+3y_n)^2-2(3x_n+2y_n)^2=y_n^2-2x_n^2$ for all $n$. So $(x_n,y_n)$ is a solution to the equation for all positive integers $n$. It is easy to see that all solutions generated in this manner are distinct. Thus there are infinitely many $x$ such that $2x^2,2x^2+1,2x^2+2$ are all sums of two positive squares.
29.07.2024 22:27
Notice that $x^2\equiv 0$ or $x^2\equiv 1$ $(mod \ 4)$, hence $a^2+b^2\not\equiv 3 \ (mod \ 4)\rightarrow k\leq 2$ For $k=2$, take $n=25m^2$. That gives us: \begin{align*} & n=(3m)^2+(4m)^2 \\ & n+1= (5m)^2+1^2 \\ & n+2 = (5m-1)^2+ (10m+1) \end{align*}For $10m+1$ to be a square, just take $m=10l^2+2l\Rightarrow 10m+1=(10l+1)^2$. We conclude that there are infinite $n$ such that $n$, $n+1$, $n+2$ are $oeirense$, making $k=2$ the answer.
03.08.2024 02:10
Note that \[(a^2 + b^2)(c^2 + d^2) = (ac + bd)^2 + (ad - bc)^2.\]In particular, if $A$ is the set of integers that can be written as a sum of two squares (one of them may be $0$), then this set is closed under multiplication. Every oeirense number is in $A$. One can see that any number that leaves remainder $3$ under division by $4$ cannot be the sum of two squares, which shows $k \leq 2$. Let's prove that $k = 2$ with the following triples: \[17^{2^k} - 1, 17^{2^k}, 17^{2^k} + 1, \quad k \in \mathbf{N}.\]Of course $17^{2^k} + 1$ is oeirense, so we have to take care of the other two numbers. Our proof goes by induction. For the base case $k = 1$, $17^2 - 1 = 288 = 12^2 + 12^2$ is oeirense and $17^2 = 289 = 225 + 64 = 15^2 + 8^2$ is also oeirense. Suppose it holds for $k - 1$, $k \geq 2$. Now note that $17^{2^k} = (15^2 + 8^2)\cdot17^{2^k - 2}$, which is oeirense since $2^k - 2$ is even for $k \geq 1$. On the other hand, $17^{2^k} - 1 = (17^{2^{k - 1}} - 1)(17^{2^{k - 1}} + 1)$. But $17^{2^{k - 1}} - 1, 17^{2^{k - 1}} + 1 \in A$ implies $17^{2^k} - 1 \in A$. But $17^{2^k} - 1$ is not a square for $k \geq 2$, so it is oeirense. Therefore our triples indeed satisfy the statement.