All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
First Digit Four (Posted on 2009-08-08) Difficulty: 2 of 5
Determine the total number of base ten positive integers having the form 2N with the first digit (from the left) being 4, where N is a positive integer < 333.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution statistics | Comment 2 of 3 |

UBASIC is much less expensive than Mathematica, and does the job.

The program tabulates, for the digits 1 through 9, their occurrence as the first digit of 2^N, for N=1 through 332. The statistics match pretty well those expected by Benford's Law.

list
    5   dim D(9)
   10   for N=1 to 332
   20     P=2^N
   30     Ps=cutspc(str(P))
   40     S=val(left(Ps,1))
   50     inc D(S)
   60   next
   70   for I=1 to 9:print I;D(I):next
OK
run
 1  99
 2  60
 3  40
 4  33
 5  27
 6  23
 7  17
 8  19
 9  14
OK


  Posted by Charlie on 2009-08-08 15:36:41
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information