View Single Post
Old 2005-09-26, 06:48   #8
Dougy
 
Dougy's Avatar
 
Aug 2004
Melbourne, Australia

15210 Posts
Default

Just to clarify. Let N be any natural number. It is clear that the number of digits of N, D(N), satisfies D(N)= \left\lfloor log_{10}(N)+1\right\rfloor.

For Riesel-type numbers N=k \cdot 2^n-1 then D(N)=\left\lfloor log_{10}(N)+1\right\rfloor = \left\lfloor log_{10}(k \cdot 2^n-1)+1\right\rfloor=\left\lfloor log_{10}(k \cdot 2^n)+1\right\rfloor=\left\lfloor log_{10}(k)+ log_{10}(2^n)+1\right\rfloor=\left\lfloor log_{10}(k)+ n \cdot log_{10}(2)+1\right\rfloor, using log laws, except when k=5^n (i.e. N+1=k \cdot 2^n = 10^n) when we've overcalculated by one digit, and for this special case D(N)=\left\lfloor log_{10}(k)+ n \cdot log_{10}(2)\right\rfloor.

For Proth-type numbers, N=k \cdot 2^n+1 and D(N)= \left\lfloor log_{10}(N)+1\right\rfloor=\left\lfloor log_{10}(k \cdot 2^n+1)+1\right\rfloor=\left\lfloor log_{10}(k \cdot 2^n)+1\right\rfloor=\left\lfloor log_{10}(k)+ log_{10}(2^n)+1\right\rfloor=\left\lfloor log_{10}(k)+ n \cdot log_{10}(2)+1\right\rfloor. There are no special cases here since a special case would require N to be written 10000...000 in decimal notation, which is impossible since N is odd.
Dougy is offline