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

Home > Numbers
West Side Story #2 (Posted on 2024-09-23) Difficulty: 3 of 5
Does B appear as the leftmost digit in the duodecimal (base 12) representation of any power of 2?

Does 9 appear as the leftmost digit in the duodecimal representation of any power of (37)12?

Is it possible to find a power of any counting number that has a given digit as its leftmost digit in the duodecimal system?

Bonus: What percentage of the powers of 2 in duodecimal system have 1 as their leftmost digit?

Note: In finding the powers of "any counting number," exclude powers of (10)12, whose leftmost digit is always 1.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution Comment 2 of 2 |
(1) 2^25 = 33554432 = B2A20A8(base 12)
(2) 37^2 = 1369 = 961(base 12)
(3) For powers of 12, all base 12 representations begin with 1.
For all other "base integers" from 2 through 50 I found some power such that every possible first digit was represented.
(Bonus)  278 of the first 1000 powers of 2 begin with 1, so approximately  .278
Charlie has shown the value to be log(2,12)

Plan:
Make a list of dictionaries where the index of the list is the integer base, e.g. 37 for powers of 37.  The 0th and 1st element of the list will be empty dictionaries.
The elements of the list are dictionaries whose keys are strings '1', '2', ... , 'A', 'B' and whose values are the power which yields the key as the first digit.
Initialize all these values to 0.  Replace with the power, when that integer_base ^ that power begins with that key (1,2,3,...,A,B).
Test:  if any value remains as 0 (other than powers of 12), then an exception has been found.

------
 {'1': 4, '2': 1, '3': 9, '4': 2, '5': 6, '6': 17, '7': 10, '8': 3, '9': 14, 'A': 7, 'B': 25

 {'1': 5, '2': 3, '3': 1, '4': 15, '5': 6, '6': 4, '7': 29, '8': 11, '9': 2, 'A': 18, 'B': 9} 

 {'1': 2, '2': 6, '3': 8, '4': 1, '5': 3, '6': 30, '7': 5, '8': 32, '9': 7, 'A': 25, 'B': 34} 

 {'1': 5, '2': 2, '3': 7, '4': 4, '5': 1, '6': 12, '7': 9, '8': 26, '9': 6, 'A': 3, 'B': 54} 

 {'1': 3, '2': 6, '3': 2, '4': 5, '5': 12, '6': 1, '7': 15, '8': 22, '9': 4, 'A': 11, 'B': 18} 

 {'1': 4, '2': 3, '3': 7, '4': 2, '5': 6, '6': 15, '7': 1, '8': 19, '9': 5, 'A': 14, 'B': 37} 

 {'1': 5, '2': 4, '3': 3, '4': 21, '5': 2, '6': 20, '7': 38, '8': 1, '9': 19, 'A': 31, 'B': 43} 

 {'1': 7, '2': 5, '3': 4, '4': 12, '5': 3, '6': 2, '7': 19, '8': 10, '9': 1, 'A': 9, 'B': 26} 

10 
 {'1': 10, '2': 8, '3': 7, '4': 5, '5': 4, '6': 3, '7': 16, '8': 2, '9': 15, 'A': 1, 'B': 14} 

11 
 {'1': 21, '2': 16, '3': 13, '4': 11, '5': 8, '6': 7, '7': 5, '8': 4, '9': 3, 'A': 2, 'B': 1} 

12 
 {'1': 1, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0, '8': 0, '9': 0, 'A': 0, 'B': 0} 

13 
 {'1': 1, '2': 9, '3': 14, '4': 18, '5': 21, '6': 23, '7': 25, '8': 26, '9': 28, 'A': 29, 'B': 30} 

14 
 {'1': 1, '2': 5, '3': 8, '4': 9, '5': 11, '6': 12, '7': 13, '8': 14, '9': 31, 'A': 15, 'B': 16} 

15 
 {'1': 1, '2': 4, '3': 5, '4': 7, '5': 8, '6': 42, '7': 9, '8': 32, '9': 10, 'A': 33, 'B': 11} 

16 
 {'1': 1, '2': 3, '3': 4, '4': 5, '5': 6, '6': 15, '7': 7, '8': 16, '9': 8, 'A': 34, 'B': 17} 

17 
 {'1': 1, '2': 2, '3': 11, '4': 4, '5': 5, '6': 34, '7': 13, '8': 6, '9': 28, 'A': 14, 'B': 7} 

18 
 {'1': 1, '2': 2, '3': 3, '4': 10, '5': 4, '6': 17, '7': 5, '8': 36, '9': 24, 'A': 12, 'B': 6} 

19 
 {'1': 1, '2': 2, '3': 3, '4': 14, '5': 9, '6': 4, '7': 26, '8': 10, '9': 5, 'A': 16, 'B': 27} 

20 
 {'1': 1, '2': 2, '3': 12, '4': 3, '5': 13, '6': 23, '7': 4, '8': 9, '9': 19, 'A': 24, 'B': 34} 

21 
 {'1': 1, '2': 6, '3': 2, '4': 7, '5': 3, '6': 21, '7': 8, '8': 26, '9': 4, 'A': 13, 'B': 31} 

22 
 {'1': 1, '2': 10, '3': 2, '4': 19, '5': 7, '6': 3, '7': 28, '8': 20, '9': 16, 'A': 8, 'B': 4} 

23 
 {'1': 1, '2': 5, '3': 2, '4': 6, '5': 14, '6': 22, '7': 3, '8': 11, '9': 34, 'A': 15, 'B': 19} 

24 
 {'1': 4, '2': 1, '3': 9, '4': 2, '5': 6, '6': 17, '7': 10, '8': 3, '9': 14, 'A': 7, 'B': 25} 

25 
 {'1': 4, '2': 1, '3': 5, '4': 2, '5': 9, '6': 6, '7': 23, '8': 13, '9': 3, 'A': 10, 'B': 27} 

26 
 {'1': 4, '2': 1, '3': 5, '4': 2, '5': 15, '6': 12, '7': 9, '8': 6, '9': 19, 'A': 3, 'B': 16} 

27 
 {'1': 10, '2': 1, '3': 17, '4': 5, '5': 2, '6': 33, '7': 24, '8': 18, '9': 12, 'A': 6, 'B': 3} 

28 
 {'1': 3, '2': 1, '3': 16, '4': 31, '5': 2, '6': 8, '7': 17, '8': 23, '9': 29, 'A': 35, 'B': 41} 

29 
 {'1': 3, '2': 1, '3': 7, '4': 13, '5': 2, '6': 5, '7': 22, '8': 8, '9': 11, 'A': 28, 'B': 14} 

30 
 {'1': 3, '2': 1, '3': 4, '4': 7, '5': 10, '6': 2, '7': 13, '8': 5, '9': 16, 'A': 8, 'B': 65} 

31 
 {'1': 3, '2': 1, '3': 4, '4': 12, '5': 7, '6': 2, '7': 10, '8': 18, '9': 5, 'A': 26, 'B': 13} 

32 
 {'1': 3, '2': 1, '3': 9, '4': 4, '5': 17, '6': 7, '7': 2, '8': 25, '9': 15, 'A': 10, 'B': 5} 

33 
 {'1': 3, '2': 1, '3': 6, '4': 4, '5': 9, '6': 19, '7': 2, '8': 7, '9': 12, 'A': 22, 'B': 27} 

34 
 {'1': 3, '2': 1, '3': 6, '4': 11, '5': 4, '6': 9, '7': 21, '8': 2, '9': 26, 'A': 7, 'B': 31} 

35 
 {'1': 5, '2': 1, '3': 8, '4': 6, '5': 41, '6': 4, '7': 32, '8': 2, '9': 16, 'A': 37, 'B': 51} 

36 
 {'1': 5, '2': 3, '3': 1, '4': 15, '5': 6, '6': 4, '7': 29, '8': 11, '9': 2, 'A': 18, 'B': 9} 

37 
 {'1': 5, '2': 3, '3': 1, '4': 8, '5': 6, '6': 26, '7': 4, '8': 24, '9': 2, 'A': 33, 'B': 11} 

38 
 {'1': 7, '2': 3, '3': 1, '4': 10, '5': 8, '6': 21, '7': 6, '8': 4, '9': 17, 'A': 2, 'B': 28} 

39 
 {'1': 9, '2': 3, '3': 1, '4': 14, '5': 12, '6': 10, '7': 8, '8': 6, '9': 4, 'A': 2, 'B': 40} 

40 
 {'1': 15, '2': 5, '3': 1, '4': 24, '5': 20, '6': 16, '7': 12, '8': 8, '9': 6, 'A': 4, 'B': 2} 

41 
 {'1': 41, '2': 11, '3': 1, '4': 64, '5': 52, '6': 40, '7': 30, '8': 22, '9': 14, 'A': 8, 'B': 2} 

42 
 {'1': 2, '2': 68, '3': 1, '4': 15, '5': 37, '6': 55, '7': 69, '8': 83, '9': 93, 'A': 103, 'B': 113} 

43 
 {'1': 2, '2': 22, '3': 1, '4': 5, '5': 11, '6': 17, '7': 21, '8': 25, '9': 29, 'A': 33, 'B': 35} 

44 
 {'1': 2, '2': 14, '3': 1, '4': 3, '5': 7, '6': 11, '7': 13, '8': 15, '9': 17, 'A': 19, 'B': 21} 

45 
 {'1': 2, '2': 10, '3': 1, '4': 3, '5': 5, '6': 7, '7': 9, '8': 11, '9': 13, 'A': 30, 'B': 15} 

46 
 {'1': 2, '2': 8, '3': 1, '4': 3, '5': 5, '6': 18, '7': 7, '8': 9, '9': 22, 'A': 11, 'B': 24} 

47 
 {'1': 2, '2': 6, '3': 1, '4': 12, '5': 3, '6': 5, '7': 16, '8': 7, '9': 18, 'A': 9, 'B': 20} 

48 
 {'1': 2, '2': 6, '3': 8, '4': 1, '5': 3, '6': 30, '7': 5, '8': 32, '9': 7, 'A': 25, 'B': 34} 

49 
 {'1': 2, '2': 6, '3': 8, '4': 1, '5': 3, '6': 19, '7': 5, '8': 28, '9': 14, 'A': 7, 'B': 30} 

50 
 {'1': 2, '2': 4, '3': 6, '4': 1, '5': 29, '6': 3, '7': 24, '8': 5, '9': 12, 'A': 26, 'B': 40} 

-----------
big = 50 
listOfDictionaries = [{} for i in range(big+1)]
for intbase, dictio in enumerate(listOfDictionaries):
    if intbase in [0,1]:
        continue
    for k in '123456789AB':
        dictio[k] = 0

for intbase in range(2,big+1):
    for power in range(1,120):
        rep12 = base2base(intbase**power,10,12)
        f = rep12[0]
        if listOfDictionaries[intbase][f] == 0:
            listOfDictionaries[intbase][f] = power

for intbase in range(2,big+1):
    print(intbase, '\n', listOfDictionaries[intbase], '\n')
    if intbase == 12:
        continue
    if 0 in listOfDictionaries[intbase].values():
        print(intbase, '**************')

  Posted by Larry on 2024-09-23 10:00:45
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 (15)
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