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

On to step 1:
The number 31 fits into 6 0 times, leaving a remainder of 6.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 6, we get 6.
Grab the next digit (8) from the dividend, add it to 6, then carry on: 68 / 31

Let's proceed to step 2:
31 can be fit into 68 2 times, resulting in a remainder of 6.
Put 2 as the next digit of the answer. 
Result so far: 2.0
If we take 62 away from 68, we end up with 6.
Take the next digit (4) from the dividend and append it to 6, then repeat: 64 / 31

Going ahead to step 3:
31 can be fit into 64 2 times, resulting in a remainder of 2.
The next digit of our result is 2. 
Result so far: 22.0
If we subtract 62 from 64, we get 2.
Fetch the next digit (3) from the dividend, attach it to 2 and continue: 23 / 31

Advancing to step 4:
31 can be fit into 23 0 times, resulting in a remainder of 23.
Put 0 as the next digit of the answer. 
Result so far: 220.0
The remainder is 23 after subtracting 0 from 23.
Include the next digit (9) from the dividend after 23, then repeat: 239 / 31

Advancing to step 5:
31 goes into 239 7 times with a remainder of 22.
Put 7 as the next digit of the answer. 
Result so far: 2207.0
The remainder is 22 after subtracting 217 from 239.
Fetch the next digit (7) from the dividend, attach it to 22 and continue: 227 / 31

Moving on to step 6:
The number 31 fits into 227 7 times, leaving a remainder of 10.
The next digit of our result is 7. 
Result so far: 22077.0
Subtract 217 from 227 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.

Moving on to step 7:
When dividing 100 by 31, we get 3 with a remainder of 7.
Record the quotient 3 as the next digit in the result. 
Result so far: 22077.3
If we take 93 away from 100, we end up 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.

Moving on to step 8:
The number 31 fits into 70 2 times, leaving a remainder of 8.
Write down 2 as next digit of the result. 
Result so far: 22077.32
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.

Moving on to step 9:
If we divide 80 by 31, we get 2 and a remainder of 18.
The next digit of our result is 2. 
Result so far: 22077.322
If we take 62 away from 80, we end up 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 final outcome is 22077.322, with a leftover of 0.0018.