AoPSWiki
Looking for a challenging geometry text? Preparing for MATHCOUNTS or the AMC exams? Check out Art of Problem Solving's Introduction to Geometry by Richard Rusczyk.
Personal tools

1998 AHSME Problems/Problem 30

From AoPSWiki

Problem

For each positive integer n, let

a_n = \frac{(n+9)!}{(n-1)!}

Let k denote the smallest positive integer for which the rightmost nonzero digit of a_k is odd. The rightmost nonzero digit of a_k is

\mathrm{(A) \ }1 \qquad \mathrm{(B) \ }3 \qquad \mathrm{(C) \ }5 \qquad \mathrm{(D) \ } 7 \qquad \mathrm{(E) \ } 9

Solution

We have a_n = n(n+1)\dots (n+9).

The value a_n can be written as 2^{x_n} 5^{y_n} r_n, where r_n is not divisible by 2 and 5. The number of trailing zeroes is z_n = \min(x_n,y_n). The last non-zero digit is the last digit of 2^{x_n-z_n} 5^{y_n-z_n} r_n.

Clearly, the last non-zero digit is even iff x_n - z_n > 0 iff x_n > y_n.

Thus we are looking for the smallest n such that the power of 5 that divides a_n is at least equal to the power of 2 that divides a_n.

The number a_n is a product of 10 consecutive integers. Out of these, 5 are divisible by 2. Out of those 5, at least 2 are divisible by 4, and out of those 2, one is divisible by 8. Therefore x_n\geq 5+2+1=8 for all n.

On the other hand, exactly 2 of our ten integers are divisible by 5, and at most one of them can be divisible by a higher power of 5. As we need y_n\geq x_n\geq 8, one of the integers from n to n+9 must be divisible by 5^7 = 78125. Therefore n\geq 78116.

We can now take numbers starting with 78116, and write each of them in the form 2^x 5^y r. We are looking for 10 consecutive rows where the sum of ys is at least equal to the sum of xs.

 number   x  y  z
 78116    2  0  19529
 78117    0  0  78117
 78118    1  0  39059
 78119:   0  0  78119
 78120:   3  1  1953
 78121:   0  0  78121
 78122:   1  0  39061
 78123:   0  0  78123
 78124:   2  0  19531
 78125:   0  7  1
 78126:   1  0  39063

At this point we can stop, as we just found out that a_{78117} is of the form 2^8 5^8 r_{78117}. Therefore the k we seek is k=78117.

Now all we need to do is to compute the last non-zero digit. As the powers of 2 and 8 that divide a_k are equal, the last non-zero digit is simply the product of the last digits of the ten zs. This is 7\cdot 9\cdot 9\cdot 3\cdot 1\cdot 1\cdot 3\cdot 1\cdot 1\cdot 3 \equiv\boxed{9}.

See also

1998 AHSME (Problems)
Preceded by
Problem 29
Followed by
Last Question
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Looking for a challenging geometry text? Preparing for MATHCOUNTS or the AMC exams? Check out Art of Problem Solving's Introduction to Geometry by Richard Rusczyk.
© Copyright 2008 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us