I want to understand the solution to part b) of this problem that I have posted below. Part a) was solved by showing that $x^2+x+1 | x^{2n}+x^n+1$ iff $3 \nmid n$. Since we are using the expression of part a) evaluated at $x=10$ to prove the divisibility of $37|1\underbrace{0\cdots 0}_\text{n-times}1\underbrace{0\cdots 0}_\text{n-times}1$ it seems to me that we can only conclude for which $n$, $3\cdot 37|1\underbrace{0\cdots 0}_\text{n-times}1\underbrace{0\cdots 0}_\text{n-times}1$. Since the digital sum on the right is always divisible by $3$ how can we conclude for which $n$ the expression is divisible by $37$
Solution

