For how many integral value of $x\le{100}$ is $3^x-x^2$ divisible by $5$?
I compared $3^x$ and $x^2$ in $\mod {5}$ i found some cycles but didn't get anything
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityFor how many integral value of $x\le{100}$ is $3^x-x^2$ divisible by $5$?
I compared $3^x$ and $x^2$ in $\mod {5}$ i found some cycles but didn't get anything
HINT : For $n\in\mathbb N$,
$n$ can be divided by $5$ $\iff$ The right-most digit of $n$ is either $0$ or $5$.
You'll find some patterns in the followings from $x=1$ to $x=20$.
The right-most digit of $3^x$ : $3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1,3,9,7,1.$
The right-most digit of $x^2$ : $1,4,9,6,5,6,9,4,1,0,1,4,9,6,5,6,9,4,1,0.$
Here I will give a complete solution using congruences:
For any non negative integer $x,$ we can prove that
$$3^{4m}≡1(mod10),$$
$$3^{4m+1}≡3(mod10),$$
$$3^{4m+2}≡9(mod10),$$
$$3^{4m+3}≡7(mod10).$$
Also for any (positive) integer $x,$ we have
$$x^2≡0,1,4,5,6,9(mod10)$$ for $x≡0,\pm1,\pm2,\pm 3, \pm4, 5(mod10)$ respectively.
If $n=|3^x-x^2|$ is divisible by $5,$ Its last digit should be $0$ or $5.$ Therefore we have following few cases:
Altogether we have $20$ possible integer solutions less than $100,$ namely $$\{2,4,16,18,22,24,36,38,42,44,56,58,62,64,76,78,82,84,96,98\}.$$