1

A natural number is a perfect square as well as a perfect cube. Show that it is $0$ or $1$ $($mod $7$$)$.

I tried the following.
There are integers numbers $x,y$ such that $n=x^{2}=y^{3}.$ By using Euclidean division, then $x$ and $y$ can be written as $7k,7k+1,7k+2,7k+3,7k+4,7k+5$ or $7k+6$. I am trying some contradictory stuff.

I don't know from where to go from here. Please suggest some hints.

  • Also similarly see here(mod 5): http://math.stackexchange.com/questions/147909/if-an-integer-number-is-a-square-and-a-cube-then-it-can-be-writen-as-5n-5n1 –  Dec 23 '16 at 09:35
  • https://math.stackexchange.com/questions/1439669/smallest-pandigital-number-perfect-square?newreg=04c65ef493b24928b46070226706740a –  Feb 10 '24 at 07:24

2 Answers2

3

You know that all the squares are equals to $0,1,2$ or $4$ mod $7$ because:

$$0^2=0\pmod 7$$ $$1^2=1\pmod 7$$ $$2^2=4\pmod 7$$ $$3^2=2\pmod 7$$ $$4^2=2\pmod 7$$ $$5^2=4\pmod 7$$ $$6^2=1\pmod 7.$$

And all the cubes are equals to $0,1$ or $6$ mod $7$ because:

$$0^3=0\pmod 7$$ $$1^3=1\pmod 7$$ $$2^3=1\pmod 7$$ $$3^3=6\pmod 7$$ $$4^3=1\pmod 7$$ $$5^3=6\pmod 7$$ $$6^3=6\pmod 7.$$

So if your number is a square and a cube at the same time, then it is necessarily equal to $0$ or $1$ mod $7$.

E. Joseph
  • 14,843
1

So, $n$ has to be of the form $$z^{\text{lcm}(2,3)}$$ where $z$ is any integer

If $7|z$, then $z^6\equiv0\pmod7$

Else $7\nmid z\implies(7,z)=1$ using Fermat's little Theorem $z^{7-1}\equiv1$

Dominik
  • 19,963