366351 divided by 31 
The aim is to understand the frequency of 31 in 366351.

Step 1:
31 goes into 3 0 times with a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Include the next digit (6) from the dividend after 3, then repeat: 36 / 31

Let's proceed 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.
Append the next digit (6) from the dividend to 5 and continue with: 56 / 31

Let's proceed to step 3:
56 divided by 31 is 1 with a remainder of 25.
Put 1 as the next digit of the answer. 
Result so far: 11.0
If we subtract 31 from 56, we get 25.
Take the next digit (3) from the dividend and append it to 25, then repeat: 253 / 31

Step 4:
When dividing 253 by 31, we get 8 with a remainder of 5.
Use 8 as the next digit of our solution. 
Result so far: 118.0
If we subtract 248 from 253, we get 5.
Include the next digit (5) from the dividend after 5, then repeat: 55 / 31

Moving on to step 5:
When dividing 55 by 31, we get 1 with a remainder of 24.
Put 1 as the next digit of the answer. 
Result so far: 1181.0
If we subtract 31 from 55, we get 24.
Fetch the next digit (1) from the dividend, attach it to 24 and continue: 241 / 31

Going ahead to step 6:
31 can be fit into 241 7 times, resulting in a remainder of 24.
Put 7 as the next digit of the answer. 
Result so far: 11817.0
Subtracting 217 from 241 leaves us with 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Advancing to step 7:
31 goes into 240 7 times with a remainder of 23.
Record the quotient 7 as the next digit in the result. 
Result so far: 11817.7
Deduct 217 from 240 and we're left with 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Going ahead to step 8:
The number 31 fits into 230 7 times, leaving a remainder of 13.
Use 7 as the next digit of our solution. 
Result so far: 11817.77
Subtract 217 from 230 to get 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

The final outcome is 11817.77, with a leftover of 0.013.