TITLE: Proving number of digits d to represent integer n in base B?
QUESTION [7 upvotes]: I am interested in learning about proofs for discrete mathematics. One recurring fact I find in the literature is that 

the number of digits $d$ required to represent integer $N$ in base $B$ is  $\log_B{n}$

I am unhappy with this on two fronts. The first is that no source I have come across actually proves this claim. The second, I do not think the claim is true, and I am trying to prove this in a few ways but am finding slightly different results.
If we have a $d$ digit string in base $B$, this is an element of the set $\{0,1,\dots,B-1\}^{d}$ which has $B^d$ elements. This means we can represent exactly $0,1,\dots,B^{d}-1$ using $d$ digits; solving for $N$ gives $d=\lceil \log_B{(N+1)}\rceil$.
An alternative way to see this is that the largest integer we can represent is $\sum_{i=0}^{d-1}(B-1)*B^i$, which is also $B^d-1$ and gives the same result.
Why then, do sources describe this as $\log_B(n)$? An alternative representation that is equally confusing is $\lfloor\log_BN\rfloor+1$; this requires a proof that $$\lfloor\log_BN\rfloor+1 = \lceil \log_B{(N+1)}\rceil$$
which I cannot seem to resolve; unless I am on the wrong track entirely.

REPLY [2 votes]: This is what I use for this calculation, supposing a to be in it's base 10 representation, and we wish to determine the digits of it's base b representation, we can compute this as follows:
Start with the Kronecker delta:
$$\delta \left( x,y \right) =\cases{1&$x=y$\cr 0&$x\neq y$\cr}\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\quad\quad\quad\quad\quad\quad\text{                             (1)}$$
The computation of the digits of a number 'a' in base 'b' can be done in a computable integer sequence, in that we already know the exact length of the sequence which is of course the number of digits in total. The expression for this computation is:
$$d_{{n}} \left( a,b \right) =\sum _{k=1}^{ \Bigl\lfloor
 {\frac {
\ln  \left( a \right) }{\ln  \left( b \right) }}\Bigr\rfloor +1} \left( 
\delta \left( n,k \right) -b\delta \left( n,k+1 \right)  \right) 
 \Bigl\lfloor{a{b}^{k-  {\Bigl\lfloor\frac {\ln  \left( a\right)
  }{\ln  \left( b \right) }\Bigr\rfloor}  -1}} \Bigr\rfloor
\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$$
For example,
$a=12345$
in base $b=10:$ will, evaluate to the arithmetic progression with initial value of 1 and d=1 of length 5:
$$\left\{ d_{{1}} \left( 12345,10 \right) ,d_{{2}} \left( 12345,10
 \right) ,d_{{3}} \left( 12345,10 \right) ,d_{{4}} \left( 12345,10
 \right) ,d_{{5}} \left( 12345,10 \right)  \right\} = \left\{ 1,2,3,4,
5 \right\} 
$$
As far as proof that the number of digits that are needed to represent a number in another base, say b=2, the value $\Bigl\lfloor\frac {\ln  \left( n\right)
  }{\ln  \left( b \right) }\Bigr\rfloor+1$ is the same thing as the floor of $\log_B(n) +1$.So whatever resource simply stated $\log_B(n)$ is wrong. But I am unclear as to what you mean by the statement "Solving for N gives $d=\operatorname{ceil}(\log_B(N+1))$". If you can demonstrate this part, then I think that effectively serves as proof for what you are asking.