We look at the division of 981787 by 4 
The aim is to understand the frequency of 4 in 981787.

On to step 1:
9 divided by 4 is 2 with a remainder of 1.
Write down 2 as next digit of the result. 
Result so far: 2.0
If we subtract 8 from 9, we get 1.
Bring next digit (8) of the dividend behind the 1 and repeat the process: 18 / 4

On to step 2:
When dividing 18 by 4, we get 4 with a remainder of 2.
Record the quotient 4 as the next digit in the result. 
Result so far: 24.0
If we subtract 16 from 18, we get 2.
Append the next digit (1) from the dividend to 2 and continue with: 21 / 4

Step 3:
4 can be fit into 21 5 times, resulting in a remainder of 1.
Record the quotient 5 as the next digit in the result. 
Result so far: 245.0
Subtracting 20 from 21 leaves us with 1.
Bring next digit (7) of the dividend behind the 1 and repeat the process: 17 / 4

On to step 4:
17 divided by 4 is 4 with a remainder of 1.
Write down 4 as next digit of the result. 
Result so far: 2454.0
Deduct 16 from 17 and we're left with 1.
Bring next digit (8) of the dividend behind the 1 and repeat the process: 18 / 4

Let's proceed to step 5:
If we divide 18 by 4, we get 4 and a remainder of 2.
The next digit of our result is 4. 
Result so far: 24544.0
If we subtract 16 from 18, we get 2.
Fetch the next digit (7) from the dividend, attach it to 2 and continue: 27 / 4

Going ahead to step 6:
If we divide 27 by 4, we get 6 and a remainder of 3.
Record the quotient 6 as the next digit in the result. 
Result so far: 245446.0
Subtract 24 from 27 to get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Moving on to step 7:
If we divide 30 by 4, we get 7 and a remainder of 2.
Put 7 as the next digit of the answer. 
Result so far: 245446.7
The remainder is 2 after subtracting 28 from 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Going ahead to step 8:
When dividing 20 by 4, we get 5 with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 245446.75
If we subtract 20 from 20, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 9:
0 divided by 4 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 245446.75
Subtracting 0 from 0 leaves us with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

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

In conclusion, the division gives 245446.75 with a balance of 0.0.