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

Step 1:
If we divide 5 by 31, we get 0 and a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Take the next digit (8) from the dividend and append it to 5, then repeat: 58 / 31

Going ahead to step 2:
If we divide 58 by 31, we get 1 and a remainder of 27.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we take 31 away from 58, we end up with 27.
Grab the next digit (6) from the dividend, add it to 27, then carry on: 276 / 31

Advancing to step 3:
If we divide 276 by 31, we get 8 and a remainder of 28.
Put 8 as the next digit of the answer. 
Result so far: 18.0
Deduct 248 from 276 and we're left with 28.
Append the next digit (9) from the dividend to 28 and continue with: 289 / 31

On to step 4:
When dividing 289 by 31, we get 9 with a remainder of 10.
Record the quotient 9 as the next digit in the result. 
Result so far: 189.0
If we subtract 279 from 289, we get 10.
Fetch the next digit (9) from the dividend, attach it to 10 and continue: 109 / 31

Step 5:
31 can be fit into 109 3 times, resulting in a remainder of 16.
Put 3 as the next digit of the answer. 
Result so far: 1893.0
Subtract 93 from 109 to get 16.
Fetch the next digit (5) from the dividend, attach it to 16 and continue: 165 / 31

Let's proceed to step 6:
The number 31 fits into 165 5 times, leaving a remainder of 10.
Record the quotient 5 as the next digit in the result. 
Result so far: 18935.0
Subtract 155 from 165 to get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Advancing to step 7:
100 divided by 31 is 3 with a remainder of 7.
Use 3 as the next digit of our solution. 
Result so far: 18935.3
Subtract 93 from 100 to get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Advancing to step 8:
When dividing 70 by 31, we get 2 with a remainder of 8.
The next digit of our result is 2. 
Result so far: 18935.32
Subtract 62 from 70 to get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Going ahead to step 9:
80 divided by 31 is 2 with a remainder of 18.
Put 2 as the next digit of the answer. 
Result so far: 18935.322
The remainder is 18 after subtracting 62 from 80.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

In conclusion, the division gives 18935.322 with a balance of 0.0018.