The problem is as follows:
Julia enumerated consecutevely the $204$ pages of her diary, starting from $1$, excluding those numbers where the digits $1$ and $7$ appear together in any order. For example, the numbers $17$ and $117$ did not appear in her journal, however $107$ appears in her diary. Using this information, what was the number you wrote on the last page of your journal?
The alternatives are as follows:
$\begin{array}{cc} 1.&\textrm{219 pages} \\ 2.&\textrm{199 pages}\\ 3.&\textrm{200 pages} \\ 4.&\textrm{218 pages} \\ \end{array}$
I'm confused how to assess this problem. So far what I have found is that in he given conditions it seems that the only numbers not allowed between 1 to 204 would be:
$\textrm{11, 17, 71, 77, 117, 117}$
these account for six digits.
Since the number of pages in her diary is $204$ then this would mean that this number would be displaced to the right by six units asuming that those pages are excluded and she would write the inmediate number following, so when she reaches $10$, the next page would be $12$.
Then this would mean that is $204+6=210$. But this doesn't appear in the alternatives. Did I made some mistake or something?. Can someone help me here please?.
Count by cases based on the number of digits:
$\bullet$ Only such two-digit numbers are $17$ and $71$.
$\bullet$ For three-digit numbers, consider those containing $17$. These are $117, 170,171,172,...179$.
That gives a total of $\mathbf{13}$ such numbers, and so the last page would be numbered $204+13= 217$, had $217$ been permissible. Instead, it would be assigned the next number, i.e. $\color{blue}{218}$.