Let's divide 538495 by 40
The aim is to understand the frequency of 40 in 538495.

Let's proceed to step 1:
The number 40 fits into 5 0 times, leaving a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Fetch the next digit (3) from the dividend, attach it to 5 and continue: 53 / 40

Advancing to step 2:
When dividing 53 by 40, we get 1 with a remainder of 13.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtract 40 from 53 to get 13.
Append the next digit (8) from the dividend to 13 and continue with: 138 / 40

On to step 3:
When dividing 138 by 40, we get 3 with a remainder of 18.
Write down 3 as next digit of the result. 
Result so far: 13.0
The remainder is 18 after subtracting 120 from 138.
Fetch the next digit (4) from the dividend, attach it to 18 and continue: 184 / 40

Let's proceed to step 4:
40 can be fit into 184 4 times, resulting in a remainder of 24.
The number 4 becomes the next digit in our result. 
Result so far: 134.0
If we subtract 160 from 184, we get 24.
Include the next digit (9) from the dividend after 24, then repeat: 249 / 40

On to step 5:
If we divide 249 by 40, we get 6 and a remainder of 9.
The number 6 becomes the next digit in our result. 
Result so far: 1346.0
If we take 240 away from 249, we end up with 9.
Take the next digit (5) from the dividend and append it to 9, then repeat: 95 / 40

On to step 6:
When dividing 95 by 40, we get 2 with a remainder of 15.
Write down 2 as next digit of the result. 
Result so far: 13462.0
Subtract 80 from 95 to get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Step 7:
150 divided by 40 is 3 with a remainder of 30.
Use 3 as the next digit of our solution. 
Result so far: 13462.3
If we subtract 120 from 150, we get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Going ahead to step 8:
40 goes into 300 7 times with a remainder of 20.
Record the quotient 7 as the next digit in the result. 
Result so far: 13462.37
Subtracting 280 from 300 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Let's proceed to step 9:
40 goes into 200 5 times with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 13462.375
Subtracting 200 from 200 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.

Step 10:
40 goes into 0 0 times with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 13462.375
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.

On to step 11:
If we divide 0 by 40, we get 0 and a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 13462.375
Deduct 0 from 0 and we're left 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 13462.375 with a remaining 0.0.