509013 divided by 4 
The aim is to understand the frequency of 4 in 509013.

Step 1:
If we divide 5 by 4, we get 1 and a remainder of 1.
Use 1 as the next digit of our solution. 
Result so far: 1.0
The remainder is 1 after subtracting 4 from 5.
Grab the next digit (0) from the dividend, add it to 1, then carry on: 10 / 4

Advancing to step 2:
10 divided by 4 is 2 with a remainder of 2.
Write down 2 as next digit of the result. 
Result so far: 12.0
Deduct 8 from 10 and we're left with 2.
Append the next digit (9) from the dividend to 2 and continue with: 29 / 4

Moving on to step 3:
4 goes into 29 7 times with a remainder of 1.
The next digit of our result is 7. 
Result so far: 127.0
Subtracting 28 from 29 leaves us with 1.
Append the next digit (0) from the dividend to 1 and continue with: 10 / 4

On to step 4:
4 goes into 10 2 times with a remainder of 2.
Write down 2 as next digit of the result. 
Result so far: 1272.0
If we take 8 away from 10, we end up with 2.
Include the next digit (1) from the dividend after 2, then repeat: 21 / 4

Advancing to step 5:
4 goes into 21 5 times with a remainder of 1.
The next digit of our result is 5. 
Result so far: 12725.0
The remainder is 1 after subtracting 20 from 21.
Grab the next digit (3) from the dividend, add it to 1, then carry on: 13 / 4

Let's proceed to step 6:
4 can be fit into 13 3 times, resulting in a remainder of 1.
The next digit of our result is 3. 
Result so far: 127253.0
Deduct 12 from 13 and we're left with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

On to step 7:
4 goes into 10 2 times with a remainder of 2.
Record the quotient 2 as the next digit in the result. 
Result so far: 127253.2
The remainder is 2 after subtracting 8 from 10.
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:
4 can be fit into 20 5 times, resulting in a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 127253.25
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.

Let's proceed to step 9:
4 can be fit into 0 0 times, resulting in a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 127253.25
If we subtract 0 from 0, 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.

Let's proceed to step 10:
0 divided by 4 is 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 127253.25
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.

Our division results in 127253.25 with a remaining 0.0.