We look at the division of 40837013 by 505 
The aim is to understand the frequency of 505 in 40837013.

On to step 1:
4 divided by 505 is 0 with a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 505

Going ahead to step 2:
If we divide 40 by 505, we get 0 and a remainder of 40.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 40 leaves us with 40.
Grab the next digit (8) from the dividend, add it to 40, then carry on: 408 / 505

Going ahead to step 3:
505 goes into 408 0 times with a remainder of 408.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 408 to get 408.
Bring next digit (3) of the dividend behind the 408 and repeat the process: 4083 / 505

On to step 4:
4083 divided by 505 is 8 with a remainder of 43.
The number 8 becomes the next digit in our result. 
Result so far: 8.0
If we subtract 4040 from 4083, we get 43.
Fetch the next digit (7) from the dividend, attach it to 43 and continue: 437 / 505

Let's proceed to step 5:
The number 505 fits into 437 0 times, leaving a remainder of 437.
Record the quotient 0 as the next digit in the result. 
Result so far: 80.0
Subtract 0 from 437 to get 437.
Include the next digit (0) from the dividend after 437, then repeat: 4370 / 505

On to step 6:
When dividing 4370 by 505, we get 8 with a remainder of 330.
The number 8 becomes the next digit in our result. 
Result so far: 808.0
If we subtract 4040 from 4370, we get 330.
Take the next digit (1) from the dividend and append it to 330, then repeat: 3301 / 505

Let's proceed to step 7:
When dividing 3301 by 505, we get 6 with a remainder of 271.
The number 6 becomes the next digit in our result. 
Result so far: 8086.0
Subtracting 3030 from 3301 leaves us with 271.
Fetch the next digit (3) from the dividend, attach it to 271 and continue: 2713 / 505

On to step 8:
When dividing 2713 by 505, we get 5 with a remainder of 188.
The next digit of our result is 5. 
Result so far: 80865.0
Deduct 2525 from 2713 and we're left with 188.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1880, and continue the process.

Going ahead to step 9:
The number 505 fits into 1880 3 times, leaving a remainder of 365.
The number 3 becomes the next digit in our result. 
Result so far: 80865.3
Subtracting 1515 from 1880 leaves us with 365.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3650, and continue the process.

Step 10:
3650 divided by 505 is 7 with a remainder of 115.
Put 7 as the next digit of the answer. 
Result so far: 80865.37
Subtracting 3535 from 3650 leaves us with 115.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1150, and continue the process.

On to step 11:
When dividing 1150 by 505, we get 2 with a remainder of 140.
Use 2 as the next digit of our solution. 
Result so far: 80865.372
Subtracting 1010 from 1150 leaves us with 140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1400, and continue the process.

On to step 12:
505 goes into 1400 2 times with a remainder of 390.
Use 2 as the next digit of our solution. 
Result so far: 80865.3722
If we subtract 1010 from 1400, we get 390.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3900, and continue the process.

The final result is 80865.3722 with a remainder of 0.0039.