Alan's 3N Game

Alan and Bob are playing with numbers. Starting with the number N = 1 N=1 they take turns performing arithmetic manipulations with N N . Alan goes first and always multiplies the current number by 3 3 . Bob adds 1 1 or 2 2 to the current number, depending on a coin toss. A number is called reachable, if it can possibly appear in this game. How many reachable numbers are there between 1 1 and 1000 1000 (inclusive)?

Details and assumptions

Number 1 1 is considered reachable.

Alan's first step would be to multiply 3 to 1, getting 3, which becomes the current number. Bob then adds either 1 or 2 to the current number (which is 3), depending on the coin toss.


The answer is 94.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Arron Kau Staff
May 13, 2014

We will consider the numbers created by Alan and Bob in base 3 3 . If Bob's choices are a 1 , a 2 , . . . , a k a_1,a_2,...,a_k , then before Bob's k-th move the number is 1 a 1 a 2 . . . a k 1 0 1a_1a_2...a_{k-1}0 and after Bob's k-th move it is 1 a 1 a 2 . . . a k 1a_1a_2...a_k . Since 3 7 > 1000 3^7>1000 , the maximal length of the number is at most 7 7 . The smallest seven-digit number that can appear in the game is 1111110 1111110 . It equals 3 6 + 3 5 + 3 4 + 3 3 + 3 2 + 3 1 = 3 ( 3 6 1 ) 3 1 = 1092 > 1000 3^6+3^5+3^4+3^3+3^2+3^1=\frac{3(3^6-1)}{3-1}=1092>1000 Therefore, all reachable numbers up to 1000 1000 have six digits or less in base 3. 3. Since they only have 6 digits in base 3, they will be less than 3 6 = 729 3^6 = 729 , hence are less than 1000. The first digit is fixed at 1 1 , the second through fifth digits can be 1 1 or 2 2 and the last digit can be 0 , 0, 1 1 or 2 2 . This gives 2 4 3 2^4\cdot 3 possibilities. Similarly, there are 2 3 3 2^3\cdot 3 five-digit numbers, 2 2 3 2^2\cdot 3 four-digit numbers, 2 3 2\cdot 3 three-digit numbers, 3 3 two-digit numbers and 1 1 one-digit number ( 1 1 itself). So the grand total is 2 4 3 + 2 3 3 + 2 2 3 + 2 3 + 3 + 1 = 94 2^4\cdot 3+ 2^3\cdot 3 + 2^2\cdot 3 + 2\cdot 3 + 3 + 1=94

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...