Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2004 — Part 03 Question 16

Math Olympiad Vault · MathNet 2004 — Part 03

Question 16

Let $n$ be a positive integer. Consider sequences $a_0, a_1, \dots, a_n$ such that $a_i \in \{1, 2, \dots, n\}$ for each $i$ and $a_n = a_0$.


a. Call such a sequence *good* if for all $i = 1, 2, \dots, n$, $a_i - a_{i-1} \not\equiv i \pmod n$. Suppose that $n$ is odd. Find the number of good sequences.


b. Call such a sequence *great* if for all $i = 1, 2, \dots, n$, $a_i - a_{i-1} \not\equiv i, 2i \pmod n$. Suppose that $n$ is an odd prime. Find the number of great sequences.