Number of cases #1

There is a natural number N N that satisfies the conditions below.

  • Expressing N N in heximal yields a 10 10 -digit heximal number.

  • That heximal contains only non-zero digits.

  • Every pair of neighboring digits in that heximal has a difference of 1 1 .

To clarify, I'll give you some examples.

( 1 ) . 5454323212 ( 6 ) ( 2 ) . 2321 0 1212 3 ( 6 ) ( 3 ) . 12343 42 12 1 ( 6 ) \begin{aligned} &(1).~{\color{#20A900}{5454323212}}_{(6)} \\ &(2).~2321{\color{#D61F06}{0}}12123_{(6)} \\ &(3).~12343{\color{#D61F06}{42}}121_{(6)} \end{aligned}

(1) is correct.

(2) is incorrect because there is a digit 0 0 .

(3) is incorrect because the pair of 4 , 2 4,~2 does not have a difference of 1 1 .

How many values for N N are there?


Notation: Heximal is a base 6 6 numeral system.


The answer is 648.

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

Boi (보이)
Jul 11, 2017

Reading the question, you will realize that the heximal will only contain 1 , 2 , 3 , 4 , 5 1,~2,~3,~4,~5 .

Let's define a "good" heximal, which is an n n -digit heximal that contains only non-zero digits, where every pair of neighboring digits in it has a difference of 1.

A n A_n is the number of "good" n n -digit heximals that end with either 1 1 or 5 5 .

B n B_n is the number of "good" n n -digit heximals that end with either 2 2 or 4 4 .

C n C_n is the number of "good" n n -digit heximals that end with 3 3 .

n n is a non-negative integer.

Then we know that what we're trying to get is A 10 + B 10 + C 10 A_{10}+B_{10}+C_{10} .


Then, for convenience, an n n -th digit of a number implies it is from the right.

For example, 51354 51354 's second digit is 5 5 , and fourth digit is 2 2 .

Let k k be a natural number.


i ) i) If there's 1 1 or 5 5 at the k k -th digit, the ( k 1 ) (k-1) -th digit must be 2 2 or 4 4 , therefore:

A k = B k 1 A_k=B_{k-1}


i i ) ii) If there's 2 2 at the k k -th digit, the ( k 1 ) (k-1) -th digit must be 1 1 or 3 3 , and if there's 4 4 at the k k -th digit, the ( k 1 ) (k-1) -th digit must be 3 3 or 5 5 , therefore:

B k = A k 1 + 2 C k 1 B_k=A_{k-1}+2C_{k-1}


i i i ) iii) If there's 3 3 at the k k -th digit, the ( k 1 ) (k-1) -th digit must be 2 2 or 4 4 , therefore:

C k = B k 1 C_k=B_{k-1}


From i ) i) to i i i ) iii) , we get:

B k + 1 = A k + 2 C k = B k 1 + 2 B k 1 = 3 B k 1 B 1 = 2 , B 2 = 4 B_{k+1}=A_k+2C_k=B_{k-1}+2B_{k-1}=3B_{k-1} \\ \\ B_1=2,~B_2=4


Therefore, B 2 k 1 = 2 3 k 1 B_{2k-1}=2\cdot3^{k-1} , and B 2 k = 4 3 k 1 B_{2k}=4\cdot3^{k-1} .

A n + B n + C n = B n + 2 B n 1 A_n+B_n+C_n=B_n+2B_{n-1}

A 10 + B 10 + C 10 = B 10 + 2 B 9 = 4 3 4 + 2 2 3 4 = 648 \therefore~A_{10}+B_{10}+C_{10}=B_{10}+2B_9=4\cdot3^4+2\cdot2\cdot3^4=\boxed{648} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...