I am using this method. Click for method.
However, I keep getting the wrong answer. I need to find for what $n$ does $n!$ end in 37 trailing zeros. I have used the above method but with one more term $a_3$ and found that $a_1=0, a_2=1, a_3=1$ are the only solutions, then you add $a_0\in\{0,1,2,3,4\}$. I keep getting 30 up to 34 as the answers. The answer is supposed to be 150 to 154. The answer I had gotten is $$a_1+6a_2+31a_3=37$$
I really appreciate everyone taking their time to provide full answers, but I am more interested in where I have gone wrong. I am trying to figure out where I have gone wrong. Is it because I found the answer to be 30, but I am in base 5, so I need to multiply buy 5?
Edit: I see where I have gone wrong.
After finding the values of $a_1=0, a_2=1, a_3=1$, I went back and plugged them in. But what I did was plug them into: $$a_0+5a_1+25a_2$$ $$\Rightarrow 5(1)+25(1)=30+a_0 $$ But what I should have done was this $$a_0+5a_1+25a_2+125a_3$$ $$\Rightarrow a_0+5(0)+25(1)+125(1)$$ $$\Rightarrow n=150+a_0$$ $$\Rightarrow n=\{150,151,152,153,154\}$$