Let's divide 983161 by 42
The aim is to understand the frequency of 42 in 983161.

Going ahead to step 1:
If we divide 9 by 42, we get 0 and a remainder of 9.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 9 to get 9.
Include the next digit (8) from the dividend after 9, then repeat: 98 / 42

Let's proceed to step 2:
42 goes into 98 2 times with a remainder of 14.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
Subtract 84 from 98 to get 14.
Take the next digit (3) from the dividend and append it to 14, then repeat: 143 / 42

Going ahead to step 3:
If we divide 143 by 42, we get 3 and a remainder of 17.
The number 3 becomes the next digit in our result. 
Result so far: 23.0
The remainder is 17 after subtracting 126 from 143.
Include the next digit (1) from the dividend after 17, then repeat: 171 / 42

Advancing to step 4:
The number 42 fits into 171 4 times, leaving a remainder of 3.
Write down 4 as next digit of the result. 
Result so far: 234.0
Subtracting 168 from 171 leaves us with 3.
Grab the next digit (6) from the dividend, add it to 3, then carry on: 36 / 42

Going ahead to step 5:
The number 42 fits into 36 0 times, leaving a remainder of 36.
Write down 0 as next digit of the result. 
Result so far: 2340.0
Deduct 0 from 36 and we're left with 36.
Append the next digit (1) from the dividend to 36 and continue with: 361 / 42

Step 6:
When dividing 361 by 42, we get 8 with a remainder of 25.
The next digit of our result is 8. 
Result so far: 23408.0
Subtract 336 from 361 to get 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Moving on to step 7:
The number 42 fits into 250 5 times, leaving a remainder of 40.
The next digit of our result is 5. 
Result so far: 23408.5
The remainder is 40 after subtracting 210 from 250.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

Step 8:
When dividing 400 by 42, we get 9 with a remainder of 22.
Write down 9 as next digit of the result. 
Result so far: 23408.59
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 9:
220 divided by 42 is 5 with a remainder of 10.
The next digit of our result is 5. 
Result so far: 23408.595
Subtracting 210 from 220 leaves us 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.

Step 10:
100 divided by 42 is 2 with a remainder of 16.
Use 2 as the next digit of our solution. 
Result so far: 23408.5952
If we take 84 away from 100, we end up 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.

On to step 11:
42 goes into 160 3 times with a remainder of 34.
The next digit of our result is 3. 
Result so far: 23408.59523
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.

Step 12:
42 can be fit into 340 8 times, resulting in a remainder of 4.
Write down 8 as next digit of the result. 
Result so far: 23408.595238
If we subtract 336 from 340, we 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.

Let's proceed to step 13:
If we divide 40 by 42, we get 0 and a remainder of 40.
Write down 0 as next digit of the result. 
Result so far: 23408.595238
If we subtract 0 from 40, we get 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 14:
42 goes into 400 9 times with a remainder of 22.
Use 9 as the next digit of our solution. 
Result so far: 23408.59523809
If we subtract 378 from 400, we get 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

The final outcome is 23408.59523809, with a leftover of 2.2e-08.