I need help with counting problem
Find the number of positive integers that satisfy the following conditions:
* Each digit is a 1 or a 2 or a 3
* The sum of the digits is 10
4-digit permutations==(1, 3, 3, 3), (2, 2, 3, 3) ==10
5-digit permutations==(1,1,2,3,3), (1, 2, 2, 2, 3), (2, 2, 2, 2, 2)=51
6-digit permutations==(1,1,1,1,3,3), (1,1,1,2,2,3), (1,1,2,2,2,2)=90
7-digit permutations==(1,1,1,1,1,2,3), (1,1,1,1,2,2,2)==77
8-digit permutations==(1,1,1,1,1,1,1,3), (1,1,1,1,1,1,2,2)==36
9-digit permutations==(1,1,1,1,1,1,1,1,2)==9
10-digit permutation ==(1,1,1,1,1,1,1,1,1,1)==1
Grand Total ==10 + 51 + 90 + 77 + 36 + 9 + 1 ==274 permutations.