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

Step 1:
31 goes into 3 0 times with a remainder of 3.
Use 0 as the next digit of our solution. 
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

On to step 2:
38 divided by 31 is 1 with a remainder of 7.
Write down 1 as next digit of the result. 
Result so far: 1.0
Deduct 31 from 38 and we're left with 7.
Fetch the next digit (9) from the dividend, attach it to 7 and continue: 79 / 31

Let's proceed to step 3:
If we divide 79 by 31, we get 2 and a remainder of 17.
Write down 2 as next digit of the result. 
Result so far: 12.0
If we take 62 away from 79, we end up with 17.
Take the next digit (6) from the dividend and append it to 17, then repeat: 176 / 31

On to step 4:
The number 31 fits into 176 5 times, leaving a remainder of 21.
Record the quotient 5 as the next digit in the result. 
Result so far: 125.0
If we take 155 away from 176, we end up with 21.
Append the next digit (6) from the dividend to 21 and continue with: 216 / 31

On to step 5:
If we divide 216 by 31, we get 6 and a remainder of 30.
The number 6 becomes the next digit in our result. 
Result so far: 1256.0
Subtract 186 from 216 to get 30.
Grab the next digit (4) from the dividend, add it to 30, then carry on: 304 / 31

Advancing to step 6:
31 goes into 304 9 times with a remainder of 25.
Write down 9 as next digit of the result. 
Result so far: 12569.0
If we take 279 away from 304, we end up with 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Step 7:
If we divide 250 by 31, we get 8 and a remainder of 2.
The number 8 becomes the next digit in our result. 
Result so far: 12569.8
Deduct 248 from 250 and we're left with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Moving on to step 8:
The number 31 fits into 20 0 times, leaving a remainder of 20.
The next digit of our result is 0. 
Result so far: 12569.8
Subtracting 0 from 20 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 9:
200 divided by 31 is 6 with a remainder of 14.
Record the quotient 6 as the next digit in the result. 
Result so far: 12569.806
The remainder is 14 after subtracting 186 from 200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Let's proceed to step 10:
When dividing 140 by 31, we get 4 with a remainder of 16.
Write down 4 as next digit of the result. 
Result so far: 12569.8064
Deduct 124 from 140 and we're left with 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Step 11:
When dividing 160 by 31, we get 5 with a remainder of 5.
The number 5 becomes the next digit in our result. 
Result so far: 12569.80645
If we subtract 155 from 160, we get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Step 12:
When dividing 50 by 31, we get 1 with a remainder of 19.
The next digit of our result is 1. 
Result so far: 12569.806451
Deduct 31 from 50 and we're left with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Going ahead to step 13:
31 goes into 190 6 times with a remainder of 4.
Put 6 as the next digit of the answer. 
Result so far: 12569.8064516
Deduct 186 from 190 and we're left with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Step 14:
The number 31 fits into 40 1 times, leaving a remainder of 9.
Put 1 as the next digit of the answer. 
Result so far: 12569.80645161
Subtracting 31 from 40 leaves us with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

The quotient of the division is 12569.80645161, and the remainder is 9e-09.