We divide 581731 by 18
The aim is to understand the frequency of 18 in 581731.

Step 1:
5 divided by 18 is 0 with a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Include the next digit (8) from the dividend after 5, then repeat: 58 / 18

On to step 2:
58 divided by 18 is 3 with a remainder of 4.
Record the quotient 3 as the next digit in the result. 
Result so far: 3.0
If we take 54 away from 58, we end up with 4.
Bring next digit (1) of the dividend behind the 4 and repeat the process: 41 / 18

On to step 3:
When dividing 41 by 18, we get 2 with a remainder of 5.
The next digit of our result is 2. 
Result so far: 32.0
Subtract 36 from 41 to get 5.
Append the next digit (7) from the dividend to 5 and continue with: 57 / 18

Advancing to step 4:
18 goes into 57 3 times with a remainder of 3.
The next digit of our result is 3. 
Result so far: 323.0
Subtracting 54 from 57 leaves us with 3.
Fetch the next digit (3) from the dividend, attach it to 3 and continue: 33 / 18

On to step 5:
When dividing 33 by 18, we get 1 with a remainder of 15.
Record the quotient 1 as the next digit in the result. 
Result so far: 3231.0
Subtracting 18 from 33 leaves us with 15.
Fetch the next digit (1) from the dividend, attach it to 15 and continue: 151 / 18

Advancing to step 6:
The number 18 fits into 151 8 times, leaving a remainder of 7.
Write down 8 as next digit of the result. 
Result so far: 32318.0
If we take 144 away from 151, we end up 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 7:
The number 18 fits into 70 3 times, leaving a remainder of 16.
Put 3 as the next digit of the answer. 
Result so far: 32318.3
Subtracting 54 from 70 leaves us with 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

On to step 8:
The number 18 fits into 160 8 times, leaving a remainder of 16.
Write down 8 as next digit of the result. 
Result so far: 32318.38
Subtracting 144 from 160 leaves us with 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Advancing to step 9:
160 divided by 18 is 8 with a remainder of 16.
Use 8 as the next digit of our solution. 
Result so far: 32318.388
Subtract 144 from 160 to get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

The quotient of the division is 32318.388, and the remainder is 0.0016.