SOLUTION: How many positive integers are there whose digits strictly decrease from left to right, and have at most one even digit, and the sum of the digits is 6?

Algebra ->  Permutations -> SOLUTION: How many positive integers are there whose digits strictly decrease from left to right, and have at most one even digit, and the sum of the digits is 6?       Log On


   



Question 1210211: How many positive integers are there whose digits strictly decrease from left to right, and have at most one even digit, and the sum of the digits is 6?

Found 2 solutions by CPhill, ikleyn:
Answer by CPhill(1959) About Me  (Show Source):
You can put this solution on YOUR website!
Let the positive integer have digits d
1

d
2

…d
k

such that 9≥d
1

>d
2

>⋯>d
k

≥0 and d
1

+d
2

+⋯+d
k

=6.
The digits are strictly decreasing, so all digits are distinct.
The sum of the digits is 6.
We consider the number of even digits in the set of digits whose sum is 6.
Case 1: Zero even digits (all odd digits)
The possible distinct odd digits are 1, 3, 5.
The subsets of {1, 3, 5} whose sum is 6 are:
\begin{itemize}
\item Size 1: { } (sum is 0, not 6)
\item Size 2: {1, 5} (sum is 6). Integer: 51
\item Size 3: {1, ?, ?} (minimum sum is 1+3+5 = 9 > 6)
\end{itemize}
So, from this case, we have the integer 51.
Case 2: One even digit
The possible distinct even digits are 0, 2, 4, 6, 8.
The possible distinct odd digits are 1, 3, 5, 7, 9.
Subcase 2.1: One even digit
We need a set of distinct digits including exactly one even digit, whose sum is 6.
\begin{itemize}
\item Size 1: {6}. Integer: 6
\item Size 2: {e,o} where e+o=6. Possible pairs (even, odd) with e>o: (4, 2) - not strictly decreasing, (6, 0) - integer 60. Pairs with o>e: (5, 1) - already counted, (3, 3) - not distinct.
\item Size 3: {e,o
1

,o
2

} where e+o
1

+o
2

=6 and o
1

>o
2

. Possible sets: {4,1,?} (sum too small), {2,3,1}. Integer 321. {0,5,1}. Integer 510.
\item Size 4: {e,o
1

,o
2

,o
3

} where e+o
1

+o
2

+o
3

=6. Possible sets: {4,1,?,?}, {2,3,1,0}. Integer 3210.
\end{itemize}
Let's enumerate based on the number of digits:
1 digit: 6 (one even digit)
2 digits:
One even, one odd: 51 (zero even), 42 (one even), 60 (one even) 3 digits:
One even, two odd: 321 (zero even), 510 (one even) 4 digits:
One even, three odd: 3210 (one even)
The integers are:
From Case 1: 51 (0 even digits)
From Case 2: 6 (1 even digit), 42 (1 even digit), 60 (1 even digit), 321 (0 even digits), 510 (1 even digit), 3210 (1 even digit)
The positive integers with strictly decreasing digits and at most one even digit, and sum of digits equal to 6 are: 6, 51, 42, 60, 321, 510, 3210.
There are 7 such integers.
Final Answer: The final answer is
7


Answer by ikleyn(52778) About Me  (Show Source):
You can put this solution on YOUR website!
.
How many positive integers are there whose digits strictly decrease from left to right,
and have at most one even digit, and the sum of the digits is 6?
~~~~~~~~~~~~~~~~~~~~~~~~~


The answer in the post by @CPhill is incorrect.

The numbers satisfying the imposed conditions are

    6, 51, 510, 321.


The number of such numbers is 4.

Solved.