We're dividing 500857 by 31 
The aim is to understand the frequency of 31 in 500857.

Moving on to step 1:
31 can be fit into 5 0 times, resulting in a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Include the next digit (0) from the dividend after 5, then repeat: 50 / 31

Moving on to step 2:
The number 31 fits into 50 1 times, leaving a remainder of 19.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtract 31 from 50 to get 19.
Take the next digit (0) from the dividend and append it to 19, then repeat: 190 / 31

On to step 3:
190 divided by 31 is 6 with a remainder of 4.
Put 6 as the next digit of the answer. 
Result so far: 16.0
If we take 186 away from 190, we end up with 4.
Take the next digit (8) from the dividend and append it to 4, then repeat: 48 / 31

Step 4:
31 can be fit into 48 1 times, resulting in a remainder of 17.
Use 1 as the next digit of our solution. 
Result so far: 161.0
Subtract 31 from 48 to get 17.
Fetch the next digit (5) from the dividend, attach it to 17 and continue: 175 / 31

Going ahead to step 5:
When dividing 175 by 31, we get 5 with a remainder of 20.
Put 5 as the next digit of the answer. 
Result so far: 1615.0
Subtract 155 from 175 to get 20.
Grab the next digit (7) from the dividend, add it to 20, then carry on: 207 / 31

Advancing to step 6:
The number 31 fits into 207 6 times, leaving a remainder of 21.
The number 6 becomes the next digit in our result. 
Result so far: 16156.0
Subtracting 186 from 207 leaves us with 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Moving on to step 7:
When dividing 210 by 31, we get 6 with a remainder of 24.
The number 6 becomes the next digit in our result. 
Result so far: 16156.6
The remainder is 24 after subtracting 186 from 210.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Moving on to step 8:
240 divided by 31 is 7 with a remainder of 23.
Put 7 as the next digit of the answer. 
Result so far: 16156.67
The remainder is 23 after subtracting 217 from 240.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Advancing to step 9:
The number 31 fits into 230 7 times, leaving a remainder of 13.
The number 7 becomes the next digit in our result. 
Result so far: 16156.677
Deduct 217 from 230 and we're left with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

After the division, we end up with 16156.677 and a remainder of 0.0013.