Find the number of positive integers that satisfy both the following conditions:

- Each digit is a 1 or a 3

- The sum of the digits is 12

Please help ASAP, thanks!

BlackjackEd Nov 26, 2023

#2**0 **

Case 1: The number has an even number of digits.

Since the sum of the digits is 12, this is impossible.

Case 2: The number has an odd number of digits, and the units digit is 1.

In this case, the first digit must be 3, and the digits in between must add to 9. There are (25)=10 ways to choose the two numbers that add to 9, and 22=4 ways to order them. Thus the number of possibilities in this case is 10⋅4=40.

Case 3: The number has an odd number of digits, and the units digit is 3.

In this case, the first digit must be 1, and the digits in between must add to 3. There are (13)=3 ways to choose the number that adds to 3, and 2 ways to place it. Thus the number of possibilities in this case is 3⋅2=6.

The total number of possibilities is 40+6=46.

parmen Nov 27, 2023