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

Going ahead to step 1:
If we divide 9 by 31, we get 0 and a remainder of 9.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we take 0 away from 9, we end up with 9.
Fetch the next digit (7) from the dividend, attach it to 9 and continue: 97 / 31

Advancing to step 2:
The number 31 fits into 97 3 times, leaving a remainder of 4.
The number 3 becomes the next digit in our result. 
Result so far: 3.0
If we take 93 away from 97, we end up with 4.
Fetch the next digit (0) from the dividend, attach it to 4 and continue: 40 / 31

Going ahead to step 3:
When dividing 40 by 31, we get 1 with a remainder of 9.
Put 1 as the next digit of the answer. 
Result so far: 31.0
The remainder is 9 after subtracting 31 from 40.
Append the next digit (3) from the dividend to 9 and continue with: 93 / 31

Let's proceed to step 4:
If we divide 93 by 31, we get 3 and a remainder of 0.
Put 3 as the next digit of the answer. 
Result so far: 313.0
Deduct 93 from 93 and we're left with 0.
Fetch the next digit (5) from the dividend, attach it to 0 and continue: 5 / 31

On to step 5:
5 divided by 31 is 0 with a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 3130.0
If we subtract 0 from 5, we get 5.
Take the next digit (6) from the dividend and append it to 5, then repeat: 56 / 31

Step 6:
The number 31 fits into 56 1 times, leaving a remainder of 25.
Record the quotient 1 as the next digit in the result. 
Result so far: 31301.0
The remainder is 25 after subtracting 31 from 56.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Advancing to step 7:
31 can be fit into 250 8 times, resulting in a remainder of 2.
Use 8 as the next digit of our solution. 
Result so far: 31301.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.

Step 8:
31 goes into 20 0 times with a remainder of 20.
Put 0 as the next digit of the answer. 
Result so far: 31301.8
Subtract 0 from 20 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 9:
31 can be fit into 200 6 times, resulting in a remainder of 14.
Write down 6 as next digit of the result. 
Result so far: 31301.806
Deduct 186 from 200 and we're left with 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

On to step 10:
The number 31 fits into 140 4 times, leaving a remainder of 16.
Record the quotient 4 as the next digit in the result. 
Result so far: 31301.8064
Subtracting 124 from 140 leaves us 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.

On to step 11:
31 can be fit into 160 5 times, resulting in a remainder of 5.
Use 5 as the next digit of our solution. 
Result so far: 31301.80645
Subtracting 155 from 160 leaves us with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Going ahead to step 12:
When dividing 50 by 31, we get 1 with a remainder of 19.
Record the quotient 1 as the next digit in the result. 
Result so far: 31301.806451
The remainder is 19 after subtracting 31 from 50.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Step 13:
If we divide 190 by 31, we get 6 and a remainder of 4.
Put 6 as the next digit of the answer. 
Result so far: 31301.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.

Let's proceed to step 14:
If we divide 40 by 31, we get 1 and a remainder of 9.
Use 1 as the next digit of our solution. 
Result so far: 31301.80645161
If we take 31 away from 40, we end up 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.

In conclusion, the division gives 31301.80645161 with a balance of 9e-09.