510746 divided by 31 
The aim is to understand the frequency of 31 in 510746.

On to step 1:
When dividing 5 by 31, we get 0 with a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Append the next digit (1) from the dividend to 5 and continue with: 51 / 31

On to step 2:
31 goes into 51 1 times with a remainder of 20.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we take 31 away from 51, we end up with 20.
Append the next digit (0) from the dividend to 20 and continue with: 200 / 31

Going ahead to step 3:
The number 31 fits into 200 6 times, leaving a remainder of 14.
Use 6 as the next digit of our solution. 
Result so far: 16.0
Subtract 186 from 200 to get 14.
Take the next digit (7) from the dividend and append it to 14, then repeat: 147 / 31

Step 4:
If we divide 147 by 31, we get 4 and a remainder of 23.
Use 4 as the next digit of our solution. 
Result so far: 164.0
If we subtract 124 from 147, we get 23.
Grab the next digit (4) from the dividend, add it to 23, then carry on: 234 / 31

Step 5:
31 goes into 234 7 times with a remainder of 17.
Use 7 as the next digit of our solution. 
Result so far: 1647.0
Subtracting 217 from 234 leaves us with 17.
Fetch the next digit (6) from the dividend, attach it to 17 and continue: 176 / 31

On to step 6:
If we divide 176 by 31, we get 5 and a remainder of 21.
The next digit of our result is 5. 
Result so far: 16475.0
Subtract 155 from 176 to get 21.
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 7:
31 can be fit into 210 6 times, resulting in a remainder of 24.
Record the quotient 6 as the next digit in the result. 
Result so far: 16475.6
If we subtract 186 from 210, we get 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Going ahead to step 8:
If we divide 240 by 31, we get 7 and a remainder of 23.
Use 7 as the next digit of our solution. 
Result so far: 16475.67
Deduct 217 from 240 and we're left 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.

Moving on to step 9:
If we divide 230 by 31, we get 7 and a remainder of 13.
Record the quotient 7 as the next digit in the result. 
Result so far: 16475.677
If we take 217 away from 230, we end up 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.

After the division, we end up with 16475.677 and a remainder of 0.0013.