Difference between revisions of "2004 AIME I Problems/Problem 6"

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 1

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.

Solution 2

Let's create the snakelike number from digits , and, if we already picked the digits there are 5 ways to do so, as said in the first solution. And, let's just pick the digits from 0-9. This get's a total count of But, this over-counts since it counts numbers like 0213. We can correct for this over-counting. Lock the first digit as 0 and permute 3 other chosen digits . There are 2 ways to permute to make the number snakelike, b-a-c, or c-a-b. And, we pick a,b,c from 1 to 9, since 0 has already been chosen as one of the digits. So, the amount we have overcounted by is . Thus our answer is
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9798843264579773, "perplexity": 440.7535131958022}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-43/segments/1570987750110.78/warc/CC-MAIN-20191020233245-20191021020745-00557.warc.gz"}