Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Suppose you have a number $n^m$. Is there a way to figure out how many 1s it contains "easily"? For large numbers, this probably means you do this without computing the value. What about 2s, or other digits?

Are there specific values of n, m for which you can (e.g. n is prime)?

This question arose when I was working on a recreational maths problem. At one point it was necessary to count how many 1s there are in a large prime power but I could not see how to do this without a calculator.

share|improve this question
1  
I'm pretty sure there isn't a way. at least not for all numbers. –  Jorge Fernández Mar 17 '13 at 1:23
    
If your $n$ isn't divisible by $10$, I'd try using Euler's theorem for $10^k$ for each $k$th digit. –  Alexander Gruber Mar 17 '13 at 4:55
1  
If I were asked to do this, I'd give $\frac{m \times \log n}{10}$, as the answer, and hope that gods of probability are on my side :) –  xylon97 Mar 17 '13 at 12:27

1 Answer 1

up vote 1 down vote accepted

To give you some idea of how hard this kind of problem is, $2^{86}=77371252455336267181195264$ is conjectured to be the greatest power of $2$ whose decimal representation has no zeros, but no one knows how to prove this. See this entry at the Online Encyclopedia of Integer Sequences.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.