51861 divided by 40 
The aim is to understand the frequency of 40 in 51861.

Let's proceed to step 1:
When dividing 5 by 40, we get 0 with a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Bring next digit (1) of the dividend behind the 5 and repeat the process: 51 / 40

Step 2:
The number 40 fits into 51 1 times, leaving a remainder of 11.
Put 1 as the next digit of the answer. 
Result so far: 1.0
The remainder is 11 after subtracting 40 from 51.
Append the next digit (8) from the dividend to 11 and continue with: 118 / 40

Going ahead to step 3:
When dividing 118 by 40, we get 2 with a remainder of 38.
Record the quotient 2 as the next digit in the result. 
Result so far: 12.0
The remainder is 38 after subtracting 80 from 118.
Bring next digit (6) of the dividend behind the 38 and repeat the process: 386 / 40

Going ahead to step 4:
When dividing 386 by 40, we get 9 with a remainder of 26.
Record the quotient 9 as the next digit in the result. 
Result so far: 129.0
The remainder is 26 after subtracting 360 from 386.
Append the next digit (1) from the dividend to 26 and continue with: 261 / 40

On to step 5:
If we divide 261 by 40, we get 6 and a remainder of 21.
Record the quotient 6 as the next digit in the result. 
Result so far: 1296.0
Subtracting 240 from 261 leaves us 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.

Moving on to step 6:
The number 40 fits into 210 5 times, leaving a remainder of 10.
The number 5 becomes the next digit in our result. 
Result so far: 1296.5
If we take 200 away from 210, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

On to step 7:
When dividing 100 by 40, we get 2 with a remainder of 20.
Put 2 as the next digit of the answer. 
Result so far: 1296.52
If we subtract 80 from 100, we get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 8:
When dividing 200 by 40, we get 5 with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 1296.525
The remainder is 0 after subtracting 200 from 200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 9:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 1296.525
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.

Step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 1296.525
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 1296.525 with a remaining 0.0.