**Solution to MP65**

**January 2007 **

**The problem:**

The number 5·7^{34} has a great many digits in its decimal representation. Without evaluating those digits, prove that some digit occurs at least four times in the number.

Our problem was adapted from a problem for advanced 10 and 11-year-old pupils in Czechoslovakia. We received correct solutions from:

Gérard Billion (France) |
Farid Lian (Columbia) |

Dan Dima (Romania) |
Marc Lichtenberg (France) |

Lou Cairoli (USA) |
Matthew Lim (USA) |

Philippe Fondanaiche (France) |
Jean-Luc Luyet (Switzerland) |

H.N. Gupta (Regina) |
Mark Pilloff (USA) |

Xavier Hecquet (France) |
Heri Setiyawan (Indonesia) |

Wolfgang Kais (Germany) |
Jayavel Sounderpandian (internet) |

Steve La Rocque (Regina) |
William Volterman (Ontario) |

Almost all solvers first determined the number of digits of 5·7^{34} using base-10 logarithms: Our calculator tells us that log10(5·7^{34}) = 29.43... , whence the decimal representation of the number has exactly 30 digits. If, to the contrary, none of its digits were to occur four or more times, then each digit would have to occur exactly three times. The sum of the digits would then be a multiple of 3, in which case the number itself would be a multiple of 3. Since the only prime divisors of 5·7^{34} are 5 and 7, we conclude that 3 cannot divide the number, so our assumption must have been wrong — at least one of the digits would have to occur four or more times.

In fact, a few curious correspondents sent us the actual decimal representation of the number:

5·7^{34} = 270584780189760558344798304245,

so some digits (namely 4 and 8) even occur five times!

Three correspondents — Dima, Hecquet, and Gupta — rose to the challenge of working without a calculator. While Dima showed by simple hand computations that the number has exactly 30 digits, all one needs here is that it has *at least* 30 digits. (When the number of digits exceeds 30, the pigeonhole principle says that at least one digit must occur more than three times.) We will show you Gupta's approach because he shows quite a bit more, namely

10^{10n — 1} < 5·7^{12n – 2}.
(*)

To prove this inequality, note first that

10^{–1} < 5·7^{–2} and 10^{5} < 7^{6}.

[The first just tells us that 50 > 49; Hecquet argued for the second that 7^{6} = 7^{3} · 7^{3} = 343·343 > 300·(333.333...) = 10^{5}.] Raise the right-hand inequality to the power 2*n* to get 10^{10n} < 7^{12n} , then multiply by the left inequality to prove (*). Setting n = 3 in (*) gives us 10^{29} < 5·7^{34}, which says that the number has at least 30 digits, as we found earlier by calculator. More generally, (*) tells us that

and so on up to n = 7, after which the estimate is no longer precise enough for producing a nontrivial result.

Finally, note that because *k*(0 + 1 + ... + 9) is divisible by 9, together with the fact that 29 < log(*k*·7^{34}) < 30 for 2 ≤ *k* ≤ 8 (so that *k*·7^{34} has exactly 30 digits), the 5 in the original problem can be replaced by any integer from 2 to 8.