Let's divide 5107317 by 401
The aim is to understand the frequency of 401 in 5107317.

Step 1:
5 divided by 401 is 0 with a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Grab the next digit (1) from the dividend, add it to 5, then carry on: 51 / 401

On to step 2:
401 goes into 51 0 times with a remainder of 51.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 51 and we're left with 51.
Fetch the next digit (0) from the dividend, attach it to 51 and continue: 510 / 401

On to step 3:
When dividing 510 by 401, we get 1 with a remainder of 109.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Subtracting 401 from 510 leaves us with 109.
Include the next digit (7) from the dividend after 109, then repeat: 1097 / 401

Going ahead to step 4:
If we divide 1097 by 401, we get 2 and a remainder of 295.
Record the quotient 2 as the next digit in the result. 
Result so far: 12.0
If we subtract 802 from 1097, we get 295.
Fetch the next digit (3) from the dividend, attach it to 295 and continue: 2953 / 401

Moving on to step 5:
The number 401 fits into 2953 7 times, leaving a remainder of 146.
The number 7 becomes the next digit in our result. 
Result so far: 127.0
Deduct 2807 from 2953 and we're left with 146.
Take the next digit (1) from the dividend and append it to 146, then repeat: 1461 / 401

Step 6:
If we divide 1461 by 401, we get 3 and a remainder of 258.
Use 3 as the next digit of our solution. 
Result so far: 1273.0
The remainder is 258 after subtracting 1203 from 1461.
Bring next digit (7) of the dividend behind the 258 and repeat the process: 2587 / 401

Advancing to step 7:
The number 401 fits into 2587 6 times, leaving a remainder of 181.
The next digit of our result is 6. 
Result so far: 12736.0
If we subtract 2406 from 2587, we get 181.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1810, and continue the process.

Going ahead to step 8:
401 goes into 1810 4 times with a remainder of 206.
Record the quotient 4 as the next digit in the result. 
Result so far: 12736.4
Subtracting 1604 from 1810 leaves us with 206.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2060, and continue the process.

Advancing to step 9:
401 goes into 2060 5 times with a remainder of 55.
Record the quotient 5 as the next digit in the result. 
Result so far: 12736.45
Deduct 2005 from 2060 and we're left with 55.
Since there are no more digits in the dividend, we add a zero to the remainder making it 550, and continue the process.

Advancing to step 10:
The number 401 fits into 550 1 times, leaving a remainder of 149.
The number 1 becomes the next digit in our result. 
Result so far: 12736.451
Deduct 401 from 550 and we're left with 149.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1490, and continue the process.

Let's proceed to step 11:
401 can be fit into 1490 3 times, resulting in a remainder of 287.
Write down 3 as next digit of the result. 
Result so far: 12736.4513
Deduct 1203 from 1490 and we're left with 287.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2870, and continue the process.

Going ahead to step 12:
If we divide 2870 by 401, we get 7 and a remainder of 63.
The number 7 becomes the next digit in our result. 
Result so far: 12736.45137
Subtract 2807 from 2870 to get 63.
Since there are no more digits in the dividend, we add a zero to the remainder making it 630, and continue the process.

On to step 13:
630 divided by 401 is 1 with a remainder of 229.
The next digit of our result is 1. 
Result so far: 12736.451371
Deduct 401 from 630 and we're left with 229.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2290, and continue the process.

On to step 14:
The number 401 fits into 2290 5 times, leaving a remainder of 285.
The number 5 becomes the next digit in our result. 
Result so far: 12736.4513715
The remainder is 285 after subtracting 2005 from 2290.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2850, and continue the process.

Step 15:
The number 401 fits into 2850 7 times, leaving a remainder of 43.
Write down 7 as next digit of the result. 
Result so far: 12736.45137157
Deduct 2807 from 2850 and we're left with 43.
Since there are no more digits in the dividend, we add a zero to the remainder making it 430, and continue the process.

The quotient of the division is 12736.45137157, and the remainder is 4.3e-08.