Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on Find all functions \(f:\mathbb N\to\mathbb N\) such that for all primes \(p\), \(p\mid f(a)^{f(p)}-f(b)^p\iff p\mid a-b\)

Post

Find all functions \(f:\mathbb N\to\mathbb N\) such that for all primes \(p\), \(p\mid f(a)^{f(p)}-f(b)^p\iff p\mid a-b\)

+0
−0

\(\require{centernot}\)

Find all functions \(f:\mathbb N\to\mathbb N\) such that for all primes \(p\), \[p\mid f(a)^{f(p)}-f(b)^p\] if and only if \(p\mid a-b\).

My proposed solution:

Notice that \(p\mid a-b\iff a\equiv b\pmod p\) and by Euler's theorem, \(p\mid f(a)^{f(p)}-f(b)^p\iff f(a)^{f(p)}\equiv f(b)^p\equiv f(b)\pmod p\).

This must hold true when \(a=b\), and therefore we get that \(f(a)^{f(p)}\equiv f(a)\pmod p\) for all \(a\). This holds only for a limited number of functions:

  1. \(f(x)=x\), and we can easily check that \(f(a)^{f(p)}=a^p\equiv a\equiv b=f(b)\pmod p\) which fulfills the above conditions.

  2. \(f(x)=cx-c+1\) for some natural number \(c>1\), which leads to \(f(a)^{f(p)}=(ca-c+1)^{cp-c+1}\equiv ca-c+1\equiv cb-c+1=f(b)\pmod p\). But this doesn't exclusively hold when \(a\equiv b\pmod p\), as \(ca\equiv cb\pmod p\centernot\implies a\equiv b\pmod p\). Therefore, this does not fulfill the "only if" condition.

  3. \(f(x)=x^n\) for some natural number \(n>1\), which leads to \(f(a)^{f(p)}=\left(a^n\right)^{p^n}\equiv a^n\equiv b^n=f(b)\pmod p\). But similar to the what we previously considered, \(a^n\equiv b^n\pmod p\centernot\implies a\equiv b\pmod p\) and this does not fulfill the "only if" condition.

  4. \(f(x)=\varphi(x)+1\) where \(\varphi(x)\) is Euler's totient function, but \(a\equiv b\pmod p\centernot\implies\varphi(a)\equiv\varphi(b)\pmod p\) and therefore this does not satisfy the requirements.

  5. \(f(x)=1\), which does not satisfy the "only if" condition.

Therefore, the only solution is \(f(x)=x\). \(\blacksquare\)

However, I certainly might've missed another function \(f:\mathbb N\to\mathbb N\) that fulfills the conditions. For a rigorous proof, would we need to show that all such functions have been considered? If so, how do we?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Not such a limited number of functions (6 comments)
Not such a limited number of functions
Peter Taylor‭ wrote 3 months ago

$f(a)^{f(p)}\equiv f(a)\pmod p$ is satisfied if (but not only if) $f(p) \equiv 1 \pmod{p-1}$, i.e. $f(p) = c_p (p-1) + 1$. But there's no reason a priori why $c_p$ should be the same for all primes, or why $f(n)$ should be $c(n-1) + 1$ for non-prime $n$. I think you've only considered a negligible subset of the possible fractions $f$ satisfying the reduced property for $a=b$.

That's a good point. I'll look more into this. 🙂

Peter Taylor‭ wrote 3 months ago

Actually we can argue that for each prime $p$ there is a $c_p$ such that $f(p) = c_p(p-1) + 1$. If $f(n) \bmod p$ takes fewer than $p$ distinct values then by the pigeonhole principle there must be $a \not\equiv b$ for which $f(a) \equiv f(b)$ and we can derive a contradiction from $f(a)^{f(p)} \equiv f(a) \equiv f(b)$. Now, let $x$ be such that $f(x)$ is a generator of the multiplicative group modulo $p$; it's a cyclic group, so $f(x)^{f(p)} \equiv f(x)$ requires $f(p) \equiv 1 \pmod {p-1}$.

Peter Taylor‭ wrote 3 months ago · edited 3 months ago

Then the original property is equivalent to the pair of properties: $\forall p \textrm{ prime}: f(a) \equiv f(b) \pmod p \iff a \equiv b \pmod p$ and $\forall p \textrm{ prime}: f(p) \equiv 1 \pmod {p-1}$. By Dirichlet's theorem on arithmetic progressions we have that for every prime $p$ there are an infinite number of primes $q = 1 + mp$. Then $f(q) \equiv 1 \pmod {mp}$, so $f(1) \equiv f(1 + mp) \equiv 1 \pmod {p}$. Thus $f(1) = 1$, since otherwise a prime factor of $f(1)$ would give a contradiction. $f(2) - 1$ is odd but cannot be divisible by an odd prime, so $f(2) = 2$. The only equivalence class for $f(3) \pmod 3$ is $0$ and both $f(3) - 1$ and $f(3) - 2$ must be $2$-smooth. Therefore $f(3) = 3$. Not sure how far this can be pushed.

Peter Taylor‭ wrote 3 months ago · edited 3 months ago

It gets messy trying to push it. $f(5) \equiv 5 \pmod {12}$ follows from previous observations; $f(5) \in \{0, 4\} \pmod 5$ follows because the other equivalence classes are already accounted for. Then $f(5) - 1$ must be a power of two (it must be $5$-smooth and coprime to $3$ and $5$); $f(5) - 3$ must be a power of two (similarly); so $f(5) = 5$. But $f(7) \equiv 7 \pmod {30}$ and $f(7) \in \{0,4,6\} \pmod 7$ gives $f(7) = 5^u + 2 = 2^v + 5$, and while the technique used to prove Mihailescu's theorem might stretch to this, it's not looking promising as a proof strategy.

Peter Taylor‭ wrote 3 months ago

On the positive side, it's sufficient to show that $f(p) = p$ for all primes $p$. If so then for each $1 \le a < p$ there is a prime $q = a + mp$ by Dirichlet's theorem on arithmetic progressions: then $f(q) \equiv a \pmod p$ and since each equivalence class maps to a single equivalence class this means that in general $f(a) \equiv a \pmod p$. Thus in general $f(n) = n$, since otherwise we can find a prime $p > \max(n, f(n))$ and derive a contradiction.