2022 SSMO Relay Round 3 Problems/Problem 1

Revision as of 12:10, 14 December 2023 by Pinkpig (talk | contribs) (Created page with "==Problem== Let <math>f:\mathbb Z\rightarrow\mathbb Z</math> be a function such that <math>f(0)=0</math> and <math>f\left(|x^2-4|\right)=0</math> if <math>f(x)=0</math>. Moreo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Problem

Let $f:\mathbb Z\rightarrow\mathbb Z$ be a function such that $f(0)=0$ and $f\left(|x^2-4|\right)=0$ if $f(x)=0$. Moreover, $|f(x+1)-f(x)|=1$ for all $x\in \mathbb Z$. Let $N$ be the number of possible sequences $\{f(1),f(2),\dots,f(21)\}$. Find the remainder when $N$ is divided by 1000.

Solution