Find all natural number $n$ such $n^{6}-5n^{4}+3n^{2}+1$ is divisible by $399$.
My try; Let be $f\left( n \right)=n^{6}-5n^{4}+3n^{2}+1, n\in \mathbb{N}$.
Since $399=3\cdot7\cdot19\cdot$ and $3,7,19$ are prime number then therefore 399|$f\left( n \right)\Longleftrightarrow 3,7,19|f\left( n \right)$.
Then from the algorithm of dividing the number n by the numbers $3,7$ and $19$ ,we have
$n=3q_{1}+r_{1}$ where $0\le r_{1}\lt 3$, $n=7q_{2}+r_{2},$ $0\le r_{2}\lt 7$ and $n=19q_{3}+r_{3}$ , $0\le r_{3}\lt 19$ .
Maybe now by analyzing these cases ,it will help us to find the required numbers ?
If you have any tips for this or you have any other solution , I would be very grateful if you share it with us .