Let's divide 31881274 by 542
The aim is to understand the frequency of 542 in 31881274.

On to step 1:
When dividing 3 by 542, we get 0 with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Fetch the next digit (1) from the dividend, attach it to 3 and continue: 31 / 542

Let's proceed to step 2:
If we divide 31 by 542, we get 0 and a remainder of 31.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 31 to get 31.
Fetch the next digit (8) from the dividend, attach it to 31 and continue: 318 / 542

Moving on to step 3:
542 can be fit into 318 0 times, resulting in a remainder of 318.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 318 and we're left with 318.
Bring next digit (8) of the dividend behind the 318 and repeat the process: 3188 / 542

Let's proceed to step 4:
When dividing 3188 by 542, we get 5 with a remainder of 478.
The number 5 becomes the next digit in our result. 
Result so far: 5.0
The remainder is 478 after subtracting 2710 from 3188.
Bring next digit (1) of the dividend behind the 478 and repeat the process: 4781 / 542

Let's proceed to step 5:
542 goes into 4781 8 times with a remainder of 445.
Use 8 as the next digit of our solution. 
Result so far: 58.0
The remainder is 445 after subtracting 4336 from 4781.
Include the next digit (2) from the dividend after 445, then repeat: 4452 / 542

Let's proceed to step 6:
The number 542 fits into 4452 8 times, leaving a remainder of 116.
Put 8 as the next digit of the answer. 
Result so far: 588.0
Subtract 4336 from 4452 to get 116.
Bring next digit (7) of the dividend behind the 116 and repeat the process: 1167 / 542

Advancing to step 7:
1167 divided by 542 is 2 with a remainder of 83.
Record the quotient 2 as the next digit in the result. 
Result so far: 5882.0
Deduct 1084 from 1167 and we're left with 83.
Include the next digit (4) from the dividend after 83, then repeat: 834 / 542

Going ahead to step 8:
542 goes into 834 1 times with a remainder of 292.
Write down 1 as next digit of the result. 
Result so far: 58821.0
Subtract 542 from 834 to get 292.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2920, and continue the process.

Moving on to step 9:
2920 divided by 542 is 5 with a remainder of 210.
The number 5 becomes the next digit in our result. 
Result so far: 58821.5
If we take 2710 away from 2920, we end up with 210.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2100, and continue the process.

On to step 10:
542 goes into 2100 3 times with a remainder of 474.
Use 3 as the next digit of our solution. 
Result so far: 58821.53
Subtract 1626 from 2100 to get 474.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4740, and continue the process.

Let's proceed to step 11:
542 can be fit into 4740 8 times, resulting in a remainder of 404.
Put 8 as the next digit of the answer. 
Result so far: 58821.538
Subtracting 4336 from 4740 leaves us with 404.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4040, and continue the process.

Going ahead to step 12:
The number 542 fits into 4040 7 times, leaving a remainder of 246.
Use 7 as the next digit of our solution. 
Result so far: 58821.5387
The remainder is 246 after subtracting 3794 from 4040.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2460, and continue the process.

Going ahead to step 13:
If we divide 2460 by 542, we get 4 and a remainder of 292.
Write down 4 as next digit of the result. 
Result so far: 58821.53874
If we subtract 2168 from 2460, we get 292.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2920, and continue the process.

On to step 14:
542 can be fit into 2920 5 times, resulting in a remainder of 210.
Put 5 as the next digit of the answer. 
Result so far: 58821.538745
Deduct 2710 from 2920 and we're left with 210.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2100, and continue the process.

Let's proceed to step 15:
When dividing 2100 by 542, we get 3 with a remainder of 474.
Use 3 as the next digit of our solution. 
Result so far: 58821.5387453
Deduct 1626 from 2100 and we're left with 474.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4740, and continue the process.

On to step 16:
542 goes into 4740 8 times with a remainder of 404.
The next digit of our result is 8. 
Result so far: 58821.53874538
Subtract 4336 from 4740 to get 404.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4040, and continue the process.

After the division, we end up with 58821.53874538 and a remainder of 4.04e-07.