I tried using the fact that if $f(n)$ is divisible by $7$ then so will $f(n+7)$. So 1, 8, 15, 22 can all come out to be solutions once we see that $1$ is a solution. Continuing this $2$ also satisfies and hence $9, 16$ will also be solutions to it. But this seems a lot of brute force work. I used Wolfram alpha to solve $$n^5 +4n^4 +3n^3+2022 \pmod7, 0<n\leq 22$$ and it gives me $n = 1,2,5,8,9,12,15,16,19,22$ and so there are 10 such n. But how do I solve it? Is there a shorter way?
The number of positive integers n less than or equal to $22$ such that $7$ divides $n^5 +4n^4 +3n^3 +2022$
205 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 4 best solutions below
On
in the given equation,
$$n^5+4n^4+3n^3+2022$$ notice, $$2022\equiv-1\pmod7$$ so we need to find n such that, $$n^5+4n^4+3n^3\equiv1\pmod7$$ $$\implies n^3(n^2+4n+3)\equiv1\pmod7$$ $$\implies n^3(n+3)(n+1)\equiv1\pmod7$$ therefore we need to find the following: $$n=7k+1$$ or $$n^3=7k+1$$ giving us $n=7k+2$ ($(7k+2)^3 = 7k'+1$)
or $$(n+3)=7k+1$$ but not $$(n+1)=7k+1$$ because if $(n+1)$ is $7k+1$ then $n$ will be divisible by $7$
$\therefore$ n will be of the following forms $$n=7k+1$$ $$n=7k+2$$ $$n=7k+5$$
from the above equations, we find $$n = 1,2,5,8,9,12,15,16,19,22$$ will be the answers
EDIT: why is this downvoted? if I'm wrong somewhere I'd be glad to be told where I made the mistake.
EDIT: The step where I mentioned $n=7k+2$ may not be clear or justified so lemme just clear that up. $$n=7k+2$$ $$\implies n^3 = (7k)^3+3(7k)^22^1+3(7k)^12^2+2^3$$ $$\implies (7k)^3+3(7k)^22^1+3(7k)^12^2+7+1$$ $$\implies 7((7^2k^3)+3(7k^2)2^1+3(k^1)2^2+1)+1$$ $$\implies 7m+1$$
On
From $n^5+4n^4+3n^3+2022$ we get $$n^3(n+1)(n+3)\equiv1\pmod7$$ so if $f(n)=n^3(n+1)(n+3)$ the only classes modulo $7$ such that $f(n)=1$ are for $n=1,2$ and $5$. Then all the required solutions must be such that $$1\le7k+1, 7k+2,7k+5\le22$$ then the solutions are $1,2,5,8,9,12,15,16,19,22$ and consequently the required number of solution is $\boxed{10}$.
On
As you note, if $n$ is a solution then so is $n+7$, and hence it suffices to check whether $7$ divides $$n^5+4n^4+3n^3+2022,$$ for $0\leq n\leq 6$. It is easy to check that $2022\equiv6\pmod{7}$ and so the above reduces to $$n^5+4n^4+3n^3+6.$$ Clearly $n=0$ is not a solution. For all other $n$ you have $n^3=\pm1$ and so the above reduces to $$\pm(n^2+4n+3)+6.$$ Then it remains to compute six values of this quadratic for $1\leq n\leq 6$, which should be much quicker than computing six values for the original quintic.
Note that $$2022\equiv6\equiv -8\pmod7$$
So we have
$$n^5 +4n^4 +3n^3+2022\equiv n^5 +4n^4 +3n^3-8\pmod7$$
where
$$\begin{align}n^5 +4n^4 +3n^3-8&=(-1 + x) (2 + x) (4 + 2 x + 3 x^2 + x^3)\\ \\ &=(-1 + x)\cdot (2 + x) \cdot[4 + x(x+1)(x+2)] \end{align}$$
So it is either
$$7|(x-1),~~~\text{or}~~~7|(x+2),~~~\text{or}~~~x(x+1)(x+2)\equiv 3\pmod7$$