MAGICMATHS said:
I am trying to solve how an integer is simultaneously that is simultaneously a square and a cube number must be either of the form 7k or 7k+1 and I am failing when i work (7k+2)^2, even (7k+3)^2....Can i interpret 7k+1 as 7k+(-1), i think i can't but then i fail in many steps! Also i know that any square number can be expressed as 3k or 3k+1...IS THERE SOMETHING SIMILAR FOR THE CUBIC PLEASE?
The easiest way is using Fermat's Little Theorem.
Let a be any integer. If a is both a square and a cube, it is a sixth power.
By Fermat's Little Theorem,
[tex]a^7 \equiv a \pmod 7[/tex]
Two cases:
Case 1: [itex]7 \nmid a[/itex]
Hence, [itex]a^6 \equiv 1 \pmod 7 \Rightarrow a^6 = 7k + 1, k \in \mathbb{Z}[/itex].
Case 2: [itex]7 | a[/itex]
Hence, [itex]a^6 \equiv 0 \pmod 7 \Rightarrow a^6 = 7k, k \in \mathbb{Z}[/itex].
So [itex]a^6[/itex] is either of the form [itex]7k[/itex] or [itex]7k + 1[/itex] (QED).
You can construct something exactly like this for the squares modulo 3, and indeed generalise it for any (p-1)th power modulo a prime p.
Do you think the analogous statement for cubes would be true, given that 4 is composite?