If we start with the identity n=((n+1)/2)2-((n-1)/2)2, then, if n is an odd whole number, it can clearly be written as a difference of squares (of whole numbers). If n is the square of an odd number, i.e. n=(2k+1)2, then we have the identity (2k+1)2= (2k2+2k+1)2-(2k2+2k)2. Hence every odd number, other than 1, must appear in some Pythagorean triple. Also, every even number, other than 2, appears in some Pythagorean triple.
Cubes can also be represented as differences of squares, e.g. n3 = (n(n+1)/2)2 – (n(n-1)/2)2.
An application of the above identity is to∑1≤k≤nk3 = (n(n+1)/2)2.
For higher powers, if we try na = (nb(nc + 1)/2)2 – (nb(nc-1)/2)2 ,
where a, b and c are whole numbers, then a=2b+c. So, if a=5, we can have b=2 and c=1 or b=1 and c=3.
Hence, for n5(say) we can have either n5 = (n2(n+1)/2)2 – (n2(n-1)/2)2 or
n5= (n(n3+1)/2)2– (n(n3-1)/2)2.
Divisibility by 3
If (x,y,z) is a PPT (Primitive Pythagorean Triple) then z2 = x2 + y2. Looking at examples of PPT’s it is evident that exactly one of x and y is divisible by 3. This follows from an application of n3≡ n mod 3 for any integer n.
If z2= x2+ y2 then 2x2y2 = z4 – x4 – y4 ≡ z2– x2– y2 mod 3≡ 0 mod 3 and so 3|2x2y2. Hence, 3 divides x or y or both. 3 can’t divide both x and y because then 3 would then divide z, since z2= x2+ y2, meaning that (x,y,z) is not primitive. Hence the result.
For positive integer powers of positive integers it is clear that these can be expressed as differences of squares of positive integers. What is also clear is that in all cases at least one of these squares must be divisible by 3.
Case 1 Odd powers, 3 and higher
n2k+1 = (nk(n+1)/2)2 – (nk(n-1)/2)2 , k≥1
Case 2 Even powers, 4 and higher
n2k = (nk-1(n2 + 1)/2)2 – (nk-1(n2 – 1)/2)2 , k≥2
Obviously if 3|n then both squares in the above cases are divisible by 3. Otherwise, in Case 1 either the first or the second square must be divisible by 3 depending on n, while in Case 2 the second square is always divisible by 3.
Divisibility by 5
If (x,y,z) is a PPT (Primitive Pythagorean Triple) then z2= x2+ y2. Looking at examples of PPT’s it is evident that exactly one of x, y and z is divisible by 5. This follows from an application of n5≡ n mod 5 for any integer n.
If z2= x2+ y2 then z6 = x6 + 3x4y2 + 3x2y4 + y6 = x6 + y6 + 3x2y2z2.
Hence, 3x2y2z2 = z6 – x6 – y6≡ z2 – x2 – y2 mod 5≡ 0 mod 5. Therefore 5|3x2y2z2 and so the result follows.
If we look at n2k= (nk-1(n2+ 1)/2)2– (nk-1(n2– 1)/2)2, k≥2, then the product of the terms to be squared gives n2k-2(n4 – 1)/4 = n2k-3n(n4– 1)/4≡ 0 mod 5, so at least one of the squared terms must be divisible by 5.