5

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.

Dee
  • 511

1 Answers1

9

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$.

ConMan
  • 24,300
  • 1
    The proof in this thread that @JohnOmielan linked to can be extended to the general case with minimal changes, just replace 'even' and 'odd' by 'multiple of $a$' and 'non-multiple of $a$' and every $2$ by $a$ (and $4$ by $a^2$). So this is in fact a complete characterization of all solutions. – user23571113 Aug 23 '23 at 01:02
  • In my courses, we generally do not consider $0$ to be a natural number. Does your point about $f$ having a fixed point still hold if we try to show that $f(1) = 1$? – Dee Aug 23 '23 at 06:22
  • I assumed by your use of $\mathbb{N}$ and $\mathbb{Z}^+$ that you were treating $\mathbb{N}$ as including zero, but if it doesn't then you just ignore that part. There's no such restriction on $f(1)$ as you can see from the examples where it gets set to 2 or 3. – ConMan Aug 23 '23 at 23:03
  • @ConMan That makes sense, sorry for the confusion. One last thing: can you provide a hint on how i can prove uniqueness of these characteristics? – Dee Aug 24 '23 at 15:52
  • You just need to show that partitioning the natural numbers differently leads to a different function, which should be pretty simple. – ConMan Aug 24 '23 at 23:21