All your last digit are belong to us

Logic Level 1

1 $ \square $ 2 $ \square $ 3 $ \square $ $ $ $ \square $ 100 \large{\text{1 \$\square\$ 2 \$\square\$ 3 \$\square\$ \$\ldots\$ \$\square\$ 100}}

Each square in the above expression is replaced by either a + + or a × \times . For each digit 0 , 1 , 2 , , 9 0,1,2,\ldots,9 , can it appear as the last digit of the resulting expression?

As an explicit example, replacing everything with + + gives the result 1 + 2 + + 100 = 5050 1+2+\ldots+100 = 5050 , so 0 0 can be the last digit; the question is whether all ten digits can appear by substituting the squares appropriately (of course different substitution for different digits).

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.

3 solutions

Consider S 0 = 1 × 2 × 3 × . . . × 9 + 10 + 11 × 12 × 13 × . . . × 100 = 9 ! + 10 + 100 ! 10 ! = . . . 0 + 10 + . . . 0 = . . . 0 S_0 = 1 \times 2 \times 3 \times ... \times 9 + 10 + 11 \times 12 \times 13 \times ... \times 100 = 9! + 10 + \dfrac{100!}{10!} = ...0+10+...0 = ...\color{#3D99F6}{0} . We note that 9 ! 9! ends with 0 0 , 10 10 ends with 0 0 and 100 ! 10 ! \frac{100!}{10!} also ends with 0 0 , therefore, S 0 S_0 ends with 0 0 .

Similarly,

\(\begin{array} {} \small S_1 = 1 \times 2 \times 3 \times ... \times 10 + 11 + 12 \times 13 \times 14 \times ... \times 100 = 10! + 11 + \dfrac{100!}{11!} = ...0+11+...0 = ...\color{blue}{1} & \small \text{ends with } \color{blue}{1} \\ \small S_2 = 1 \times 2 \times 3 \times ... \times 11 + 12 + 13 \times 14 \times 15 \times ... \times 100 = 11! + 12 + \dfrac{100!}{12!} = ...0+12+...0 = ...\color{blue}{2} & \small \text{ends with } \color{blue}{2} \\ \small S_3 = 1 \times 2 \times 3 \times ... \times 12 + 13 + 14 \times 15 \times 16 \times ... \times 100 = 12! + 13 + \dfrac{100!}{13!}= ...0+13+...0 = ...\color{blue}{3} & \small \text{ends with } \color{blue}{3} \\ ... & ... \\ \small S_9 = 1 \times 2 \times 3 \times ... \times 18 + 19 + 20 \times 21 \times 22 \times ... \times 100 = 18! + 19 + \dfrac{100!}{19!} = ...0+19+...0 = ...\color{blue}{9} & \small \text{ends with } \color{blue}{9} \end{array} \)

Therefore, the answer is Yes \boxed{\text{Yes}} .

Moderator note:

Oh, that's a nice simple construction!

Ivan Koswara
Nov 5, 2015

The answer is yes.

The trick is that 1 2 \ldots 1 \square \ldots 2 gives a last digit of 3 3 if it's a + + and a last digit of 2 2 if it's a × \times . Thus we can decrease the last digit by one by simply changing such + + to × \times .

Our entire expression will consist entirely of + + 's, except for some pairs of 1 2 \ldots 1 \square \ldots 2 that are filled with × \times instead. For example,

  • 1 + 2 + 3 + + 100 = 5050 1 + 2 + 3 + \ldots + 100 = 5050
  • 1 × 2 + 3 + + 100 = 5049 1 \times 2 + 3 + \ldots + 100 = 5049
  • 1 × 2 + 3 + + 10 + 11 × 12 + 13 + + 100 = 5158 1 \times 2 + 3 + \ldots + 10 + 11 \times 12 + 13 + \ldots + 100 = 5158
  • 1 × 2 + 3 + + 10 + 11 × 12 + 13 + + 20 + 21 × 22 + 23 + + 100 = 5577 1 \times 2 + 3 + \ldots + 10 + 11 \times 12 + 13 + \ldots + 20 + 21 \times 22 + 23 + \ldots + 100 = 5577

The last digit decreases by one for each × \times we insert. Since there are enough pairs ( ( 1 , 2 ) , ( 11 , 12 ) , ( 21 , 22 ) , , ( 91 , 92 ) (1,2), (11,12), (21,22), \ldots, (91,92) ), we can obtain all last digits.

Moderator note:

Nice observation of how to reduce the units digit by 1 each time.

Lu Chee Ket
Dec 9, 2015

Just like having many coins that we can get all specific figures wanted, a change of + + into × \times produces 1, 5 or 9 considered not near for each pick:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
3   2   -1
5   6   1
7   12  5
9   20  11
11  30  19
13  42  29
15  56  41
17  72  55
...

187 8742    8555
189 8930    8741
191 9120    8929
193 9312    9119
195 9506    9311
197 9702    9505
199 9900    9701

Non side by side with effective many 1, 5 and 9 are there to sufficiently able to make wanted digit of 1 to 9 from 0, and it becomes obvious and certain particularly when only one resultant digit is wanted at once.

Answer: Y e s \boxed{Yes}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...