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

On to step 1:
If we divide 9 by 31, we get 0 and a remainder of 9.
The next digit of our result is 0. 
Result so far: 0.0
If we subtract 0 from 9, we get 9.
Fetch the next digit (8) from the dividend, attach it to 9 and continue: 98 / 31

On to step 2:
98 divided by 31 is 3 with a remainder of 5.
The next digit of our result is 3. 
Result so far: 3.0
If we take 93 away from 98, we end up with 5.
Fetch the next digit (5) from the dividend, attach it to 5 and continue: 55 / 31

Moving on to step 3:
31 can be fit into 55 1 times, resulting in a remainder of 24.
Put 1 as the next digit of the answer. 
Result so far: 31.0
The remainder is 24 after subtracting 31 from 55.
Bring next digit (8) of the dividend behind the 24 and repeat the process: 248 / 31

Moving on to step 4:
The number 31 fits into 248 8 times, leaving a remainder of 0.
Write down 8 as next digit of the result. 
Result so far: 318.0
Deduct 248 from 248 and we're left with 0.
Grab the next digit (1) from the dividend, add it to 0, then carry on: 1 / 31

Going ahead to step 5:
If we divide 1 by 31, we get 0 and a remainder of 1.
Use 0 as the next digit of our solution. 
Result so far: 3180.0
The remainder is 1 after subtracting 0 from 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Step 6:
When dividing 10 by 31, we get 0 with a remainder of 10.
Record the quotient 0 as the next digit in the result. 
Result so far: 3180.0
Subtracting 0 from 10 leaves us 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.

Step 7:
When dividing 100 by 31, we get 3 with a remainder of 7.
Use 3 as the next digit of our solution. 
Result so far: 3180.03
Deduct 93 from 100 and we're left with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Let's proceed to step 8:
The number 31 fits into 70 2 times, leaving a remainder of 8.
The number 2 becomes the next digit in our result. 
Result so far: 3180.032
The remainder is 8 after subtracting 62 from 70.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 9:
31 goes into 80 2 times with a remainder of 18.
Put 2 as the next digit of the answer. 
Result so far: 3180.0322
Subtracting 62 from 80 leaves us 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.

The quotient of the division is 3180.0322, and the remainder is 0.00018.