Difference between revisions of "2004 AIME I Problems/Problem 6"
m |
|||
Line 3: | Line 3: | ||
== Solution == | == Solution == | ||
− | {{ | + | We divide the problem into two cases: one in which zero is one of the digits and one in which it is not. In the latter case, suppose we pick digits |
+ | <math>x_1,x_2,x_3,x_4</math> such that <math>x_1<x_2<x_3<x_4</math>. There are five arrangements of these digits that satisfy the condition of being snakelike: <math>x_1x_3x_2x_4</math>, <math>x_1x_4x_2x_3</math>, <math>x_2x_3x_1x_4</math>, <math>x_2x_4x_1x_3</math>, <math>x_3x_4x_1x_2</math>. Thus there are <math>5\cdot {9\choose 4}=630</math> snakelike numbers which do not contain the digit zero. | ||
+ | |||
+ | In the second case we choose zero and three other digits such that <math>0<x_2<x_3<x_4</math>. There are three arrangements of these digits that satisfy the condition of being snakelike: <math>x_2x_30x_4</math>, <math>x_2x_40x_3</math>, <math>x_3x_40x_2</math>. Because we know that zero is a digit, there are <math>3\cdot{9\choose 3}=252</math> snakelike numbers which contain the digit zero. Thus there are <math>630+252=882</math> snakelike numbers. | ||
== See also == | == See also == | ||
* [[2004 AIME I Problems/Problem 5| Previous problem]] | * [[2004 AIME I Problems/Problem 5| Previous problem]] |
Revision as of 14:36, 29 November 2006
Problem
An integer is called snakelike if its decimal representation satisfies if is odd and if is even. How many snakelike integers between 1000 and 9999 have four distinct digits?
Solution
We divide the problem into two cases: one in which zero is one of the digits and one in which it is not. In the latter case, suppose we pick digits such that . There are five arrangements of these digits that satisfy the condition of being snakelike: , , , , . Thus there are snakelike numbers which do not contain the digit zero.
In the second case we choose zero and three other digits such that . There are three arrangements of these digits that satisfy the condition of being snakelike: , , . Because we know that zero is a digit, there are snakelike numbers which contain the digit zero. Thus there are snakelike numbers.