Russian Doll problem

Algebra Level 3

This is problem 7 of AIME 1987.

The function f f is defined on the integers, and satisfies.

Find f(84).


The answer is 997.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Adhiraj Dutta
Jan 4, 2020

Solution using Python Solution using Python Solution using C++ Solution using C++

Mark Hennings
Jan 6, 2020

The function f f can be readily seen (by induction on n n ) to be equal to f ( n ) = { n 3 n 1000 997 n 999 , n e v e n 998 n 999 , n o d d f(n) \; = \; \left\{ \begin{array}{lll} n-3 & \hspace{1cm} & n \ge 1000 \\ 997 & & n \le 999, n\; \mathrm{even} \\ 998 & & n \le 999, \; n\; \mathrm{odd} \end{array} \right. and hence f ( 84 ) = 997 f(84) = \boxed{997} .

When you say "induction on n n ", you mean to let n n decrease from 1000, right?

Richard Desper - 1 year, 5 months ago

Log in to reply

Yes. The inductive hypothesis is that the formula works for n k n \ge k , and we use this to deduce the correctness of the formula for n = k 1 n=k-1 . The "ground step" n = 1000 n=1000 is trivial.

Mark Hennings - 1 year, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...