Maths Olympiad Prep

Library / /378 of 860

Algebra Difficulty 5.1 AIME, harder Find the answer

A sequence of positive integers is defined by a0=1a_{0}=1 and an+1=an2+1a_{n+1}=a_{n}^{2}+1 for each n0n \geq 0. Find gcd(a999,a2004)\operatorname{gcd}(a_{999}, a_{2004}).

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

Solution

If dd is the relevant greatest common divisor, then a1000=a9992+11=a0(modd)a_{1000}=a_{999}^{2}+1 \equiv 1=a_{0}(\bmod d), which implies (by induction) that the sequence is periodic modulo dd, with period 1000 . In particular, a4a20040a_{4} \equiv a_{2004} \equiv 0. So dd must divide a4a_{4}. Conversely, we can see that a5=a42+11=a0a_{5}=a_{4}^{2}+1 \equiv 1=a_{0} modulo a4a_{4}, so (again by induction) the sequence is periodic modulo a4a_{4} with period 5 , and hence a999,a2004a_{999}, a_{2004} are indeed both divisible by a4a_{4}. So the answer is a4a_{4}, which we can compute directly; it is 677.

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.