This problem involves distributing identical objects (pencils) to distinct groups (students) with the condition that each student receives at least one pencil.
Each student must receive at least one pencil. Therefore, we first give each student one pencil, reducing the number of pencils to distribute from 10 to 6.
Now, we need to distribute 6 pencils among 4 students without restrictions. We use the stars and bars formula:
where:
Applying the formula:
Thus, the total number of ways to distribute the pencils is 84.