Determine the number of five-digit integers $(37abc)$ in base 10 such that each of the numbers $(37abc), (37bca)$ and $(37cab)$ is divisible by 37. This is how I have attempted this problem:
$37abc$,$37bca$ and $37cba$ have to be multiples of $37$. Since they all begin with $37$(which is a multiple of $37$), we need to find a number $abc$ such that $bca$ and $cba$ are also multiples of $37$. 
Using the following proof, we can conclude that for all multiples of $37$ less than $1000$, $bca$ and $cba$ are also multiples of $37$:
Let us say $abc$ is a multiple of $37$.
$$abc= 100a+10b+c\;,\tag1$$
$$bca=100b+10c+a\;.\tag2$$
Subtracting $2$ from $1$, 
$$abc-bca=100a-a+10b-100b+c-10c=99a-90b-9c=9(11a-10b-c)\;,$$
$$9(11a-10b-c)\equiv 9(-26a-10b-c)\equiv -9(26a+10b+c) \equiv -9(100a+10b+c) \equiv -9(0) \equiv 0\mod 37\;.$$
Hence, $abc-bca$ is divisible by $37$. Since, $abc$ is divisible by $37$, $bca$ should also be divisible by $37$. 
We can prove similarly that $cab$ is also always divisible by $37$ whenever $abc$ is divisible by $37$. Hence for all $abc$'s that are a multiple of $37$, $bca$ and $cab$ are a multiple of $37$. My doubt is what would be the final answer? Is it $27$?
 A: Hint $\,{\rm mod}\ 37\!:\ \color{#c00}{10^3\equiv 1}\,$ so multiplication by $10\,$ does a cyclic shift $\, abc \mapsto bca,\,$  i.e.
$$\begin{eqnarray} abc_{\:\!10} &=&\, 10^2 a +\,  10\:\!\ b + c\\[.3em]
\Longrightarrow\ 10\,abc_{\:\!10} &\equiv& \underbrace{\color{#c00}{10^3}}_{\large\color{#c00}1} a +  10^2 b + 10 c \,\equiv\, bca_{\:\!10}\end{eqnarray}\qquad$$
Therefore the problem reduces to counting the number of multiples of $\,37\,$ in the interval $\,[37000,37999].\,$ But your count is one low (a fencepost error).
A: $27$ is almost but not quite right. The first of the numbers you found is $37000$, and the last is $37999$, so there are $\frac{37999-37000}{37}+1=9\cdot\frac{111}{37}+1=28$ of them.
A shorter proof of the divisibility would have been
$$
bca=10\cdot abc-999\cdot a\equiv 10\cdot abc\mod37\;.
$$
A: I haven't used modulus so extensively but would love to read more about it because of this problem.
However, I have considered 37 to be a magical number as 37 times 3 is 111 and so all 3 digit repeat numbers are multiples of 37 like 37*3, 37*6...37*27. I ask my kids about 37*27 and when they discover that it is 999 it is lot of fun for them.
Now here, it is interesting to find answer for those who do not know mod as below:
1st 10 numbers - 000 (of course 37 will be added as prefix to all these), 111 and so on till 999
next 3 nos: start with first non-recurring no i.e. 037 and we see that the same digits provide 3 mos. i.e. 370 and 703 (but not other combinations with same digits)
next 3 nos: 074, and we find 740 and 407; 
and so on, till one realises that all multiples of 37 qualify for inclusion in this solution.
Knowing that 37*27 = 999, there are 27 solutions. and my son will tick 27 as right  answer and will forget about 000 here :)
Thanks fo rlistening. Going to 'Mod' class.
