Take a test Sign in 中文
← Exercise 956 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
Contents · by chapter
Digits (38)
Primes (31)
Fractions, Decimals, and the Floor Function (18)
Divisors, GCD, and LCM (36)
Divisibility (59)
Bases (15)
Modular Arithmetic (42)
Integer Equations (27)

Exercises and their solutions

Exercise 956
A sequence of non-negative integers satisfies $a_{n+2}=|a_{n+1}-a_n|$, with $a_1=100$, $a_2<100$, and $a_{2025}=1$. How many values of $a_2$ are possible?
← Back to Problem 956
Solution
  1. $\gcd(a_{n+1},a_{n+2})=\gcd(a_{n+1},|a_{n+1}-a_n|)=\gcd(a_n,a_{n+1})$ (Theorem 90), so the gcd never changes and we need $\gcd(100,a_2)=1$. While two consecutive terms are positive, the larger of them drops by at least $1$ every two steps, so a $0$ appears within $2\cdot100<2025$ steps, after which the sequence is $1,1,0,1,1,0,\ldots$
  2. Now $a_1$ is even, so $a_2$ must be odd. The parities are $0,1,1,0,1,1,\ldots$: $a_n$ is odd exactly when $n\not\equiv1\pmod3$.
  3. $2025\equiv0\pmod3$, so $a_{2025}$ is odd, and since the sequence has reached $1,1,0$, it equals $1$. So the parity condition is automatic here.
  4. Every $a_2<100$ coprime to $100$ works: $\varphi(100)=\boxed{40}$ (Theorem 102) values.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year