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

On to step 1:
31 can be fit into 5 0 times, resulting in a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Append the next digit (2) from the dividend to 5 and continue with: 52 / 31

Step 2:
31 goes into 52 1 times with 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.
Fetch the next digit (5) from the dividend, attach it to 21 and continue: 215 / 31

Let's proceed to step 3:
31 goes into 215 6 times with a remainder of 29.
Write down 6 as next digit of the result. 
Result so far: 16.0
Subtract 186 from 215 to get 29.
Include the next digit (2) from the dividend after 29, then repeat: 292 / 31

Step 4:
31 goes into 292 9 times with a remainder of 13.
Put 9 as the next digit of the answer. 
Result so far: 169.0
Deduct 279 from 292 and we're left with 13.
Grab the next digit (3) from the dividend, add it to 13, then carry on: 133 / 31

Step 5:
31 can be fit into 133 4 times, resulting in a remainder of 9.
The number 4 becomes the next digit in our result. 
Result so far: 1694.0
Subtracting 124 from 133 leaves us with 9.
Grab the next digit (1) from the dividend, add it to 9, then carry on: 91 / 31

Moving on to step 6:
The number 31 fits into 91 2 times, leaving a remainder of 29.
Record the quotient 2 as the next digit in the result. 
Result so far: 16942.0
If we take 62 away from 91, we end up with 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Moving on to step 7:
If we divide 290 by 31, we get 9 and a remainder of 11.
The number 9 becomes the next digit in our result. 
Result so far: 16942.9
Subtracting 279 from 290 leaves us with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Advancing to step 8:
If we divide 110 by 31, we get 3 and a remainder of 17.
The number 3 becomes the next digit in our result. 
Result so far: 16942.93
Subtract 93 from 110 to get 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Moving on to step 9:
170 divided by 31 is 5 with a remainder of 15.
The number 5 becomes the next digit in our result. 
Result so far: 16942.935
If we subtract 155 from 170, we get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Going ahead to step 10:
31 can be fit into 150 4 times, resulting in a remainder of 26.
Put 4 as the next digit of the answer. 
Result so far: 16942.9354
If we subtract 124 from 150, we get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Let's proceed to step 11:
The number 31 fits into 260 8 times, leaving a remainder of 12.
Write down 8 as next digit of the result. 
Result so far: 16942.93548
Subtracting 248 from 260 leaves us with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Going ahead to step 12:
31 goes into 120 3 times with a remainder of 27.
The number 3 becomes the next digit in our result. 
Result so far: 16942.935483
If we take 93 away from 120, we end up with 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Step 13:
270 divided by 31 is 8 with a remainder of 22.
Put 8 as the next digit of the answer. 
Result so far: 16942.9354838
If we subtract 248 from 270, we 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.

Advancing to step 14:
When dividing 220 by 31, we get 7 with a remainder of 3.
Write down 7 as next digit of the result. 
Result so far: 16942.93548387
If we subtract 217 from 220, we get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

The quotient of the division is 16942.93548387, and the remainder is 3e-09.