How to find the 48th multiple of 7 that contains a 7 in its decimal representation

147 Views Asked by At

So I'm doing an online puzzle and at a specific point there's a hint to find

the 48th multiple of 7 that contains a 7 in its decimal representation

How do I go into calculating something like that?

Any help would be appreciated!

1

There are 1 best solutions below

0
On BEST ANSWER

Every multiple of $7$ between $700$ and $798$ will contain a $7$. That $15$ such numbers.

Between $100a$ to $100a +99;a$ not containing a $7$ then the number $100a + 10b + c$ will be a multiple of $7$ with $7$ as a digit if $2a + 3b +c\equiv 0\pmod 7$ and $b$ or $c=7$ so either $c= 7$ and $3b \equiv -2a$ or $15b\equiv b\equiv -10a\equiv 4a$. Or $b=7$ and $c\equiv -2a\equiv 5a$.

So for:

$a=0$ we have $c=7;b=0,7$ or $b=7;c=0,7$ or $7,70,77$.

For $a= 1$ we have $c=7;b=4$ or $b=7;c=5$ or $147,175$

For $a=2$ we have $c=7;b=1,8$ or $b=7; c=3$ so $217,273,287$.

For $a=3$ we have $c=7;b=5$ or $b=7$ and $c=1,8$ so $357,371,378$

This is tedious.

The solutions to $b\equiv 4a$ (assuming $a\not \equiv 7$) will only have $2$ solutions if $4a\equiv 0,1,2\equiv 7,8,9$ or if $a\equiv 0,2,4$. And $c\equiv 5a$ will only have $2$ solution if $5a\equiv 0,1,2\equiv 7,8,9$ or $a \equiv 0,3,6$. (Other wise the solutions $x\equiv 3,4,5,6\pmod 9$ and $0\le x <10$ will have unique solutions.)

So if $a=0,2,3,4,6,9,10,11,13,16$ there we will be $3$ such multiples of $7$. At $a=1,5,8,12,15$ there will be $2$. At $a=14$ there will be $4$ And $a=7$ and $a=17$ there with be $15$.

So add them up. And $1299$ we will have had $8*3 + 15+ 4*2= 47$ such multiples.

And the multiples for $1300$ will be $c=7$ and $b\equiv 52\equiv 3$ so $1337$ or $b=7$ and $c\equiv -26\equiv 2$ so $1372$. So the $48$th is $1337$.