1

I was trying to prove the following statement:

Show that if $n$ is an integer, then $n^2$ can be written as $n^2=r^2+s^2$ where $r, s \in \mathbb{Q} \backslash \mathbb{Z}$, that is, $r$ and $s$ are non integer rationals.

My first idea was the most obvious one: to write $r=\frac{a}{b}$ and $s=\frac{c}{d}$ where $a, b, c, d \in \mathbb{Z}$ with $(a, b)=(c, d)=1$ and $b, d>1$.

I then tried a few things, but none of them lead to anything interesting. Could anyone help me? I'm looking for an elementary proof. I already know which integers can be expressed as the sum of two squares, and that primes of the form $4n+1$ have a unique representation as the sum of two squares, but I'm not sure how any of those would help me here.

Will199
  • 135
  • See also https://math.stackexchange.com/questions/1445058/which-rationals-can-be-written-as-the-sum-of-two-rational-squares – lhf Feb 23 '21 at 10:29

2 Answers2

8

There are infinitely many primitive Pythagorean triples (i.e., where $a$, $b$ and $c$ are coprime), such as explained in Pythagorean triple. Choose any one where the $c$ in

$$a^2 + b^2 = c^2 \implies 1 = \frac{a^2}{c^2} + \frac{b^2}{c^2} \tag{1}\label{eq1A}$$

has $c \not\mid n$, e.g., $c \gt n$. Multiplying both sides of \eqref{eq1A} by $n^2$ gives

$$n^2 = \frac{(na)^2}{c^2} + \frac{(nb)^2}{c^2} \tag{2}\label{eq2A}$$

This shows we can use $r = \frac{na}{c}$ and $s = \frac{nb}{c}$ since both values are non-integral.

For example, since $(68, 285, 293)$ is a Pythagorean triple, for any $n \lt 293$ (actually, since $293$ is a prime number, we can do this for any $n$ which doesn't have a factor of $293$), we get

$$n^2 = \frac{(68n)^2}{293^2} + \frac{(285n)^2}{293^2} \tag{3}\label{eq3A}$$

John Omielan
  • 47,976
  • Thank you very much, John. I didn't think about using Pythagorean triples, but that works out nicely. – Will199 Feb 23 '21 at 18:32
1

Fix $n \in \Bbb N$.

Simple fact: the following set $$S'=\{ (r,s) \in \Bbb Q \times \Bbb Z : n^2= r^2+s^2 \} \cup \{ (r,s) \in \Bbb Z \times \Bbb Q : n^2= r^2+s^2\}$$ is the union of two finite sets, hence it is a finite set.

Less obvious fact: the set $$S=\{ (r,s) \in \Bbb Q^2 : n^2= r^2+s^2 \}$$ is an infinite set. In particular $S \setminus S' \neq \emptyset$. This means that there exist $r,s \in \Bbb Q \setminus \Bbb Z$ such that $$n^2=r^2+s^2$$

I leave to you to prove that $S'$ is a finite set. Let's see why $S$ is infinite.

$S$ is an infinite set because there exist infinitely many primitive pythagorean triples $(a,b,c)$. For any such Pythagorean triple you can construct $r,s$ by the map $$(a,b,c) \mapsto \left( \frac{an}{c}, \frac{bn}{c} \right)$$ Indeed $$\left( \frac{an}{c}\right)^2 + \left( \frac{bn}{c}\right)^2 = \frac{n^2(a^2+b^2)}{c^2}=n^2$$

Crostul
  • 36,738
  • 4
  • 36
  • 72