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

Going ahead to step 1:
3 divided by 31 is 0 with a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Append the next digit (5) from the dividend to 3 and continue with: 35 / 31

Advancing to step 2:
35 divided by 31 is 1 with a remainder of 4.
Put 1 as the next digit of the answer. 
Result so far: 1.0
The remainder is 4 after subtracting 31 from 35.
Include the next digit (7) from the dividend after 4, then repeat: 47 / 31

Step 3:
The number 31 fits into 47 1 times, leaving a remainder of 16.
Record the quotient 1 as the next digit in the result. 
Result so far: 11.0
Deduct 31 from 47 and we're left with 16.
Take the next digit (4) from the dividend and append it to 16, then repeat: 164 / 31

Moving on to step 4:
31 can be fit into 164 5 times, resulting in a remainder of 9.
Write down 5 as next digit of the result. 
Result so far: 115.0
Subtract 155 from 164 to get 9.
Include the next digit (5) from the dividend after 9, then repeat: 95 / 31

On to step 5:
31 can be fit into 95 3 times, resulting in a remainder of 2.
Write down 3 as next digit of the result. 
Result so far: 1153.0
Subtracting 93 from 95 leaves us 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 6:
The number 31 fits into 20 0 times, leaving a remainder of 20.
The next digit of our result is 0. 
Result so far: 1153.0
If we subtract 0 from 20, we 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 7:
If we divide 200 by 31, we get 6 and a remainder of 14.
The number 6 becomes the next digit in our result. 
Result so far: 1153.06
If we take 186 away from 200, we end up 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.

Moving on to step 8:
31 goes into 140 4 times with a remainder of 16.
The number 4 becomes the next digit in our result. 
Result so far: 1153.064
The remainder is 16 after subtracting 124 from 140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Moving on to step 9:
When dividing 160 by 31, we get 5 with a remainder of 5.
The next digit of our result is 5. 
Result so far: 1153.0645
Subtract 155 from 160 to 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.

Advancing to step 10:
When dividing 50 by 31, we get 1 with a remainder of 19.
The number 1 becomes the next digit in our result. 
Result so far: 1153.06451
If we subtract 31 from 50, we get 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Step 11:
When dividing 190 by 31, we get 6 with a remainder of 4.
Put 6 as the next digit of the answer. 
Result so far: 1153.064516
Subtracting 186 from 190 leaves us 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.

Advancing to step 12:
31 can be fit into 40 1 times, resulting in a remainder of 9.
The next digit of our result is 1. 
Result so far: 1153.0645161
Subtract 31 from 40 to get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

On to step 13:
31 can be fit into 90 2 times, resulting in a remainder of 28.
Record the quotient 2 as the next digit in the result. 
Result so far: 1153.06451612
The remainder is 28 after subtracting 62 from 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

The final outcome is 1153.06451612, with a leftover of 2.8e-08.