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

Home > Numbers
Powers often in other bases. (Posted on 2013-04-07) Difficulty: 3 of 5
Create a table of powers of 10 in binary starting with 101 = 10102 then create a similar table in base 5 starting with 101 = 205.

If you look at the lengths of the numbers in the two tables combined, prove there is exactly one each of length 2, 3, 4...

No Solution Yet Submitted by Jer    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Hints/Tips Tables: no proof except for 2,3,4,...,67 | Comment 1 of 3

This does not provide a general proof, but obviously proves for lengths 2,3,4,...,67.

base 10        base 2                                       base 5
10            1010                                         20
100           1100100                                      400
1000          1111101000                                   13000
10000         10011100010000                               310000
100000        11000011010100000                            11200000
1000000       11110100001001000000                         224000000
10000000      100110001001011010000000                     10030000000
100000000     101111101011110000100000000                  201100000000
1000000000    111011100110101100101000000000               4022000000000
10000000000   1001010100000010111110010000000000           130440000000000
100000000000  1011101001000011101101110100000000000        3114300000000000
1000000000000 1110100011010100101001010001000000000000     112341000000000000
Lengths:                                                            length
                                         representational length   missed by
                                              base 2   base 5       base 5
                                             
10                                                4         2         1
100                                               7         3
1000                                              10        5         4
10000                                             14        6
100000                                            17        8         7
1000000                                           20        9
10000000                                          24        11        10
100000000                                         27        12
1000000000                                        30        13
10000000000                                       34        15        14
100000000000                                      37        16
1000000000000                                     40        18        17
10000000000000                                    44        19
100000000000000                                   47        21        20
1000000000000000                                  50        22
10000000000000000                                 54        23
100000000000000000                                57        25        24
1000000000000000000                               60        26
10000000000000000000                              64        28        27
100000000000000000000                             67        29
1000000000000000000000                            70        31        30
10000000000000000000000                           74        32
100000000000000000000000                          77        33
1000000000000000000000000                         80        35        34
10000000000000000000000000                        84        36
100000000000000000000000000                       87        38        37
1000000000000000000000000000                      90        39
10000000000000000000000000000                     94        41        40
100000000000000000000000000000                    97        42
1000000000000000000000000000000                   100       43
10000000000000000000000000000000                  103       45        44
100000000000000000000000000000000                 107       46
1000000000000000000000000000000000                110       48        47
10000000000000000000000000000000000               113       49
100000000000000000000000000000000000              117       51        50
1000000000000000000000000000000000000             120       52
10000000000000000000000000000000000000            123       53
100000000000000000000000000000000000000           127       55        54
1000000000000000000000000000000000000000          130       56
10000000000000000000000000000000000000000         133       58        57
100000000000000000000000000000000000000000        137       59
1000000000000000000000000000000000000000000       140       61        60
10000000000000000000000000000000000000000000      143       62
100000000000000000000000000000000000000000000     147       63
1000000000000000000000000000000000000000000000    150       65        64
10000000000000000000000000000000000000000000000   153       66
100000000000000000000000000000000000000000000000  157       68        67

So up through 67, the lengths missed by the base-5 representations match those found in the base-2 representations.

   10   cls
   20 
   30   Pw=10
   40   while Pw<1000000000000000000000000000000000000000000000000
   45     Pl=L:L=len(fnCv$(Pw,5))
   50     print Pw;tab(50);len(fnCv$(Pw,2));tab(60);L;
   55     if L>Pl+2 then print "*";
   56     if L>Pl+1 then print Pl+1:else print
   60     Pw=Pw*10
   70   wend
   80   end
   90   fnCv$(N,B)
  100     R=N:V$=""
  110     while R>0
  120       Q=int(R/B):R=R-Q*B
  130       V$=cutspc(str(R))+V$
  140       R=Q
  150     wend
  160   return(V$)

 


  Posted by Charlie on 2013-04-07 12:18:07
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (19)
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