We look at the division of 501251 by 23 
The aim is to understand the frequency of 23 in 501251.

Step 1:
23 can be fit into 5 0 times, resulting in a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Grab the next digit (0) from the dividend, add it to 5, then carry on: 50 / 23

Moving on to step 2:
If we divide 50 by 23, we get 2 and a remainder of 4.
Use 2 as the next digit of our solution. 
Result so far: 2.0
The remainder is 4 after subtracting 46 from 50.
Grab the next digit (1) from the dividend, add it to 4, then carry on: 41 / 23

Let's proceed to step 3:
23 can be fit into 41 1 times, resulting in a remainder of 18.
Put 1 as the next digit of the answer. 
Result so far: 21.0
The remainder is 18 after subtracting 23 from 41.
Bring next digit (2) of the dividend behind the 18 and repeat the process: 182 / 23

On to step 4:
The number 23 fits into 182 7 times, leaving a remainder of 21.
Use 7 as the next digit of our solution. 
Result so far: 217.0
If we take 161 away from 182, we end up with 21.
Take the next digit (5) from the dividend and append it to 21, then repeat: 215 / 23

Advancing to step 5:
23 goes into 215 9 times with a remainder of 8.
Put 9 as the next digit of the answer. 
Result so far: 2179.0
Subtract 207 from 215 to get 8.
Fetch the next digit (1) from the dividend, attach it to 8 and continue: 81 / 23

Step 6:
If we divide 81 by 23, we get 3 and a remainder of 12.
The number 3 becomes the next digit in our result. 
Result so far: 21793.0
The remainder is 12 after subtracting 69 from 81.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

On to step 7:
23 goes into 120 5 times with a remainder of 5.
The next digit of our result is 5. 
Result so far: 21793.5
The remainder is 5 after subtracting 115 from 120.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Advancing to step 8:
23 can be fit into 50 2 times, resulting in a remainder of 4.
The next digit of our result is 2. 
Result so far: 21793.52
If we subtract 46 from 50, 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.

Advancing to step 9:
If we divide 40 by 23, we get 1 and a remainder of 17.
The number 1 becomes the next digit in our result. 
Result so far: 21793.521
If we take 23 away from 40, we end up with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

On to step 10:
If we divide 170 by 23, we get 7 and a remainder of 9.
Record the quotient 7 as the next digit in the result. 
Result so far: 21793.5217
Subtracting 161 from 170 leaves us with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Advancing to step 11:
The number 23 fits into 90 3 times, leaving a remainder of 21.
Use 3 as the next digit of our solution. 
Result so far: 21793.52173
If we take 69 away from 90, we end up with 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Going ahead to step 12:
210 divided by 23 is 9 with a remainder of 3.
The number 9 becomes the next digit in our result. 
Result so far: 21793.521739
Deduct 207 from 210 and we're left with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Advancing to step 13:
If we divide 30 by 23, we get 1 and a remainder of 7.
The number 1 becomes the next digit in our result. 
Result so far: 21793.5217391
Deduct 23 from 30 and we're left with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Advancing to step 14:
The number 23 fits into 70 3 times, leaving a remainder of 1.
The next digit of our result is 3. 
Result so far: 21793.52173913
Deduct 69 from 70 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.

In conclusion, the division gives 21793.52173913 with a balance of 1e-09.