# Prove that, if $x$ and $y$ are both odd positive integers, then $x^2 + y^2$ is even but not divisible by $4$.

#### Complete Python Prime Pack for 2023

9 Courses     2 eBooks

#### Artificial Intelligence & Machine Learning Prime Pack

6 Courses     1 eBooks

#### Java Prime Pack 2023

8 Courses     2 eBooks

Given:

$x$ and $y$ are both odd positive integers.

To do:

We have to prove that $x^2 + y^2$ is even but not divisible by $4$.

Solution:

Let $x=2 m+1$ and $y=2 m+3$ are odd positive integers, for every positive integer $m$.
This implies,

$x^{2}+y^{2}=(2 m+1)^{2}+(2 m+3)^{2}$

$=4 m^{2}+1+4 m+4 m^{2}+12 m+9$            (Since $(a+b)^{2}=a^{2}+2 a b+b^{2}$)

$=8 m^{2}+16 m+10$

$=8m^{2}+16m+8+2$

$=4(2m^2+4m+2)+2$

Hence, $x^{2}+y^{2}$ is even for every positive integer $m$ but not divisible by 4.

Updated on 10-Oct-2022 13:27:08