Answer:
10 ways
Step-by-step explanation:
First we have to find three numbers that add up to 6, as each friend has at least one pencil, meaning that there are always and only three people who have pencils. The three combinations that add up to 6 are 1,2,3; 2,2,2; and 4,1,1. Now we just have to find how many ways these pencils can be distributed between the friends.
For 2,2, and 2, it is simple as there is only one way these pencils can be distributed, 2 pencils per friend, so there is one way to distribute 2,2 and 2.
For 1,2 and 3, we can use factorial to determine how many ways these groups of pencils can be distributed. Since the first person can pick between 3,2, and 1 pencil(s), they have 3 options. Multiply this by 2 options for the second person and 1 for the third, we have 3*2*1=6 ways to distribute, or 3!.
Finally for 4,1, and 1, since two of the options are the same, that means that the 4 is the only unique one, meaning that there are only 3 distributions as one of the three friends will have the 4 pencils. This means that there are 3 ways to distribute.
Now adding up all the possible ways to distribute, we get 1+6+3=10 ways to distribute the pencils.