51. If in a certain six-digit number the leftmost digit 7 is moved to the end of the number, the resulting number is 5 times smaller than the original. Find the original number.

18
51. From the condition, it follows that when dividing the original six-digit number, starting with the digit 7, by 5, we get a six-digit number ending with the digit 7. Therefore, in the resulting number, the leftmost digit will be 1, and in the original number, the rightmost digit will be 5 (since the number is divisible by 5). We have $1 * * * * 7 \cdot 5=7 * * * * 5$. The second rightmost digit in the number $1 * * * * 7$ will be 5, as this is the rightmost digit of the original number. Then $1 * * * 57 \cdot 5=7 * * * 85$. We get the third rightmost digit 8, and then $1 * * 857 \cdot 5=7 * * 285$. We get the fourth rightmost digit 2, and then $1 * 2857 \cdot 5=7 * 4285$. Finally, we get the digit between 1 and 2 as 4: $142857 \cdot 5=714285$. Thus, the original number is 714285.