Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is it true that for $n \in \mathbb{N}$ we can have $4n = x^{2} + y^{2}$ or $4n = x^{2} - y^{2}$ for $x,y \in \mathbb{N} \cup (0)$.

I was just working out and this came out to be true from $n=1$ to $n=20$. After that i didn't try, but i would like to see as what will be a counter example.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Here is a hint: the form $x^2-y^2$ factors as $(x+y)(x-y)$. Therefore, if you want to represent an integer $N$ as $x^2-y^2$, you can attempt to do so by choosing a factorization $N = ab$ and solving the linear system

$x+y = a$
$x-y = b$.

This system has the unique rational solution $x = \frac{a+b}{2}$, $y = \frac{a-b}{2}$. This gives an integral solution iff $a$ and $b$ have the same parity. Use this to show:

A positive integer $N$ is of the form $x^2 - y^2$ for $x,y \in \mathbb{Z}$ (possibly $0$) iff $N$ is odd or $N$ is divisible by $4$.

In particular, $4n$ is always of the form $x^2-y^2$. You want a little more: that $x$ and $y$ are both nonzero. Clearly $x$ cannot be zero, so you need to analyze the case $y = 0$ and show that whenever all possible solutions to $n = x^2 - y^2$ have $y = 0$, then there are nonzero $X$ and $Y$ such that $4n = X^2 + Y^2$. This is not so hard...

share|improve this answer
    
$\mathbb Z$ can be typeset with \mathbb{Z}. –  KennyTM Aug 14 '10 at 14:11
    
@Kenny TM: How do you generally but this bracket {} –  anonymous Aug 14 '10 at 14:17
    
@Chandru: But what? I don't understand the comment. –  KennyTM Aug 14 '10 at 14:20
    
@Kenny TM: It something regarding TeX as to how to insert curly brackets $\{$ command doesn't work. –  anonymous Aug 14 '10 at 14:34
1  
@Chandru: Try \\{ with 2 backslashes. –  KennyTM Aug 14 '10 at 15:03
add comment

It is true because

$$ (n+1)^2 - (n-1)^2 = 4n $$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.