Finding all functionals over $\mathbb{N}$ such that $f(f(n)) = an$ for which $a\in\mathbb{Z}^+$

algebra-precalculusfunctional-equationsnumber theory

I want to find all functions $f:\mathbb{N}\rightarrow \mathbb{N}$ for which there is a
$a\in\mathbb{Z}^+$ satisfying $$f(f(n)) = an$$
for all $n\in\mathbb{N}$


My attempt:
First, taking the case $a=1$, we have $f(f(n)) = n$. I suspect there are probably many or infinitely many family of functions that satisfy this, but I haven't had any luck here.

In the second case where $a>1$, take $f(x) = y$. Then $f(y) = ay$. Repeating this composition, it looks like $f(f(a^{k-1}n)) = a^kn$ for every integer $k\geq 1$. So, proceeding by induction on $k$, it is clear that this property holds for $k=1$ since,
$$f(f(a^0n)) = f(f(n)) = an$$
Suppose that $f(f(a^{k-1}n)) = a^kn$ for some $k>1$. We want to show that $$f(f(a^kn)) = a^{k+1}n$$
Since $f(f(n)) = an$, then taking the formula from the induction step we should have
\begin{align*}
f(f(a^kn)) &= a \big(a^k n\big) \\
&= a^{k+1}n
\end{align*}

Hence $f(f(a^kn)) = a^kn$ satisfies the functional for every integer $k\geq 1$. Again, I have not been able to find precisely what functions $f$ are a valid solution.

Best Answer

For $a = 1$, there are an infinite number of functions, but they all have the same "form", namely that:

  1. For some subset $A \subseteq \mathbb{N}$, $f$ acts as the identity function, i.e. $n \in A \implies f(n) = n$.

  2. Outside of $A$, everything is just a 2-cycle. In other words, you have a number of pairs $m, n$ such that $f(m) = n$ and $f(n) = m$.

For example, the following function satisfies the equation:

$$f(n) = \begin{cases} n & n \equiv 0 \mod 3 \\ n + 1 & n \equiv 1 \mod 3 \\ n - 1 & n \equiv 2 \mod 3 \end{cases}$$

This function keeps every multiple of 3 the same, and swaps the other values around.

For $a > 1$, exhaustively identifying every possible function seems difficult, but you can make a few observations.

For example, consider $f(0) = m$. Then by the functional equation $f(f(0)) = 0 \implies f(m) = 0$, but also $f(f(m)) = am \implies f(0) = am \implies am = m \implies m = 0$. So in other words $f(0) = 0$ is a fixed point of all $f$.

Next, let's consider what happens if we have integers $m, n$ such that $f(m) = f(n)$. Then $am = f(f(m)) = f(f(n)) = an \implies m = n$, so $f$ must be injective.

Also, if $f(m) = n$ for some integers $m, n$, then $f(n) = f(f(m)) = am$, and $f(am) = f(f(n)) = an$, and inductively you can show that $f(a^k m) = a^k n$ and $f(a^k n) = a^{k+1} m$ for all natural numbers $k$. It also means that every positive multiple of $a$ is in the range of $f$.

Further, if $f(m) = an$ for some integers $m, n$, then by injectivity it's required that $m = f(n)$. With a bit of wrangling, you can show that this implies that if $f(m) = a^{k+1} n$, then in fact $a^k$ has to divide $m$.

What I think this means is that you can characterise all of the functions for a given $a > 1$ as follows:

  • Set $f(0) = 0$.

  • Take all positive integers that are not multiples of $a$, and separate them into ordered pairs $\{(m_0, n_0), (m_1, n_1), (m_2, n_2), \ldots\}$.

  • For each pair, set $f(a^k m_i) = a^k n_i, f(a^k n_i) = a^{k+1} m_i$ for all natural numbers $k$.

From that, I think you uniquely define one possible function and that across all possible partitions you eventually cover all of the valid functions. Proving that properly is left as an exercise to the reader.

To give a couple of examples:

  • For $a = 2$, when $n = 4k + 1$ set $f(n) = n + 2$ and extend appropriately.

  • For $a = 3$, when $n = 3k + 1$ set $f(n) = n + 1$ and extend appropriately.

  • For $a = 4$, $f(n) = 2n$.

Related Question