In this long divsion:
142857
_________
7 | 1000000
7
----
30
28
----
20
14
----
60
56
----
40
35
----
50
the top line gives the decimal expansion of $1/7$. If we read the numbers that form the remainders, we get 3, 2, 6, 4, 5, 1, which happens to be $3^k\mod 7$. Can someone explain please?
$10\equiv 3 \bmod 7$. The values appearing are in fact $10^k \bmod 7$ as you effectively increase the power of 10 you are looking at down the division.