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

Let's proceed to step 1:
3 divided by 31 is 0 with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Take the next digit (8) from the dividend and append it to 3, then repeat: 38 / 31

Going ahead to step 2:
31 can be fit into 38 1 times, resulting in a remainder of 7.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we subtract 31 from 38, we get 7.
Append the next digit (5) from the dividend to 7 and continue with: 75 / 31

Moving on to step 3:
The number 31 fits into 75 2 times, leaving a remainder of 13.
Put 2 as the next digit of the answer. 
Result so far: 12.0
Subtracting 62 from 75 leaves us with 13.
Bring next digit (3) of the dividend behind the 13 and repeat the process: 133 / 31

Step 4:
The number 31 fits into 133 4 times, leaving a remainder of 9.
Use 4 as the next digit of our solution. 
Result so far: 124.0
Subtracting 124 from 133 leaves us with 9.
Bring next digit (3) of the dividend behind the 9 and repeat the process: 93 / 31

Advancing to step 5:
If we divide 93 by 31, we get 3 and a remainder of 0.
Use 3 as the next digit of our solution. 
Result so far: 1243.0
If we take 93 away from 93, we end up with 0.
Fetch the next digit (1) from the dividend, attach it to 0 and continue: 1 / 31

Going ahead to step 6:
The number 31 fits into 1 0 times, leaving a remainder of 1.
Record the quotient 0 as the next digit in the result. 
Result so far: 12430.0
Subtracting 0 from 1 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.

Advancing to step 7:
31 goes into 10 0 times with a remainder of 10.
The next digit of our result is 0. 
Result so far: 12430.0
Subtract 0 from 10 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.

Going ahead to step 8:
31 goes into 100 3 times with a remainder of 7.
Put 3 as the next digit of the answer. 
Result so far: 12430.03
Subtracting 93 from 100 leaves us 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.

Step 9:
31 goes into 70 2 times with a remainder of 8.
Put 2 as the next digit of the answer. 
Result so far: 12430.032
If we take 62 away from 70, we end up 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:
When dividing 80 by 31, we get 2 with a remainder of 18.
Write down 2 as next digit of the result. 
Result so far: 12430.0322
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.

Our division results in 12430.0322 with a remaining 0.00018.