We're dividing 380197 by 31 
The aim is to understand the frequency of 31 in 380197.

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
Deduct 0 from 3 and we're left with 3.
Fetch the next digit (8) from the dividend, attach it to 3 and continue: 38 / 31

Going ahead to step 2:
When dividing 38 by 31, we get 1 with a remainder of 7.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Subtracting 31 from 38 leaves us with 7.
Take the next digit (0) from the dividend and append it to 7, then repeat: 70 / 31

Moving on to step 3:
The number 31 fits into 70 2 times, leaving a remainder of 8.
Record the quotient 2 as the next digit in the result. 
Result so far: 12.0
Deduct 62 from 70 and we're left with 8.
Fetch the next digit (1) from the dividend, attach it to 8 and continue: 81 / 31

On to step 4:
If we divide 81 by 31, we get 2 and a remainder of 19.
The number 2 becomes the next digit in our result. 
Result so far: 122.0
Subtract 62 from 81 to get 19.
Include the next digit (9) from the dividend after 19, then repeat: 199 / 31

Let's proceed to step 5:
199 divided by 31 is 6 with a remainder of 13.
The number 6 becomes the next digit in our result. 
Result so far: 1226.0
The remainder is 13 after subtracting 186 from 199.
Grab the next digit (7) from the dividend, add it to 13, then carry on: 137 / 31

On to step 6:
If we divide 137 by 31, we get 4 and a remainder of 13.
Use 4 as the next digit of our solution. 
Result so far: 12264.0
Subtract 124 from 137 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.

Let's proceed to step 7:
31 can be fit into 130 4 times, resulting in a remainder of 6.
The next digit of our result is 4. 
Result so far: 12264.4
If we subtract 124 from 130, we get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Going ahead to step 8:
The number 31 fits into 60 1 times, leaving a remainder of 29.
Write down 1 as next digit of the result. 
Result so far: 12264.41
If we take 31 away from 60, we end up with 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Moving on to step 9:
When dividing 290 by 31, we get 9 with a remainder of 11.
Put 9 as the next digit of the answer. 
Result so far: 12264.419
Subtract 279 from 290 to get 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Moving on to step 10:
31 can be fit into 110 3 times, resulting in a remainder of 17.
Record the quotient 3 as the next digit in the result. 
Result so far: 12264.4193
The remainder is 17 after subtracting 93 from 110.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Advancing to step 11:
170 divided by 31 is 5 with a remainder of 15.
Put 5 as the next digit of the answer. 
Result so far: 12264.41935
The remainder is 15 after subtracting 155 from 170.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Moving on to step 12:
31 goes into 150 4 times with a remainder of 26.
The next digit of our result is 4. 
Result so far: 12264.419354
Subtract 124 from 150 to get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Going ahead to step 13:
When dividing 260 by 31, we get 8 with a remainder of 12.
The number 8 becomes the next digit in our result. 
Result so far: 12264.4193548
Deduct 248 from 260 and we're left with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 14:
31 can be fit into 120 3 times, resulting in a remainder of 27.
The number 3 becomes the next digit in our result. 
Result so far: 12264.41935483
Subtract 93 from 120 to get 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

After the division, we end up with 12264.41935483 and a remainder of 2.7e-08.