We're dividing 516157 by 42 
The aim is to understand the frequency of 42 in 516157.

Step 1:
If we divide 5 by 42, we get 0 and a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Fetch the next digit (1) from the dividend, attach it to 5 and continue: 51 / 42

Advancing to step 2:
51 divided by 42 is 1 with a remainder of 9.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Deduct 42 from 51 and we're left with 9.
Take the next digit (6) from the dividend and append it to 9, then repeat: 96 / 42

Step 3:
42 goes into 96 2 times with a remainder of 12.
Use 2 as the next digit of our solution. 
Result so far: 12.0
If we subtract 84 from 96, we get 12.
Grab the next digit (1) from the dividend, add it to 12, then carry on: 121 / 42

Going ahead to step 4:
The number 42 fits into 121 2 times, leaving a remainder of 37.
Write down 2 as next digit of the result. 
Result so far: 122.0
If we subtract 84 from 121, we get 37.
Include the next digit (5) from the dividend after 37, then repeat: 375 / 42

Let's proceed to step 5:
If we divide 375 by 42, we get 8 and a remainder of 39.
The number 8 becomes the next digit in our result. 
Result so far: 1228.0
Deduct 336 from 375 and we're left with 39.
Bring next digit (7) of the dividend behind the 39 and repeat the process: 397 / 42

Advancing to step 6:
The number 42 fits into 397 9 times, leaving a remainder of 19.
The number 9 becomes the next digit in our result. 
Result so far: 12289.0
If we take 378 away from 397, we end up 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.

Moving on to step 7:
190 divided by 42 is 4 with a remainder of 22.
The next digit of our result is 4. 
Result so far: 12289.4
Subtracting 168 from 190 leaves us with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Going ahead to step 8:
When dividing 220 by 42, we get 5 with a remainder of 10.
Record the quotient 5 as the next digit in the result. 
Result so far: 12289.45
If we take 210 away from 220, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

On to step 9:
If we divide 100 by 42, we get 2 and a remainder of 16.
Write down 2 as next digit of the result. 
Result so far: 12289.452
Deduct 84 from 100 and we're left with 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 10:
42 can be fit into 160 3 times, resulting in a remainder of 34.
Write down 3 as next digit of the result. 
Result so far: 12289.4523
Deduct 126 from 160 and we're left with 34.
Since there are no more digits in the dividend, we add a zero to the remainder making it 340, and continue the process.

Going ahead to step 11:
42 goes into 340 8 times with a remainder of 4.
Use 8 as the next digit of our solution. 
Result so far: 12289.45238
Subtract 336 from 340 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.

Moving on to step 12:
42 goes into 40 0 times with a remainder of 40.
Put 0 as the next digit of the answer. 
Result so far: 12289.45238
If we take 0 away from 40, we end up with 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

Step 13:
42 can be fit into 400 9 times, resulting in a remainder of 22.
Put 9 as the next digit of the answer. 
Result so far: 12289.4523809
The remainder is 22 after subtracting 378 from 400.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Advancing to step 14:
If we divide 220 by 42, we get 5 and a remainder of 10.
The number 5 becomes the next digit in our result. 
Result so far: 12289.45238095
Deduct 210 from 220 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

The quotient of the division is 12289.45238095, and the remainder is 1e-08.