We look at the division of 315677 by 31 
The aim is to understand the frequency of 31 in 315677.

Moving on to step 1:
31 can be fit into 3 0 times, resulting in a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Take the next digit (1) from the dividend and append it to 3, then repeat: 31 / 31

Moving on to step 2:
31 divided by 31 is 1 with a remainder of 0.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we take 31 away from 31, we end up with 0.
Grab the next digit (5) from the dividend, add it to 0, then carry on: 5 / 31

Moving on to step 3:
When dividing 5 by 31, we get 0 with a remainder of 5.
The next digit of our result is 0. 
Result so far: 10.0
If we take 0 away from 5, we end up with 5.
Append the next digit (6) from the dividend to 5 and continue with: 56 / 31

Advancing to step 4:
When dividing 56 by 31, we get 1 with a remainder of 25.
Write down 1 as next digit of the result. 
Result so far: 101.0
If we take 31 away from 56, we end up with 25.
Grab the next digit (7) from the dividend, add it to 25, then carry on: 257 / 31

Let's proceed to step 5:
The number 31 fits into 257 8 times, leaving a remainder of 9.
Put 8 as the next digit of the answer. 
Result so far: 1018.0
Subtract 248 from 257 to get 9.
Take the next digit (7) from the dividend and append it to 9, then repeat: 97 / 31

Moving on to step 6:
31 can be fit into 97 3 times, resulting in a remainder of 4.
The number 3 becomes the next digit in our result. 
Result so far: 10183.0
Deduct 93 from 97 and we're left with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Moving on to step 7:
31 goes into 40 1 times with a remainder of 9.
Record the quotient 1 as the next digit in the result. 
Result so far: 10183.1
If we take 31 away from 40, we end up with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Let's proceed to step 8:
31 goes into 90 2 times with a remainder of 28.
Write down 2 as next digit of the result. 
Result so far: 10183.12
Deduct 62 from 90 and we're left with 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Let's proceed to step 9:
31 can be fit into 280 9 times, resulting in a remainder of 1.
The next digit of our result is 9. 
Result so far: 10183.129
If we take 279 away from 280, we end up with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Going ahead to step 10:
The number 31 fits into 10 0 times, leaving a remainder of 10.
Use 0 as the next digit of our solution. 
Result so far: 10183.129
Deduct 0 from 10 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Step 11:
31 can be fit into 100 3 times, resulting in a remainder of 7.
Use 3 as the next digit of our solution. 
Result so far: 10183.12903
If we subtract 93 from 100, we get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Advancing to step 12:
If we divide 70 by 31, we get 2 and a remainder of 8.
Write down 2 as next digit of the result. 
Result so far: 10183.129032
Subtract 62 from 70 to get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 13:
31 goes into 80 2 times with a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 10183.1290322
Deduct 62 from 80 and we're left with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Our division results in 10183.1290322 with a remaining 1.8e-07.