Quote:
Originally Posted by CRGreathouse
But I agree, logs are a high school topic.

True, but being able to connect the dots to realize that the exact formula for the number of digits in a number of the form 2^p1 is int(log_10(2)*p+1) is not exactly what you learn when learning basic logarithms. Basic logarithmic theory would suggest that it's about log_10(2^p)=log_10(2)*p, but to recognize the problem as related to logarithms and rederive the exact formula would be a bit more difficult than you all seem to imply. And this is all assuming the OP has even learned logarithms.