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

Advancing to step 1:
The number 31 fits into 5 0 times, leaving 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.
Grab the next digit (2) from the dividend, add it to 5, then carry on: 52 / 31

Moving on to step 2:
If we divide 52 by 31, we get 1 and a remainder of 21.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we take 31 away from 52, we end up with 21.
Include the next digit (1) from the dividend after 21, then repeat: 211 / 31

Let's proceed to step 3:
31 goes into 211 6 times with a remainder of 25.
The next digit of our result is 6. 
Result so far: 16.0
If we subtract 186 from 211, we get 25.
Bring next digit (1) of the dividend behind the 25 and repeat the process: 251 / 31

On to step 4:
When dividing 251 by 31, we get 8 with a remainder of 3.
Put 8 as the next digit of the answer. 
Result so far: 168.0
Deduct 248 from 251 and we're left with 3.
Take the next digit (6) from the dividend and append it to 3, then repeat: 36 / 31

Advancing to step 5:
36 divided by 31 is 1 with a remainder of 5.
Put 1 as the next digit of the answer. 
Result so far: 1681.0
If we take 31 away from 36, we end up with 5.
Take the next digit (8) from the dividend and append it to 5, then repeat: 58 / 31

Advancing to step 6:
The number 31 fits into 58 1 times, leaving a remainder of 27.
Put 1 as the next digit of the answer. 
Result so far: 16811.0
If we subtract 31 from 58, we get 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Advancing to step 7:
When dividing 270 by 31, we get 8 with a remainder of 22.
Put 8 as the next digit of the answer. 
Result so far: 16811.8
Subtract 248 from 270 to get 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Step 8:
31 goes into 220 7 times with a remainder of 3.
The number 7 becomes the next digit in our result. 
Result so far: 16811.87
The remainder is 3 after subtracting 217 from 220.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Step 9:
When dividing 30 by 31, we get 0 with a remainder of 30.
Record the quotient 0 as the next digit in the result. 
Result so far: 16811.87
Subtracting 0 from 30 leaves us with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Moving on to step 10:
31 goes into 300 9 times with a remainder of 21.
Put 9 as the next digit of the answer. 
Result so far: 16811.8709
The remainder is 21 after subtracting 279 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Let's proceed to step 11:
210 divided by 31 is 6 with a remainder of 24.
The number 6 becomes the next digit in our result. 
Result so far: 16811.87096
Deduct 186 from 210 and we're left with 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Step 12:
240 divided by 31 is 7 with a remainder of 23.
The next digit of our result is 7. 
Result so far: 16811.870967
If we take 217 away from 240, we end up with 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

On to step 13:
If we divide 230 by 31, we get 7 and a remainder of 13.
The number 7 becomes the next digit in our result. 
Result so far: 16811.8709677
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.

The final result is 16811.8709677 with a remainder of 1.3e-07.