# Interrelationship between power of 2 and integer length

1. Oct 31, 2013

### Nile3

Hello, I was wondering if someone knew the equation which describe the exact or statistical relation between the length(# of digits) of a power of 2 based on it's power.

I plotted 200 of the powers in mathematica and I get a fairly straightforward staircase plot. I'm just wondering what's the rule here.

2. Oct 31, 2013

### R136a1

The length of an integer $x$ in basis 10 is given by $\lfloor\log_{10}(x)\rfloor+1$, where the strange brackets denote the largest integer smaller or equal than $x$. So if $x=2^n$, then the length is

$$\lfloor \log_{10}(2^n)\rfloor + 1 \sim n\log_{10}(2) + 1$$

3. Oct 31, 2013

### JanEnClaesen

If the number of digits of a number increases linearly, the number increases exponentially; if the exponent of a number increases linearly, the number increases exponentially. Basically you've plotted the implicit function 10^y = 2^x.

y/x = b is a constant because the equation 2 = 10^b has one root. To estimate b consider 2^10 = 1024 and 10^3 = 1000.

Last edited: Oct 31, 2013
4. Nov 7, 2013

### Nile3

n * (memorize 0.3 as log[10,2]) +1, excellent, thanks!