Question 1210212: 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 3 solutions by CPhill, ikleyn, greenestamps: Answer by CPhill(1959) (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(52777) (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.
Answer by greenestamps(13198) (Show Source):
You can put this solution on YOUR website!
sum of digits is 6
at most one even digit (i.e., either one or none)
strictly decreasing digits
(1) first digit 6
Clearly there is only one such string with first digit 6: 6
(2) first digit 5
The sum of the remaining digits must be 1, and the digits must be strictly decreasing. There are, simply, two such numbers: 51 and 510.
(3) first digit 4
The sum of the remaining digits must be 2; we can't have another even digit; and the digits must be strictly decreasing. Simple observation shows there are no such numbers.
first digit 3
The sum of the remaining digits must be 3, and the digits must be strictly decreasing. Also trivially, there is one such number: 321.
Clearly there are no other numbers that satisfy all the conditions.
ANSWER: 4 (6, 51, 510, 321)
|
|
|