# 2007 AIME I Problems/Problem 6

## Problem

A frog is placed at the origin on the number line, and moves according to the following rule: in a given move, the frog advances to either the closest point with a greater integer coordinate that is a multiple of 3, or to the closest point with a greater integer coordinate that is a multiple of 13. A move sequence is a sequence of coordinates which correspond to valid moves, beginning with 0, and ending with 39. For example, 0, 3, 6, 13, 15, 26, 39 is a move sequence. How many move sequences are possible for the frog?

## Solution

 2007 AIME I (Problems • Answer Key • Resources) Preceded byProblem 5 Followed byProblem 7 1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 All AIME Problems and Solutions

We divide it into 3 stages. The first occurs before the frog moves past 13. The second occurs before it moves past 26, and the last is everything else.

For the first stage the possible paths are $0,13[itex], [itex]0,3,13$, $0,3,6,13$, $0,3,6,9,13$, $0,3,6,9,12,13$, and $0,3,6,9,12$. That is a total of 6.

For the second stage the possible paths are $26[itex], [itex]15,26$, $15,18,26$, $15,18,21,26$, $15,18,21,24,26$, and $15,18,21,24$. That is a total of 6.

For the second stage the possible paths are $39[itex], [itex]27,39$, $27,30,39$, $27,30,33,39$, and $27,30,33,36,39$. That is a total of 5.

$6\cdot6\cdot5=180<\math>$ (Error compiling LaTeX. ! LaTeX Error: Bad math environment delimiter.)