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

Advancing to step 1:
If we divide 7 by 31, we get 0 and a remainder of 7.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 7 leaves us with 7.
Fetch the next digit (0) from the dividend, attach it to 7 and continue: 70 / 31

Going ahead to step 2:
31 goes into 70 2 times with a remainder of 8.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
The remainder is 8 after subtracting 62 from 70.
Take the next digit (7) from the dividend and append it to 8, then repeat: 87 / 31

Advancing to step 3:
When dividing 87 by 31, we get 2 with a remainder of 25.
The number 2 becomes the next digit in our result. 
Result so far: 22.0
Subtracting 62 from 87 leaves us with 25.
Append the next digit (6) from the dividend to 25 and continue with: 256 / 31

Step 4:
256 divided by 31 is 8 with a remainder of 8.
Use 8 as the next digit of our solution. 
Result so far: 228.0
The remainder is 8 after subtracting 248 from 256.
Append the next digit (3) from the dividend to 8 and continue with: 83 / 31

Going ahead to step 5:
If we divide 83 by 31, we get 2 and a remainder of 21.
The number 2 becomes the next digit in our result. 
Result so far: 2282.0
Subtract 62 from 83 to get 21.
Bring next digit (8) of the dividend behind the 21 and repeat the process: 218 / 31

Moving on to step 6:
31 can be fit into 218 7 times, resulting in a remainder of 1.
The next digit of our result is 7. 
Result so far: 22827.0
The remainder is 1 after subtracting 217 from 218.
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.
Record the quotient 0 as the next digit in the result. 
Result so far: 22827.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.

Moving on to step 8:
If we divide 100 by 31, we get 3 and a remainder of 7.
Put 3 as the next digit of the answer. 
Result so far: 22827.03
The remainder is 7 after subtracting 93 from 100.
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 9:
The number 31 fits into 70 2 times, leaving a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 22827.032
Deduct 62 from 70 and we're left 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.

On to step 10:
When dividing 80 by 31, we get 2 with a remainder of 18.
The next digit of our result is 2. 
Result so far: 22827.0322
Subtract 62 from 80 to get 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 22827.0322, and the remainder is 0.00018.