We look at the division of 396976 by 38 
The aim is to understand the frequency of 38 in 396976.

On to step 1:
3 divided by 38 is 0 with a remainder of 3.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Append the next digit (9) from the dividend to 3 and continue with: 39 / 38

Going ahead to step 2:
When dividing 39 by 38, we get 1 with a remainder of 1.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Deduct 38 from 39 and we're left with 1.
Fetch the next digit (6) from the dividend, attach it to 1 and continue: 16 / 38

On to step 3:
38 goes into 16 0 times with a remainder of 16.
The number 0 becomes the next digit in our result. 
Result so far: 10.0
If we take 0 away from 16, we end up with 16.
Grab the next digit (9) from the dividend, add it to 16, then carry on: 169 / 38

Let's proceed to step 4:
38 can be fit into 169 4 times, resulting in a remainder of 17.
The next digit of our result is 4. 
Result so far: 104.0
If we subtract 152 from 169, we get 17.
Fetch the next digit (7) from the dividend, attach it to 17 and continue: 177 / 38

Going ahead to step 5:
If we divide 177 by 38, we get 4 and a remainder of 25.
The next digit of our result is 4. 
Result so far: 1044.0
Deduct 152 from 177 and we're left with 25.
Fetch the next digit (6) from the dividend, attach it to 25 and continue: 256 / 38

On to step 6:
When dividing 256 by 38, we get 6 with a remainder of 28.
Record the quotient 6 as the next digit in the result. 
Result so far: 10446.0
If we take 228 away from 256, we end up with 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

On to step 7:
The number 38 fits into 280 7 times, leaving a remainder of 14.
Write down 7 as next digit of the result. 
Result so far: 10446.7
Subtracting 266 from 280 leaves us 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 8:
140 divided by 38 is 3 with a remainder of 26.
Use 3 as the next digit of our solution. 
Result so far: 10446.73
Subtract 114 from 140 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.

Step 9:
38 can be fit into 260 6 times, resulting in a remainder of 32.
Use 6 as the next digit of our solution. 
Result so far: 10446.736
If we subtract 228 from 260, we get 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

On to step 10:
38 goes into 320 8 times with a remainder of 16.
The number 8 becomes the next digit in our result. 
Result so far: 10446.7368
If we subtract 304 from 320, 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.

Moving on to step 11:
160 divided by 38 is 4 with a remainder of 8.
Write down 4 as next digit of the result. 
Result so far: 10446.73684
If we subtract 152 from 160, we get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Moving on to step 12:
38 goes into 80 2 times with a remainder of 4.
Use 2 as the next digit of our solution. 
Result so far: 10446.736842
Subtracting 76 from 80 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.

Let's proceed to step 13:
38 can be fit into 40 1 times, resulting in a remainder of 2.
Use 1 as the next digit of our solution. 
Result so far: 10446.7368421
Subtract 38 from 40 to get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

On to step 14:
The number 38 fits into 20 0 times, leaving a remainder of 20.
The next digit of our result is 0. 
Result so far: 10446.7368421
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.

The quotient of the division is 10446.7368421, and the remainder is 2e-08.