We look at the division of 138161 by 2 
The aim is to understand the frequency of 2 in 138161.

Going ahead to step 1:
2 goes into 1 0 times with a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 1 leaves us with 1.
Take the next digit (3) from the dividend and append it to 1, then repeat: 13 / 2

Let's proceed to step 2:
The number 2 fits into 13 6 times, leaving a remainder of 1.
Write down 6 as next digit of the result. 
Result so far: 6.0
The remainder is 1 after subtracting 12 from 13.
Take the next digit (8) from the dividend and append it to 1, then repeat: 18 / 2

Moving on to step 3:
2 can be fit into 18 9 times, resulting in a remainder of 0.
Use 9 as the next digit of our solution. 
Result so far: 69.0
Deduct 18 from 18 and we're left with 0.
Bring next digit (1) of the dividend behind the 0 and repeat the process: 1 / 2

Step 4:
1 divided by 2 is 0 with a remainder of 1.
The number 0 becomes the next digit in our result. 
Result so far: 690.0
If we subtract 0 from 1, we get 1.
Fetch the next digit (6) from the dividend, attach it to 1 and continue: 16 / 2

On to step 5:
2 goes into 16 8 times with a remainder of 0.
Write down 8 as next digit of the result. 
Result so far: 6908.0
Subtracting 16 from 16 leaves us with 0.
Append the next digit (1) from the dividend to 0 and continue with: 1 / 2

Step 6:
1 divided by 2 is 0 with a remainder of 1.
The number 0 becomes the next digit in our result. 
Result so far: 69080.0
Subtract 0 from 1 to get 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Moving on to step 7:
10 divided by 2 is 5 with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 69080.5
Subtract 10 from 10 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 8:
2 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 69080.5
If we subtract 0 from 0, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 9:
0 divided by 2 is 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 69080.5
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.

The final outcome is 69080.5, with a leftover of 0.0.