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

Going ahead to step 1:
5 divided by 31 is 0 with a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Include the next digit (1) from the dividend after 5, then repeat: 51 / 31

On to step 2:
The number 31 fits into 51 1 times, leaving a remainder of 20.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Deduct 31 from 51 and we're left with 20.
Take the next digit (0) from the dividend and append it to 20, then repeat: 200 / 31

Going ahead to step 3:
31 can be fit into 200 6 times, resulting in a remainder of 14.
Record the quotient 6 as the next digit in the result. 
Result so far: 16.0
The remainder is 14 after subtracting 186 from 200.
Take the next digit (2) from the dividend and append it to 14, then repeat: 142 / 31

On to step 4:
When dividing 142 by 31, we get 4 with a remainder of 18.
Write down 4 as next digit of the result. 
Result so far: 164.0
Subtract 124 from 142 to get 18.
Append the next digit (9) from the dividend to 18 and continue with: 189 / 31

Step 5:
31 goes into 189 6 times with a remainder of 3.
Put 6 as the next digit of the answer. 
Result so far: 1646.0
Subtracting 186 from 189 leaves us with 3.
Fetch the next digit (7) from the dividend, attach it to 3 and continue: 37 / 31

Moving on to step 6:
If we divide 37 by 31, we get 1 and a remainder of 6.
Write down 1 as next digit of the result. 
Result so far: 16461.0
Deduct 31 from 37 and we're left with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Let's proceed to step 7:
31 can be fit into 60 1 times, resulting in a remainder of 29.
The number 1 becomes the next digit in our result. 
Result so far: 16461.1
Subtract 31 from 60 to get 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Going ahead to step 8:
If we divide 290 by 31, we get 9 and a remainder of 11.
Use 9 as the next digit of our solution. 
Result so far: 16461.19
Subtract 279 from 290 to get 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Step 9:
If we divide 110 by 31, we get 3 and a remainder of 17.
Put 3 as the next digit of the answer. 
Result so far: 16461.193
Deduct 93 from 110 and we're left with 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 10:
170 divided by 31 is 5 with a remainder of 15.
Write down 5 as next digit of the result. 
Result so far: 16461.1935
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.

Advancing to step 11:
150 divided by 31 is 4 with a remainder of 26.
Put 4 as the next digit of the answer. 
Result so far: 16461.19354
The remainder is 26 after subtracting 124 from 150.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Advancing to step 12:
31 goes into 260 8 times with a remainder of 12.
The next digit of our result is 8. 
Result so far: 16461.193548
If we subtract 248 from 260, we get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 13:
31 can be fit into 120 3 times, resulting in a remainder of 27.
The next digit of our result is 3. 
Result so far: 16461.1935483
If we subtract 93 from 120, 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.

Step 14:
The number 31 fits into 270 8 times, leaving a remainder of 22.
Write down 8 as next digit of the result. 
Result so far: 16461.19354838
Deduct 248 from 270 and we're left with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

After the division, we end up with 16461.19354838 and a remainder of 2.2e-08.