CombinatoricsDifficulty 6.5National OlympiadProve itBaltic Way
Problem:
We say that an integer m covers the number 1998 if 1,9,9,8 appear in this order as digits of m. (For instance, 1998 is covered by 215993698 but not by 213326798.) Let k(n) be the number of positive integers that cover 1998 and have exactly n digits (n⩾5), all different from 0. What is the remainder of k(n) in division by 8?
Solution
Solution:
Let 1⩽g<h<i<j⩽n be fixed integers. Consider all n-digit numbers a=a1a2…an with all digits non-zero, such that ag=1, ah=9, ai=9, aj=8 and this quadruple 1998 is the leftmost one in a; that is, ⎩⎨⎧al=1al=9al=9al=8if l<g;if g<l<h;if h<l<i;if i<l<j There are kghij(n)=8g−1⋅8h−g−1⋅8i−h−1⋅8j−i−1⋅9n−j such numbers a. Obviously, kghij(n)≡1(mod8) for g=1,h=2,i=3,j=4, and kghij(n)≡0(mod8) in all other cases. Since k(n) is obtained by summing up the values of kghij(n) over all possible choices of g,h,i,j, the remainder we are looking for is 1.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.
Source: MathNet,
licensed CC-BY-4.0.
Statement reproduced verbatim; metadata (topic, difficulty) added by this project.