Let's divide 315246 by 31
The aim is to understand the frequency of 31 in 315246.

On to step 1:
3 divided by 31 is 0 with a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Bring next digit (1) of the dividend behind the 3 and repeat the process: 31 / 31

Step 2:
When dividing 31 by 31, we get 1 with a remainder of 0.
Use 1 as the next digit of our solution. 
Result so far: 1.0
The remainder is 0 after subtracting 31 from 31.
Include the next digit (5) from the dividend after 0, then repeat: 5 / 31

On to step 3:
31 can be fit into 5 0 times, resulting in a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 10.0
Subtracting 0 from 5 leaves us with 5.
Include the next digit (2) from the dividend after 5, then repeat: 52 / 31

Moving on to step 4:
When dividing 52 by 31, we get 1 with a remainder of 21.
Record the quotient 1 as the next digit in the result. 
Result so far: 101.0
Subtract 31 from 52 to get 21.
Bring next digit (4) of the dividend behind the 21 and repeat the process: 214 / 31

Advancing to step 5:
31 goes into 214 6 times with a remainder of 28.
Put 6 as the next digit of the answer. 
Result so far: 1016.0
If we take 186 away from 214, we end up with 28.
Bring next digit (6) of the dividend behind the 28 and repeat the process: 286 / 31

Step 6:
The number 31 fits into 286 9 times, leaving a remainder of 7.
The number 9 becomes the next digit in our result. 
Result so far: 10169.0
Subtracting 279 from 286 leaves us with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Moving on to step 7:
31 goes into 70 2 times with a remainder of 8.
The number 2 becomes the next digit in our result. 
Result so far: 10169.2
If we take 62 away from 70, we end up with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Moving on to step 8:
The number 31 fits into 80 2 times, leaving a remainder of 18.
The next digit of our result is 2. 
Result so far: 10169.22
The remainder is 18 after subtracting 62 from 80.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

The final outcome is 10169.22, with a leftover of 0.018.