Difference between revisions of "1984 AIME Problems/Problem 7"
(→Solution 3) |
(→Solution 4 (Not really a solution, DON'T DO THIS ON A REAL TEST)) |
||
Line 51: | Line 51: | ||
== Solution 4 (Not really a solution, DON'T DO THIS ON A REAL TEST) == | == Solution 4 (Not really a solution, DON'T DO THIS ON A REAL TEST) == | ||
− | Open up a coding IDE and use recursion to do this problem. The idea is to define a function (f, you can call it whatever you want) with parameter n (or 84 in this case) and say if n is greater than 1000, then return n-3. Else, return | + | Open up a coding IDE and use recursion to do this problem. The idea is to define a function (f, you can call it whatever you want) with parameter <math>n</math> (or 84 in this case) and say if <math>n</math> is greater than 1000, then return <math>n-3</math>. Else, return f(f(n + 5)). If this doesn't make sense, then search 'Recursion' on YouTube and try to understand recursive functions. Python code: |
def f(n): | def f(n): |
Revision as of 17:59, 9 March 2022
Contents
Problem
The function f is defined on the set of integers and satisfies
Find .
Solution 1
Define , where the function
is performed
times. We find that
.
. So we now need to reduce
.
Let’s write out a couple more iterations of this function:
So this function reiterates with a period of 2 for
. It might be tempting at first to assume that
is the answer; however, that is not true since the solution occurs slightly before that. Start at
:
Note that we should also be suspicious if our answer is - it is a
-digit number, and we were not asked to, say, divide our number by
.
Solution 2
We start by finding values of the function right under since they require iteration of the function.
Soon we realize the for integers
either equal
or
based on it parity. (If short on time, a guess of
or
can be taken now.)
If
is even
if
is odd
.
has even parity, so
.
The result may be rigorously shown through induction.
Solution 3
Assume that is to be performed
times. Then we have
In order to find
, we want to know the smallest value of
Because then
From which we'll get a numerical value for
.
Notice that the value of we expect to find is basically the smallest
such that after
is performed
times and then
is performed back
times, the result is greater than or equal to
.
In this case, the value of for
is
, because
Thus
~ Nafer
Solution 4 (Not really a solution, DON'T DO THIS ON A REAL TEST)
Open up a coding IDE and use recursion to do this problem. The idea is to define a function (f, you can call it whatever you want) with parameter (or 84 in this case) and say if
is greater than 1000, then return
. Else, return f(f(n + 5)). If this doesn't make sense, then search 'Recursion' on YouTube and try to understand recursive functions. Python code:
def f(n): if n >= 1000: return n - 3 else: return f(f(n + 5)) print(f(84))
See also
1984 AIME (Problems • Answer Key • Resources) | ||
Preceded by Problem 6 |
Followed by Problem 8 | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 | ||
All AIME Problems and Solutions |