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

Step 1:
8 divided by 31 is 0 with a remainder of 8.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Append the next digit (7) from the dividend to 8 and continue with: 87 / 31

Going ahead to step 2:
31 can be fit into 87 2 times, resulting in a remainder of 25.
Put 2 as the next digit of the answer. 
Result so far: 2.0
The remainder is 25 after subtracting 62 from 87.
Include the next digit (6) from the dividend after 25, then repeat: 256 / 31

On to step 3:
256 divided by 31 is 8 with a remainder of 8.
The next digit of our result is 8. 
Result so far: 28.0
Subtracting 248 from 256 leaves us with 8.
Take the next digit (6) from the dividend and append it to 8, then repeat: 86 / 31

Let's proceed to step 4:
The number 31 fits into 86 2 times, leaving a remainder of 24.
The number 2 becomes the next digit in our result. 
Result so far: 282.0
Deduct 62 from 86 and we're left with 24.
Append the next digit (5) from the dividend to 24 and continue with: 245 / 31

On to step 5:
If we divide 245 by 31, we get 7 and a remainder of 28.
Record the quotient 7 as the next digit in the result. 
Result so far: 2827.0
If we take 217 away from 245, we end up with 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Step 6:
280 divided by 31 is 9 with a remainder of 1.
Write down 9 as next digit of the result. 
Result so far: 2827.9
Subtracting 279 from 280 leaves us with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Moving on to step 7:
10 divided by 31 is 0 with a remainder of 10.
Record the quotient 0 as the next digit in the result. 
Result so far: 2827.9
If we take 0 away from 10, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 8:
If we divide 100 by 31, we get 3 and a remainder of 7.
Record the quotient 3 as the next digit in the result. 
Result so far: 2827.903
The remainder is 7 after subtracting 93 from 100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

On to step 9:
If we divide 70 by 31, we get 2 and a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 2827.9032
Subtracting 62 from 70 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Moving on to step 10:
31 goes into 80 2 times with a remainder of 18.
The number 2 becomes the next digit in our result. 
Result so far: 2827.90322
Deduct 62 from 80 and we're left with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Our division results in 2827.90322 with a remaining 1.8e-05.