Question 1030558
<pre>
Here is a way to prove it without calling on advanced
algebraic or number theory theorems, just basic algebra.


Every positive integer which is both a square and a cube
of a positive integer is a 6th power of a positive integer.

We will show that for every n,

Theorem: n<sup>6</sup> is either of the form 7k or 7k+1

Every integer can be written in the form:

7p+q where q=0,...6

If q=0, then the theorem is immediate since
(7p)<sup>6</sup> = 7<sup>6</sup>p<sup>6</sup> which is a multiple of 7.

For the other cases we want to show that n<sup>6</sup> = 7k+1,
which will be true if and only if n<sup>6</sup>-1 = 7k

n<sup>6</sup>-1 = (n<sup>3</sup>-1)(n<sup>3</sup>+1) = (n-1)(n<sup>2</sup>+n+1)(n+1)(n<sup>2</sup>-n+1)

If we can show that for every n, one of those four factors is a
multiple of 7, the theorem will be proved.

Suppose n = 7p+q, then substituting in each of the four factors

(1)   n-1 = (7p+q)-1 = 7p+q-1, a multiple of 7 when q=1
(2)   n<sup>2</sup>+n+1 = (7p+q)<sup>2</sup>+(7p+q)+1 = 49p<sup>2</sup>+14pq+7p+q<sup>2</sup>+q+1,
      a multiple of 7 iff q<sup>2</sup>+q+1 is a multiple of 7
(3)   n+1 = (7p+q)+1 = 7p+q+1, a multiple of 7 when q=6
(4)   n<sup>2</sup>-n+1 = (7p+q)<sup>2</sup>-(7p+q)+1 = 49p<sup>2</sup>+14pq-7p+q<sup>2</sup>-q+1,
      a multiple of 7 iff q<sup>2</sup>-q+1 is a multiple of 7

when q=1, (1) is a multiple of 7
when q=2, (2) is a multiple of 7 because q<sup>2</sup>+q+1 = 2<sup>2</sup>+2+1 = 7
when q=3, (4) is a multiple of 7 because q<sup>2</sup>-q+1 = 3<sup>2</sup>-3+1 = 7
when q=4, (2) is a multiple of 7 because q<sup>2</sup>+q+1 = 4<sup>2</sup>+4+1 = 21
when q=5, (4) is a multiple of 7 because q<sup>2</sup>-q+1 = 5<sup>2</sup>-5+1 = 21
when q=6, (3) is a multiple of 7

The theorem is proved.

Edwin</pre>