Proof about difference of squares

Click For Summary
SUMMARY

An integer n can be represented as a difference of two squares if it is either odd or divisible by 4. The representation is unique if and only if n is a prime number. The proof involves factoring n as (x-y)(x+y), where x and y are integers. If both x and y are even, n is divisible by 4; if either x or y is odd, n is odd. The uniqueness of the representation for prime n arises because one of the factors must equal 1, preventing composite outcomes.

PREREQUISITES
  • Understanding of integer properties and parity
  • Familiarity with algebraic identities, specifically difference of squares
  • Basic knowledge of prime numbers and their characteristics
  • Ability to manipulate and factor algebraic expressions
NEXT STEPS
  • Study the properties of prime numbers and their unique factorization
  • Explore algebraic identities, focusing on difference of squares
  • Learn about integer factorization techniques and their applications
  • Investigate the implications of parity in number theory
USEFUL FOR

Mathematics students, educators, and anyone interested in number theory, particularly those studying properties of integers and prime numbers.

cragar
Messages
2,546
Reaction score
3

Homework Statement


Show that an integer n can be represented as a difference of 2 squares if it is either
odd or divisible by 4, otherwise not. The representation is unique if and only if n is a prime number.

The Attempt at a Solution


let x and y be integers so then we have [itex]x^2-y^2=n=(x-y)(x+y)[/itex]
we would look at the case where x and y are even, then we could factor a 2 out of x-y and x+y so it would be divisible by 4. if x or y was odd then n would be odd. and if x and y were both odd we could factor a 2 out of x-y and x+y. But I am not sure how to prove the part
where n is prime, and that would imply x and y are unique. It seems that if n is prime
then x-y or x+y has to be 1 or else n would be composite.
 
Physics news on Phys.org
cragar said:
the case where x and y are even, then we could factor a 2 out of x-y and x+y so it would be divisible by 4.
True, but it isn't x and y both being even that really characterises this case.
if x or y was odd then n would be odd.
No, think that through again.
 

Similar threads

Replies
8
Views
2K
Replies
3
Views
2K
Replies
1
Views
1K
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
1K
Replies
23
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
3
Views
2K
Replies
12
Views
2K