Maths Olympiad Prep

Library / /475 of 860

Number theory Difficulty 5.2 AIME, harder Find the answer

Let f(n)f(n) be the largest prime factor of n2+1n^{2}+1. Compute the least positive integer nn such that f(f(n))=nf(f(n))=n.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Suppose f(f(n))=nf(f(n))=n, and let m=f(n)m=f(n). Note that we have mnm2+n2+1mn \mid m^{2}+n^{2}+1. First we find all pairs of positive integers that satisfy this condition, using Vieta root jumping. Suppose m2+n2+1=kmnm^{2}+n^{2}+1=kmn, for some positive integer kk. Considering this as a quadratic in mm, let the other root (besides mm) be mm^{\prime}. We have m+m=knm^{\prime}+m=kn, so mm^{\prime} is an integer. Also, mm=n2+1mm^{\prime}=n^{2}+1. So if m>nm>n then mnm^{\prime} \leq n. So if we have a solution (m,n)(m, n) we can find a smaller solution (n,m)\left(n, m^{\prime}\right). In particular, it suffices to find all small solutions to describe all solutions. A minimal solution must have m=nm=n, which gives only m=n=1m=n=1. We have that k=3k=3. Now the recurrence a0=a1=1,an+an+2=3an+1a_{0}=a_{1}=1, a_{n}+a_{n+2}=3a_{n+1} describes all solutions with consecutive terms. In fact this recurrence gives precisely other Fibonacci number: 1,1,2,5,13,34,89,233,1,1,2,5,13,34,89,233, \ldots Checking these terms gives an answer of 89.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.