We look at the division of 504938 by 42 
The aim is to understand the frequency of 42 in 504938.

On to step 1:
When dividing 5 by 42, we get 0 with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Include the next digit (0) from the dividend after 5, then repeat: 50 / 42

On to step 2:
If we divide 50 by 42, we get 1 and a remainder of 8.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtracting 42 from 50 leaves us with 8.
Append the next digit (4) from the dividend to 8 and continue with: 84 / 42

Let's proceed to step 3:
84 divided by 42 is 2 with a remainder of 0.
Use 2 as the next digit of our solution. 
Result so far: 12.0
Subtract 84 from 84 to get 0.
Include the next digit (9) from the dividend after 0, then repeat: 9 / 42

Step 4:
42 can be fit into 9 0 times, resulting in a remainder of 9.
The next digit of our result is 0. 
Result so far: 120.0
Subtract 0 from 9 to get 9.
Include the next digit (3) from the dividend after 9, then repeat: 93 / 42

Step 5:
When dividing 93 by 42, we get 2 with a remainder of 9.
Put 2 as the next digit of the answer. 
Result so far: 1202.0
The remainder is 9 after subtracting 84 from 93.
Include the next digit (8) from the dividend after 9, then repeat: 98 / 42

Let's proceed to step 6:
98 divided by 42 is 2 with a remainder of 14.
Use 2 as the next digit of our solution. 
Result so far: 12022.0
If we take 84 away from 98, 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.

Step 7:
42 can be fit into 140 3 times, resulting in a remainder of 14.
Put 3 as the next digit of the answer. 
Result so far: 12022.3
If we take 126 away from 140, 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:
42 can be fit into 140 3 times, resulting in a remainder of 14.
The number 3 becomes the next digit in our result. 
Result so far: 12022.33
Deduct 126 from 140 and we're left 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.

The final result is 12022.33 with a remainder of 0.014.