We look at the division of 122487 by 31 
The aim is to understand the frequency of 31 in 122487.

Advancing to step 1:
31 can be fit into 1 0 times, resulting in a remainder of 1.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 1 after subtracting 0 from 1.
Append the next digit (2) from the dividend to 1 and continue with: 12 / 31

Moving on to step 2:
12 divided by 31 is 0 with a remainder of 12.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 12 leaves us with 12.
Take the next digit (2) from the dividend and append it to 12, then repeat: 122 / 31

Let's proceed to step 3:
31 goes into 122 3 times with a remainder of 29.
The next digit of our result is 3. 
Result so far: 3.0
If we subtract 93 from 122, we get 29.
Grab the next digit (4) from the dividend, add it to 29, then carry on: 294 / 31

Going ahead to step 4:
31 goes into 294 9 times with a remainder of 15.
The next digit of our result is 9. 
Result so far: 39.0
If we take 279 away from 294, we end up with 15.
Fetch the next digit (8) from the dividend, attach it to 15 and continue: 158 / 31

Let's proceed to step 5:
31 can be fit into 158 5 times, resulting in a remainder of 3.
Put 5 as the next digit of the answer. 
Result so far: 395.0
The remainder is 3 after subtracting 155 from 158.
Take the next digit (7) from the dividend and append it to 3, then repeat: 37 / 31

Step 6:
If we divide 37 by 31, we get 1 and a remainder of 6.
Record the quotient 1 as the next digit in the result. 
Result so far: 3951.0
Subtracting 31 from 37 leaves us 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.

Advancing to step 7:
When dividing 60 by 31, we get 1 with a remainder of 29.
Record the quotient 1 as the next digit in the result. 
Result so far: 3951.1
Subtracting 31 from 60 leaves us 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.

Step 8:
31 can be fit into 290 9 times, resulting in a remainder of 11.
Put 9 as the next digit of the answer. 
Result so far: 3951.19
If we take 279 away from 290, we end up 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.

Moving on to step 9:
The number 31 fits into 110 3 times, leaving a remainder of 17.
The number 3 becomes the next digit in our result. 
Result so far: 3951.193
Subtracting 93 from 110 leaves us 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.

Let's proceed to step 10:
The number 31 fits into 170 5 times, leaving a remainder of 15.
Use 5 as the next digit of our solution. 
Result so far: 3951.1935
Deduct 155 from 170 and we're left with 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

On to step 11:
31 can be fit into 150 4 times, resulting in a remainder of 26.
The number 4 becomes the next digit in our result. 
Result so far: 3951.19354
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.

Going ahead to step 12:
31 can be fit into 260 8 times, resulting in a remainder of 12.
The number 8 becomes the next digit in our result. 
Result so far: 3951.193548
The remainder is 12 after subtracting 248 from 260.
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 13:
If we divide 120 by 31, we get 3 and a remainder of 27.
The next digit of our result is 3. 
Result so far: 3951.1935483
Subtract 93 from 120 to 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.

Going ahead to step 14:
When dividing 270 by 31, we get 8 with a remainder of 22.
The number 8 becomes the next digit in our result. 
Result so far: 3951.19354838
If we take 248 away from 270, we end up 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.

The final result is 3951.19354838 with a remainder of 2.2e-08.