Skip to main content

1984 AIME Problem 7

Problem 7 of 15IntermediateAlgebraNumber TheoryProblem-Solving Techniques

The function ff is defined on the set of integers and satisfies f(n)=n−3f(n)=n-3 if n≥1000,n\geq1000, and f(n)=f(f(n+5)) f(n)=f(f(n+5)) if n<1000.n<1000. Find f(84).f(84).

Your answer

Integer from 0 to 999
Show solution

Solution

Directly from the definition, f(999)=f(f(1004))=f(1001)=998,f(998)=f(f(1003))=f(1000)=997. \begin{aligned} f(999)&=f(f(1004))\\ &=f(1001)=998,\\ f(998)&=f(f(1003))\\ &=f(1000)=997. \end{aligned} Continuing gives f(997)=998,f(997)=998, f(996)=997,f(996)=997, and f(995)=998.f(995)=998. We now use downward induction. If n<995n<995 is even, then n+5n+5 is odd, so the established pattern above nn gives f(n)=f(f(n+5)).f(n)=f(f(n+5)). Thus f(n)=f(998)=997.f(n)=f(998)=997. If nn is odd, the same argument gives f(n)=f(997)=998.f(n)=f(997)=998. Thus every even n<1000n<1000 has value 997.997. Since 8484 is even, f(84)=997.f(84)=997.
AoPS wiki

Tagged: recursion · induction · parity

More practice