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

Advancing to step 1:
If we divide 3 by 31, we get 0 and a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Include the next digit (6) from the dividend after 3, then repeat: 36 / 31

Moving on to step 2:
The number 31 fits into 36 1 times, leaving a remainder of 5.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Deduct 31 from 36 and we're left with 5.
Include the next digit (5) from the dividend after 5, then repeat: 55 / 31

Going ahead to step 3:
31 goes into 55 1 times with a remainder of 24.
Write down 1 as next digit of the result. 
Result so far: 11.0
Subtracting 31 from 55 leaves us with 24.
Bring next digit (7) of the dividend behind the 24 and repeat the process: 247 / 31

Advancing to step 4:
247 divided by 31 is 7 with a remainder of 30.
Use 7 as the next digit of our solution. 
Result so far: 117.0
If we take 217 away from 247, we end up with 30.
Grab the next digit (5) from the dividend, add it to 30, then carry on: 305 / 31

Going ahead to step 5:
If we divide 305 by 31, we get 9 and a remainder of 26.
Put 9 as the next digit of the answer. 
Result so far: 1179.0
Subtracting 279 from 305 leaves us with 26.
Append the next digit (6) from the dividend to 26 and continue with: 266 / 31

Advancing to step 6:
When dividing 266 by 31, we get 8 with a remainder of 18.
Put 8 as the next digit of the answer. 
Result so far: 11798.0
If we subtract 248 from 266, we 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.

Step 7:
31 can be fit into 180 5 times, resulting in a remainder of 25.
Use 5 as the next digit of our solution. 
Result so far: 11798.5
If we take 155 away from 180, 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.

Moving on to step 8:
31 goes into 250 8 times with a remainder of 2.
Record the quotient 8 as the next digit in the result. 
Result so far: 11798.58
The remainder is 2 after subtracting 248 from 250.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Let's proceed to step 9:
The number 31 fits into 20 0 times, leaving a remainder of 20.
Use 0 as the next digit of our solution. 
Result so far: 11798.58
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.

Advancing to step 10:
The number 31 fits into 200 6 times, leaving a remainder of 14.
Record the quotient 6 as the next digit in the result. 
Result so far: 11798.5806
If we subtract 186 from 200, we get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Going ahead to step 11:
31 can be fit into 140 4 times, resulting in a remainder of 16.
Record the quotient 4 as the next digit in the result. 
Result so far: 11798.58064
If we subtract 124 from 140, we get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Let's proceed to step 12:
31 goes into 160 5 times with a remainder of 5.
Put 5 as the next digit of the answer. 
Result so far: 11798.580645
If we take 155 away from 160, we end up 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 13:
31 can be fit into 50 1 times, resulting in a remainder of 19.
The next digit of our result is 1. 
Result so far: 11798.5806451
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.

Step 14:
31 goes into 190 6 times with a remainder of 4.
Write down 6 as next digit of the result. 
Result so far: 11798.58064516
Subtract 186 from 190 to get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Our division results in 11798.58064516 with a remaining 4e-09.