A sequence of positive integers is defined by a0=1 and an+1=an2+1 for each n≥0. Find gcd(a999,a2004).
A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.
Solution
If d is the relevant greatest common divisor, then a1000=a9992+1≡1=a0(modd), which implies (by induction) that the sequence is periodic modulo d, with period 1000 . In particular, a4≡a2004≡0. So d must divide a4. Conversely, we can see that a5=a42+1≡1=a0 modulo a4, so (again by induction) the sequence is periodic modulo a4 with period 5 , and hence a999,a2004 are indeed both divisible by a4. So the answer is a4, 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 reproduced verbatim; metadata (topic, difficulty) added by this project.