Hello fellow mathematicians,

I have encountered a problem that I could not solve in Justin Stevens's book on Olympiad number theory. The question is as follows:

"Let $v(n)$ be the number of factors of $2$ in the number $n!$. What is the least value of $n$ such that $n-v(n)=1990?$"

Any help on this question would be extremely helpful as this is puzzling me greatly.

Thank you in advance.

I have been experimenting with small values of $n$ and have noticed a slow increase in the value of $n-v(n)$, and this value seems to be 1 whenever $n$ is a power of 2, and the pattern 'resets', as the value of $n-v(n)$ becomes small again.

## Best Answer

I will change the notation to standard notation such that $\nu_2(n!)$ denotes the largest power of $2$ that divides $n!$. The key here is the result that $\nu_2(n!)=n-s_2(n)$, where $s_2(n)$ denotes the sum of digits in base $2$. From there it isn't hard to finish.