Sevens Are Everywhere

The number 7 7 appears everywhere. There are 7 7 days in a week, 7 7 wonders of the ancient world, and 7 7 continents on the planet earth.

If a positive integer less than or equal to n n is chosen randomly, the probability that it contains a 7 7 in it's decimal expansion is p n . p_n. As n n grows large, what does p n p_n approach?


The answer is 1.

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

It's easier to first look at the percentage of integers that do not contain any 7 7 's and then take the complement.

For n n -digit positive integers, n 1 , n \ge 1, without 7 7 's allowed we have 8 8 choices for the first digit and 9 9 choices for (any) subsequent digits. So for the 1 0 n 1 10^{n} - 1 positive integers with n n or fewer digits,

8 + 8 9 + 8 9 9 + . . . . . + 8 9 n 1 = 8 9 n 1 9 1 = 9 n 1 8 + 8*9 + 8*9*9 + ..... + 8*9^{n-1} = 8*\dfrac{9^{n} - 1}{9 - 1} = 9^{n} - 1

of them contain no 7 7 's. Thus the desired percentage is

A = 1 lim n 9 n 1 1 0 n 1 . A = 1 - \lim_{n \rightarrow \infty} \dfrac{9^{n} - 1}{10^{n} - 1}.

But this last limit goes to ( 9 10 ) n \left(\dfrac{9}{10}\right)^{n} and thus 0 0 as n , n \rightarrow \infty, so A A goes to 1 \boxed{1} in the limit.

What this means is that, from a probability standpoint, "almost all" positive integers contain at least one 7 , 7, (the same of which can be said for any of the digits 1 1 through 9 9 .) Yet another weird result thanks to our friend . \infty. :)

Question: Can the same be said for any finite string of digits? What about any infinite string of digits?

A very nice and simple solution to a problem which at first,looked daunting!Thank you sir!+1

Adarsh Kumar - 5 years, 9 months ago

Log in to reply

Thanks, Adarsh. Counting the complement is so often the best approach with problems like these. :)

Brian Charlesworth - 5 years, 9 months ago

Hi Brian! There's no problem with the first 1-9 integers having only one 7 as digit. The problem goes to the subsequent digits, how about 70,71,72, 701, 702,703 and so on or integers starting from digit # 7? The subsequent integers don't just contain 1-integer having atleast one 7 of its digits.

Rene Dela Cerna - 5 years, 9 months ago

Log in to reply

Yes, it can be tricky to count the integers with at least one 7 7 directly, which is why I chose to count the complement, i.e., those numbers that contain no 7 7 's. It makes for a much cleaner approach. Counting directly would require one to use inclusion/exclusion so as to avoid double-counting.

Brian Charlesworth - 5 years, 9 months ago

Log in to reply

i too came up with the same result. :)

Halbert Joshi - 5 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...