# More Div.Alg.

1. Jul 22, 2012

### MAGICMATHS

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 im failing when i work (7k+2)^2, even (7k+3)^2.............Can i interpret 7k+1 as 7k+(-1), i think i cant 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?

2. Jul 22, 2012

### Curious3141

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,

$$a^7 \equiv a \pmod 7$$

Two cases:

Case 1: $7 \nmid a$

Hence, $a^6 \equiv 1 \pmod 7 \Rightarrow a^6 = 7k + 1, k \in \mathbb{Z}$.

Case 2: $7 | a$

Hence, $a^6 \equiv 0 \pmod 7 \Rightarrow a^6 = 7k, k \in \mathbb{Z}$.

So $a^6$ is either of the form $7k$ or $7k + 1$ (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?

Last edited: Jul 22, 2012
3. Jul 22, 2012

### MAGICMATHS

I dont know Fermat`s little Theory, i just started number theory to be honest ..is there a possibility using div alg pls?

4. Jul 22, 2012

### Curious3141

Well, you could use the longer method presented here: http://www.mathyards.com/vb/showthread.php?691-Division-Algorithm-help [Broken]!

Last edited by a moderator: May 6, 2017
5. Jul 22, 2012

### Curious3141

MagicMaths, if this is homework or coursework, could you please post it in the appropriate homework forum (precalculus mathematics) in future, please?