Join our free webinar April 22 to learn about competitive programming!

G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
Apr 2, 2025
Spring is in full swing and summer is right around the corner, what are your plans? At AoPS Online our schedule has new classes starting now through July, so be sure to keep your skills sharp and be prepared for the Fall school year! Check out the schedule of upcoming classes below.

WOOT early bird pricing is in effect, don’t miss out! If you took MathWOOT Level 2 last year, no worries, it is all new problems this year! Our Worldwide Online Olympiad Training program is for high school level competitors. AoPS designed these courses to help our top students get the deep focus they need to succeed in their specific competition goals. Check out the details at this link for all our WOOT programs in math, computer science, chemistry, and physics.

Looking for summer camps in math and language arts? Be sure to check out the video-based summer camps offered at the Virtual Campus that are 2- to 4-weeks in duration. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following events:
[list][*]April 3rd (Webinar), 4pm PT/7:00pm ET, Learning with AoPS: Perspectives from a Parent, Math Camp Instructor, and University Professor
[*]April 8th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS State Discussion
April 9th (Webinar), 4:00pm PT/7:00pm ET, Learn about Video-based Summer Camps at the Virtual Campus
[*]April 10th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MathILy and MathILy-Er Math Jam: Multibackwards Numbers
[*]April 22nd (Webinar), 4:00pm PT/7:00pm ET, Competitive Programming at AoPS (USACO).[/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Sunday, Apr 13 - Aug 10
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Sunday, Apr 13 - Aug 10
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Monday, Apr 7 - Jul 28
Sunday, May 11 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, May 14 - Aug 27
Friday, May 30 - Sep 26
Monday, Jun 2 - Sep 22
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Wednesday, Apr 16 - Jul 2
Thursday, May 15 - Jul 31
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 9 - Sep 24
Sunday, Jul 27 - Oct 19

Introduction to Number Theory
Thursday, Apr 17 - Jul 3
Friday, May 9 - Aug 1
Wednesday, May 21 - Aug 6
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Wednesday, Apr 16 - Jul 30
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Wednesday, Apr 23 - Oct 1
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Intermediate: Grades 8-12

Intermediate Algebra
Monday, Apr 21 - Oct 13
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

Intermediate Counting & Probability
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Friday, Apr 11 - Jun 27
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Wednesday, Apr 9 - Sep 3
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Wednesday, Apr 16 - Jul 2
Friday, May 23 - Aug 15
Monday, Jun 2 - Aug 18
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

MATHCOUNTS/AMC 8 Advanced
Friday, Apr 11 - Jun 27
Sunday, May 11 - Aug 10
Tuesday, May 27 - Aug 12
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Problem Series
Friday, May 9 - Aug 1
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Tuesday, Jun 17 - Sep 2
Sunday, Jun 22 - Sep 21 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Jun 23 - Sep 15
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Final Fives
Sunday, May 11 - Jun 8
Tuesday, May 27 - Jun 17
Monday, Jun 30 - Jul 21

AMC 12 Problem Series
Tuesday, May 27 - Aug 12
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22

AMC 12 Final Fives
Sunday, May 18 - Jun 15

F=ma Problem Series
Wednesday, Jun 11 - Aug 27

WOOT Programs
Visit the pages linked for full schedule details for each of these programs!


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

Introduction to Programming with Python
Thursday, May 22 - Aug 7
Sunday, Jun 15 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Tuesday, Jun 17 - Sep 2
Monday, Jun 30 - Sep 22

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22

USACO Bronze Problem Series
Tuesday, May 13 - Jul 29
Sunday, Jun 22 - Sep 1

Physics

Introduction to Physics
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Apr 2, 2025
0 replies
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

Find instructions and a list of contests to add here: https://artofproblemsolving.com/community/c40244h1064480_contests_to_add
1 reply
dcouchman
Sep 9, 2019
v_Enhance
Apr 5, 2023
k i Zero tolerance
ZetaX   49
N May 4, 2019 by NoDealsHere
Source: Use your common sense! (enough is enough)
Some users don't want to learn, some other simply ignore advises.
But please follow the following guideline:


To make it short: ALWAYS USE YOUR COMMON SENSE IF POSTING!
If you don't have common sense, don't post.


More specifically:

For new threads:


a) Good, meaningful title:
The title has to say what the problem is about in best way possible.
If that title occured already, it's definitely bad. And contest names aren't good either.
That's in fact a requirement for being able to search old problems.

Examples:
Bad titles:
- "Hard"/"Medium"/"Easy" (if you find it so cool how hard/easy it is, tell it in the post and use a title that tells us the problem)
- "Number Theory" (hey guy, guess why this forum's named that way¿ and is it the only such problem on earth¿)
- "Fibonacci" (there are millions of Fibonacci problems out there, all posted and named the same...)
- "Chinese TST 2003" (does this say anything about the problem¿)
Good titles:
- "On divisors of a³+2b³+4c³-6abc"
- "Number of solutions to x²+y²=6z²"
- "Fibonacci numbers are never squares"


b) Use search function:
Before posting a "new" problem spend at least two, better five, minutes to look if this problem was posted before. If it was, don't repost it. If you have anything important to say on topic, post it in one of the older threads.
If the thread is locked cause of this, use search function.

Update (by Amir Hossein). The best way to search for two keywords in AoPS is to input
[code]+"first keyword" +"second keyword"[/code]
so that any post containing both strings "first word" and "second form".


c) Good problem statement:
Some recent really bad post was:
[quote]$lim_{n\to 1}^{+\infty}\frac{1}{n}-lnn$[/quote]
It contains no question and no answer.
If you do this, too, you are on the best way to get your thread deleted. Write everything clearly, define where your variables come from (and define the "natural" numbers if used). Additionally read your post at least twice before submitting. After you sent it, read it again and use the Edit-Button if necessary to correct errors.


For answers to already existing threads:


d) Of any interest and with content:
Don't post things that are more trivial than completely obvious. For example, if the question is to solve $x^{3}+y^{3}=z^{3}$, do not answer with "$x=y=z=0$ is a solution" only. Either you post any kind of proof or at least something unexpected (like "$x=1337, y=481, z=42$ is the smallest solution). Someone that does not see that $x=y=z=0$ is a solution of the above without your post is completely wrong here, this is an IMO-level forum.
Similar, posting "I have solved this problem" but not posting anything else is not welcome; it even looks that you just want to show off what a genius you are.

e) Well written and checked answers:
Like c) for new threads, check your solutions at least twice for mistakes. And after sending, read it again and use the Edit-Button if necessary to correct errors.



To repeat it: ALWAYS USE YOUR COMMON SENSE IF POSTING!


Everything definitely out of range of common sense will be locked or deleted (exept for new users having less than about 42 posts, they are newbies and need/get some time to learn).

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
Diophantine equation !
ComplexPhi   5
N 11 minutes ago by aops.c.c.
Source: Romania JBMO TST 2015 Day 1 Problem 4
Solve in nonnegative integers the following equation :
$$21^x+4^y=z^2$$
5 replies
ComplexPhi
May 14, 2015
aops.c.c.
11 minutes ago
Combo problem
soryn   0
37 minutes ago
The school A has m1 boys and m2 girls, and ,the school B has n1 boys and n2 girls. Each school is represented by one team formed by p students,boys and girls. If f(k) is the number of cases for which,the twice schools has,togheter k girls, fund f(k) and the valute of k, for which f(k) is maximum.
0 replies
soryn
37 minutes ago
0 replies
Parity and sets
betongblander   7
N 39 minutes ago by ihategeo_1969
Source: Brazil National Olympiad 2020 5 Level 3
Let $n$ and $k$ be positive integers with $k$ $\le$ $n$. In a group of $n$ people, each one or always
speak the truth or always lie. Arnaldo can ask questions for any of these people
provided these questions are of the type: “In set $A$, what is the parity of people who speak to
true? ”, where $A$ is a subset of size $ k$ of the set of $n$ people. The answer can only
be $even$ or $odd$.
a) For which values of $n$ and $k$ is it possible to determine which people speak the truth and
which people always lie?
b) What is the minimum number of questions required to determine which people
speak the truth and which people always lie, when that number is finite?
7 replies
betongblander
Mar 18, 2021
ihategeo_1969
39 minutes ago
Mount Inequality erupts on a sequence :o
GrantStar   88
N 44 minutes ago by Nari_Tom
Source: 2023 IMO P4
Let $x_1,x_2,\dots,x_{2023}$ be pairwise different positive real numbers such that
\[a_n=\sqrt{(x_1+x_2+\dots+x_n)\left(\frac{1}{x_1}+\frac{1}{x_2}+\dots+\frac{1}{x_n}\right)}\]is an integer for every $n=1,2,\dots,2023.$ Prove that $a_{2023} \geqslant 3034.$
88 replies
+1 w
GrantStar
Jul 9, 2023
Nari_Tom
44 minutes ago
JBMO Shortlist 2022 N1
Lukaluce   8
N an hour ago by godchunguus
Source: JBMO Shortlist 2022
Determine all pairs $(k, n)$ of positive integers that satisfy
$$1! + 2! + ... + k! = 1 + 2 + ... + n.$$
8 replies
Lukaluce
Jun 26, 2023
godchunguus
an hour ago
P(x) | P(x^2-2)
GreenTea2593   4
N an hour ago by GreenTea2593
Source: Valentio Iverson
Let $P(x)$ be a monic polynomial with complex coefficients such that there exist a polynomial $Q(x)$ with complex coefficients for which \[P(x^2-2)=P(x)Q(x).\]Determine all complex numbers that could be the root of $P(x)$.

Proposed by Valentio Iverson, Indonesia
4 replies
GreenTea2593
4 hours ago
GreenTea2593
an hour ago
USEMO P6 (Idk what to say here)
franzliszt   16
N an hour ago by MathLuis
Source: USEMO 2020/6
Prove that for every odd integer $n > 1$, there exist integers $a, b > 0$ such that, if we let $Q(x) = (x + a)^
2 + b$, then the following conditions hold:
$\bullet$ we have $\gcd(a, n) = gcd(b, n) = 1$;
$\bullet$ the number $Q(0)$ is divisible by $n$; and
$\bullet$ the numbers $Q(1), Q(2), Q(3), \dots$ each have a prime factor not dividing $n$.
16 replies
franzliszt
Oct 25, 2020
MathLuis
an hour ago
Prove that the fraction (21n + 4)/(14n + 3) is irreducible
DPopov   110
N 2 hours ago by Shenhax
Source: IMO 1959 #1
Prove that the fraction $ \dfrac{21n + 4}{14n + 3}$ is irreducible for every natural number $ n$.
110 replies
DPopov
Oct 5, 2005
Shenhax
2 hours ago
Let \( a, b, c \) be positive real numbers satisfying \[ a^2 + c^2 = b(a + c). \
Jackson0423   3
N 2 hours ago by Mathzeus1024
Let \( a, b, c \) be positive real numbers satisfying
\[
a^2 + c^2 = b(a + c).
\]Let
\[
m = \min \left( \frac{a^2 + ab + b^2}{ab + bc + ca} \right).
\]Find the value of \( 2024m \).
3 replies
Jackson0423
Apr 16, 2025
Mathzeus1024
2 hours ago
real+ FE
pomodor_ap   3
N 2 hours ago by MathLuis
Source: Own, PDC001-P7
Let $f : \mathbb{R}^+ \to \mathbb{R}^+$ be a function such that
$$f(x)f(x^2 + y f(y)) = f(x)f(y^2) + x^3$$for all $x, y \in \mathbb{R}^+$. Determine all such functions $f$.
3 replies
pomodor_ap
Yesterday at 11:24 AM
MathLuis
2 hours ago
Inspired by hlminh
sqing   1
N 2 hours ago by sqing
Source: Own
Let $ a,b,c $ be real numbers such that $ a^2+b^2+c^2=1. $ Prove that $$ |a-kb|+|b-kc|+|c-ka|\leq \sqrt{3k^2+2k+3}$$Where $ k\geq 0 . $
1 reply
sqing
2 hours ago
sqing
2 hours ago
Is this FE solvable?
ItzsleepyXD   3
N 3 hours ago by jasperE3
Source: Original
Let $c_1,c_2 \in \mathbb{R^+}$. Find all $f : \mathbb{R^+} \rightarrow \mathbb{R^+}$ such that for all $x,y \in \mathbb{R^+}$ $$f(x+c_1f(y))=f(x)+c_2f(y)$$
3 replies
ItzsleepyXD
Yesterday at 3:02 AM
jasperE3
3 hours ago
PQ bisects AC if <BCD=90^o, A, B,C,D concyclic
parmenides51   2
N 3 hours ago by venhancefan777
Source: Mathematics Regional Olympiad of Mexico Northeast 2020 P2
Let $A$, $B$, $C$ and $D$ be points on the same circumference with $\angle BCD=90^\circ$. Let $P$ and $Q$ be the projections of $A$ onto $BD$ and $CD$, respectively. Prove that $PQ$ cuts the segment $AC$ into equal parts.
2 replies
parmenides51
Sep 7, 2022
venhancefan777
3 hours ago
Inequality with three conditions
oVlad   3
N 3 hours ago by sqing
Source: Romania EGMO TST 2019 Day 1 P3
Let $a,b,c$ be non-negative real numbers such that \[b+c\leqslant a+1,\quad c+a\leqslant b+1,\quad a+b\leqslant c+1.\]Prove that $a^2+b^2+c^2\leqslant 2abc+1.$
3 replies
oVlad
Yesterday at 1:48 PM
sqing
3 hours ago
IMO Shortlist 2011, Number Theory 3
orl   46
N Apr 15, 2025 by InterLoop
Source: IMO Shortlist 2011, Number Theory 3
Let $n \geq 1$ be an odd integer. Determine all functions $f$ from the set of integers to itself, such that for all integers $x$ and $y$ the difference $f(x)-f(y)$ divides $x^n-y^n.$

Proposed by Mihai Baluna, Romania
46 replies
orl
Jul 11, 2012
InterLoop
Apr 15, 2025
IMO Shortlist 2011, Number Theory 3
G H J
Source: IMO Shortlist 2011, Number Theory 3
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
vsamc
3789 posts
#34
Y by
Solution
This post has been edited 1 time. Last edited by vsamc, Jun 9, 2023, 6:55 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
popop614
271 posts
#35
Y by
solved at 4 AM after dying on (read: unable to solve) other problems in DNY-euclid (how do i unbad...)

All functions of the form $f(x) = \pm x^{D} + c$ where $c \in \mathbb{Z}$ and $D \in \mathbb{N}$ and $D \mid n$ work. It is clear that these do work by well known identities.

Observe that if $g(x) = f(x) - f(0)$ satisfies the condition then $f(x)$ does as well; henceforth assume that $f(0) = 0.$

Note that
\[ f(1) - f(0) \mid 1, \]so we obtain that $f(1) = \pm 1$. Assume from now on that $f(1) = 1$, as the other is handled in exactly the same manner.

Now note that
\[ f(1) - f(-1) \mid 1 - (-1) \implies f(-1) - 1 \mid 2, \]and also
\[ f(-1) - f(0) \mid -1 \implies f(-1) \in \{-1, 1\}.\]In particular we must obtain that $f(-1) = -1$ as $0 \nmid 2$.

Let $p$ be an arbitrarily large prime. Notice that
\[ f(p) \mid p^n, \]so therefore for this value of $p$ we obtain that $f(p) = \pm p^d$ for some value $d$ and some choice of sign.

Now assume that $f(p) = -p^d$ for some integer $d$, and let $k$ and $r$ be integers such that $dk+r=n$ and $0 \le r < d$. Then observe that
\[ f(p) - f(-1) \mid p^n + 1 \]or
\[ p^d - 1 \mid p^n + 1 \implies p^d - 1 \mid p^r + 1.\]Clearly for $p$ sufficiently large we can't have this. Therefore the negative sign is out.

Now suppose that $f(p) = p^d$ for some integer $d \nmid n$, and let $k$ and $r$ be integers such that $dk+r=n$ and $0 < r < d$. Then observe that
\[ f(p) - f(1) \mid p^n - 1 \]or
\[ p^d - 1 \mid p^n - 1 \implies p^d - 1 \mid p^r - 1,\]again obviously impossible. Therefore for sufficiently large (realistically like $p>2$) we must have that $f(p) = p^d$ for some positive divisor $d$ of $n$.

let $D$ be such that there are infinitely many primes $p$ such that $f(p) = p^D$. This exists as $n$ has a finite number of divisors. Now,
\[ f(x) - p^D \mid x^n - p^n \implies f(x) - p^D \mid x^n - p^n - f(x)^{n/D} + p^n. \]
However, taking $p$ incredibly large, we obtain that $f(x)^{n/D} = x^n$, or $f(x) = x^D$ for said divisor $D$. Undoing all the WLOG stuff we get our result.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
andyxpandy99
365 posts
#36
Y by
The key idea is to realize that we can freely shift $f$ by a constant and that if $f$ works then $-f$ works. This implies that WLOG we can set $f(0) = 0$ and since $f(1) \mid 1$ take $f(1) = 1$. Now consider a particular prime $p$. Plug in $x = p$ and $y = 0$ to get $f(p) \mid p^n$. It follows that $f(p) = \pm p^m$ for some $m \leq n$. We will prove that $f(p) \neq -p^m$. Assume otherwise.

Plugging in $m = p$ and $n = 1$ now yields $$-p^m-1 \mid p^n-1$$which is equivalent to $$p^m+1 \mid p^n-1$$Since $p^m+1 \mid p^{2m}-1$ we have $$p^m+1 \mid p^{\gcd(2m,n)}-1 = p^{\gcd(m,n)}-1$$because $n$ is odd. If $m > 0$ then $p^m +1$ is clearly greater than $p^{\gcd(m,n)}-1 \leq p^m-1$. It follows that $p^{\gcd(m,n)} -1 = 0$ or $m = 0$. This means that $f(p) = -1$.

We will now prove that $f$ is injective. To see this, note that if $f(x) = f(y)$ then $x^n-y^n = 0$ so $x =y$ as desired. Plugging in $x = -1$ and $y = 0$ yields $f(-1) \mid -1$ but since $f$ is injective $f(-1) \neq f(1)$ so $f(-1) = -1$. It follows that $f(p) \neq f(-1) = -1$ so we arrive at a contradiction and $f(p) = p^m$ as desired.

If $f(p) = p^m$ plugging in $x = p$ and $y = 1$ yields $$p^m-1 \mid p^n-1$$which means $m \mid n$. So, for a particular $p$ we have $f(p) = p^m$ where $m$ is a factor of $n$. Since there are infinitely many primes and only a finite number of factors of $n$, there has to exist a $k \mid n$ such that $f(p) = p^k$ for infinitely many primes $p$, not just a particular value of $p$. Now note that $$p^k - f(y) \mid p^n-y^n$$and $$p^k-f(y) \mid p^n-f(y)^{\frac{n}{k}}$$implies $$p^k-f(y) \mid f(y)^{\frac{n}{k}}-y^n$$The RHS is now not dependent on $p$ and we are free to take a big enough $p$ such that we force $f(y)^{\frac{n}{k}} = y^n$ which yields $f(y) = y^k$. Recalling that we can freely shift and negate, our answer is thus $f(y) = \pm y^k + c$ for some constant $c$.
This post has been edited 1 time. Last edited by andyxpandy99, Aug 24, 2023, 3:26 PM
Reason: typo
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
huashiliao2020
1292 posts
#38
Y by
It's obvious that if f is a sol then f+c is also a sol, so is -f, so WLOG f(0)=0, and henceforth ignore the +c and sign stuff; (1,0) gives f(1)=1, (p,0) for a prime p gives $f(p)=p^k$ (WLOG from f$\leftrightarrow$-f), (p,1) gives $p^k-1\mid p^n-1\implies k\mid n$. Now, since n has finite divisors but f is infinite, take $f(p)=p^k$ where there are infinite p that give the same k. Then, $f(x)-p^k\mid x^n-p^n-f(x)^{n/k}+p^n$; taking sufficiently large p (there are infinite of them), since the RHS doesn't depend on p, once the LHS>RHS we must have RHS=0, so $x^n=f(x)^{n/k}\iff f(x)=x^k$ for all x, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1518 posts
#39
Y by
WLOG shift $f$ and invert such that $f(0) = 0$ and $f(1) = 1$.

Claim: For primes $p$, $f(p) = p^k$ for some not fixed integer $k \mid n$.
Proof. Note that $f(x) \mid x^n$ and $f(1) = 1$.
Let $f(p) = p^k$. Then $p^k - 1 \mid p^n - 1$ so $p^{\gcd(n,k)} - 1 = p^k - 1$, and thus $k \mid n$. $\blacksquare$

Claim: For all $n$, $f(y) = y^k$ for $y \le n$ and some fixed $k$.
Proof. Take a prime $q > n^{n^n}$. Then \[ q^k - f(y) \mid (q^n - y^n) - (q^n - f(y)^{\frac{n}{k}}) = f(y)^{\frac{n}{k}} - y^n \]so $f(y)^{\frac{n}{k}} = y^n$ and $f(y) = y^k$ for all $y \le n$. $\blacksquare$
Then $k$ is independent of $n$ by considering $f(2)$, so $f(x) = x^k$ for all $k$.
As such, $f(x) = \pm x^k + c$ for $k \mid n$ is the solution set.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
thdnder
194 posts
#40
Y by
There exists a positive integer $d$ dividing $n$, $c \in \mathbb{Z}$ and an $\epsilon \in \{1, -1\}$ such that $f(x) = \epsilon x^d + c$ for all $x \in \mathbb{Z}$.

If $f$ is a solution, then for all $c \in \mathbb{Z}$, $f - c$ is a solution. Thus we can assume that $f(0) = 0$. Then since $f(x) - f(0) \mid x^n - 0^n$, so $f(x) \mid x^n$. Thus for all prime $p$, we have $f(p) \mid p^n$. Since if $f$ is a solution, then $-f$ is also a solution, so we can assume $f(1) = 1$. Let $f(p) = \epsilon p^k$ for some $\epsilon \in \{-1, 1\}$, $k \le n$. Then $\epsilon p^k - 1 \mid p^n - 1$, thus $k \mid n$ and $\epsilon = 1$ for all prime $p$. Since there are infinitely many primes, so by pigeonhole principle, there are infinitely many primes $p$ such that $f(p) = p^d$ for some $d \mid n$.

Now take large enough prime $p$ such that $f(p) = p^d$. Then $f(x) - f(p) \mid x^n - p^n$, so $x^n - p^n \equiv x^n - f(x)^{\frac{n}{d}} (f(x) - p^d)$. Since $p$ is large enough, this forces $f(x) = x^d$. Thus $f(x) = \epsilon x^d + c$ for some constant $c$, $\epsilon \in \{1, -1\}$, $d \mid n$. So we're done. $\blacksquare$
This post has been edited 1 time. Last edited by thdnder, Oct 5, 2023, 8:43 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8857 posts
#41
Y by
The answer is $f(x) = \varepsilon \cdot x^d + c$ for any $d \mid n$, $\varepsilon \in \{-1, 1\}$, and $c$ an integer. These obviously work.

To show that these are the only functions, note that if $f$ works, then $f+c$ works for any $c \in \mathbb Z$; thus, we may assume $f(0) = 0$. Furthermore, $f(1) - f(0) \mid 1$, and we can also assume $f(1) = 1$.

Now fix some prime $p$. As $f(p) \mid p^n$, set $f(p) = p^k$ for some $k$. Furthermore, because $f(p) - 1 \mid p^n - 1$, we have $k \mid n$.

I claim that $k$ is consistent across all $p$. To show this, assume that $f(q) = q^\ell$. Then as $p^k - q^\ell \mid p^n - q^n$, we have
$$p^k - q^{\ell} \mid p^{k+n-\ell} - q^n - p^n + q^n = p^n(p^{\ell - k} - 1).$$As the LHS is relatively prime to $p^n$, it follows for size reasons that $p^{\ell - k} = 1$, or $\ell = k$.

So we have $f(p) = p^d$ for some fixed $d$ across all primes. Then for any $n$, by setting $p$ big we have $$f(x) - p^d \mid x^d - f(x)$$implying $f(x) = x^d$ too.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
kamatadu
477 posts
#42
Y by
I was absolutely delighted by this problem. Really loved this!! :love:

The solutions are $f(x) \equiv x^d + c$ and $f(x) \equiv -x^d + c$, where $d>0$ and $d \mid n$, $c\in\mathbb Z$.

Note that scaling the function by a constant does not effect the condition $f(x) - f(y) \mid x^n - y^n$. So WLOG assume that $f(0) = 0$. Also note that if $f$ works, then $-f$ works too. So multiplying the entire function by $-1$ does not change the condition either. We will use this fact later on.

Firstly note that $f$ is injective. Otherwise let $f(a) = f(b)$ for $a\neq b$. But then substituting $P(a,b)$ gives a contradiction as the divisor becomes undefined. Now note that $P(1,0) \implies f(1) \mid 1$ and $P(-1,0) \implies f(-1) \mid -1$. So we get that $f(1),f(-1) \in \left\{+1,-1\right\}$. Now using the injectivity, we get that one of them must equal $1$. So let, $f(a) = 1$.

Let $\left\{p_i\right\}$ be the sequence of primes.

$P(p_i,0) \implies f(p_i) \mid p_i^n \implies f(p_i) = p_i^{k_i}$ for some $1 \le k_i \le n$.

I claim that there are infinitely many $i$ such that $f(p_i) = p_i^{d_i}$ where $d_i$ is a positive divisor of $n$. Suppose on the contrary that there are finitely many such $i$. Thus there are infinitely many $j$ for which $f(p_j) = p_j^{k_j}$ where $k_j$ is not a divisor of $n$. By infinite PHP, we get a sequence of primes $\left\{q_i\right\}$ for which $f(q_i) = q_i^k$ where $k$ is fixed.

$P(q_i,a) \implies f(q_i) - 1 \mid q_i^n - a^n \implies q_i^k - 1 \mid q_i^n - a^n$.

Now let $n = ks + t$ where $0 < t < k$. Then we get that,
\[ q_i^k - 1 \mid q_i^n -a^n \equiv (q_i^k)^s \cdot q_i^t - a^n \equiv (1)^s \cdot q_i^t - a^n = q_i^t - a^n. \]
But then note that $a^n$ is just a constant. So after some sufficiently large $q_i$, we get that $q_i > a^n$. Thus we get that $q_i^k -1 \le q_i^t - a^n$ for all large enough $q_i$. We obviously have that $k > t$ and thus by taking a very large $q_i$, we get a contradiction.

Thus we must have had that there are infinitely many $i$ such that $f(p_i) = p_i^{d_i}$ where $d_i$ is a positive divisor of $n$. Now again by infinite PHP, we get that $f(p_i) = p_i^d$ where $d$ is a fixed divisor of $n$.

Now we fix some $u \in \mathbb Z$. Then note that $f(u) - f(p_i) \mid f(u)^{n/d} - f(p_i)^{n/d}= f(u)^{n/d} - p_i^n$.

Then we have that,
\[ P(u,p_i) \implies f(u) - f(p_i) \mid u^n - p_i^n \equiv (u^n - p_i^n) - (f(u)^{n/d} - p_i^n) = u^n - f(u)^{n/d} \implies f(u) - p_i^d \mid u^n - f(u)^{n/d}. \]
Now taking a sufficiently large $p_i$, we get that $u^n - f(u)^{n/d} \equiv 0$ that is $f(u) = u^d$. Now since $u$ was arbitrary, and we are done. :yoda:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
794 posts
#43
Y by
We claim our only answers are $\boxed{f(x)=-x^a+b, ~ f(x)=-x^a+b}$, where $a \mid n$. Denote the assertion as $A(x,y)$.

Shifting tells us $b$ can be any integer, so we can assume WLOG $f(0)=0$. $A(1,0)$ gives us the $\pm$, so we can assume WLOG $f(1)=1$, from which $A(-1,0)$ forces $f(-1)=-1$.
  • Consider an arbitrarily large prime $p$. Then $A(p,0)$ and $A(p,1)$ implies $f(p)=p^a$, where $a \mid n$.
  • Consider a prime $q<p$. Then $A(p,q)$ says
    \[p^a-q^b = f(p)-f(q) \mid p^n-q^n, \quad p^a-q^b \mid p^n-q^{nb/a}.\]
    Hence the LHS must also divide $q^{nb/a}-q^n$. Since $p$ is arbitrarily large, we must have $\frac{nb}{a}=n$, or $a=b$, so $f(x)=x^a$ for all primes.
  • Fix an integer $x$, and let $n=ka+r$, where $0 \leq r \leq k-1$. Now $A(p,x)$ says
    \[p^a-f(x) = f(p)-f(x) \mid p^n-x^n = p^r \cdot f(p)^k-x^n,\]\[p^a-f(x) \mid p^r \left(f(p)^k-f(x)^k\right).\]
    Hence the LHS must also divide $p^r \cdot f(x)^k - x^n$, from which the size and infinite possibilities of $p$ forces this quantity to be 0 and $r=0$. Hence $f(x)=x^a$ for all $x$. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5587 posts
#44 • 1 Y
Y by bjump
The answer is $x^d + C$ and $-x^d + C$ for any positive integer $d\mid n$ and integer constant $C$. These clearly work. Now we show they are the only solutions.

Let $P(x,y)$ denote the assertion that\[ f(x) - f(y) \mid x^n - y^n\]Since $f$ works iff $x + c$ works, we may WLOG that $f(0) = 0$. Now, since $f$ works iff $-f$ works, we may WLOG $f(1) \ge 0$. It suffices to show that $f(x) = x^d$ for some positive integer $d$ dividing $n$.

Claim: $f$ is injective
Proof: If $f(a) = f(b)$, then $P(a,b)$ gives $0\mid a^n - b^n$, so $a^n = b^n \implies a = b$. $\square$

$P(x,0): f(x) \mid x^n$

Now setting $x = 1$ here gives that $f(1) \mid 1$. Since $f(1) \ge 0$, $f(1) = 1$. Similarly, setting $x = -1$ gives $f(-1) \mid 1$. Since $f(1) \ne f(-1)$, we have $f(-1) = -1$.

For any prime $p$, $P(p,0)$ gives that $f(p) \mid p^n$, so $|f(p)|$ must be a power of $p$.

Claim: For any prime $p$, we have $f(p) > 0$.
Proof: Suppose otherwise. By injectivity, $f(p) \ne 0$. Let $f(p) = -p^k$ for some positive integer $k \le n$.

$P(p,1)$ gives that $p^k + 1 \mid p^n - 1$, so $p^k + 1 \mid p^{nk} - 1$. Since $n$ is odd, we also have $p^k + 1\mid p^{nk} + 1$, so $p^k + 1 \mid 2$, which is absurd. $\square$

Hence $f(p)$ is a power of $p$ for any prime $p$. Then by infinite pigeonhole there exists a positive integer $d \le n$ such that infinitely many primes $p$ satisfy $f(p) = p^d$.

For any such prime $p$, $P(p,1)$ gives $p^d - 1 \mid p^n - 1$. Now $p^n \equiv 1\pmod{p^d - 1}$, so $\frac{p^n}{p^{dk}}$ is also $1\pmod{p^d - 1}$, meaning that $p^d - 1 \mid p^{n - kd} - 1$ for any positive integer $k$. If $d \nmid n$, we could choose $k$ such that $1 \le a = n - kd \le d - 1$. We have $p^d  - 1 \mid p^a - 1$, which is a contradiction by size as $1 \le a < d$. Therefore, $d \mid n$.

Now, if $p$ is a prime with $f(p) = p^d$, then $P(x,p)$ gives $f(x) - p^d \mid x^n - p^n$. Hence $f(x) - p^d \mid x^{nd} - p^{nd}$.

Since $f(x) - p^d \mid f(x)^n - p^{nd}$, we have\[f(x) - p^d \mid x^{nd} - p^{nd} - (f(x)^n - p^{nd}) = x^{nd} - f(x)^n \]Taking $p$ sufficiently large gives that $x^{nd} = f(x)^n$, so $f(x) = x^d$, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AshAuktober
993 posts
#45
Y by
Shift and invert $f$ so that $f(0) = 0, f(1) = 1$. Then some case-checking and bounding shows that for all primes $p$, $f(p) = p^a$ with $a \mid n$. Choose the $a$ that appears infinitely many times (which exists by infinite PHP).
Now for $y = p$ satisfying the condition, $f(x) - y^a \mid x^n - y^n \implies f(x) - y^a \mid x^n - f(x)^{\frac{n}{a}}$. As this means the quantity on the RHS has infinitely many divisors, we do indeed have $f(x) = x^a$ for fixed $a \mid n$. Un-transforming, the general function is $f(x) = cx^a + d,$ where $c \in \{-1, 1\}, d \in \mathbb{Z}, a \mid n$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Zsnim
6 posts
#46
Y by
Note for the start of the solution, for simplicity, we only play around for the answer $f(x)=x^k+c$ for $k\mid n$, but the solution $f(x)=-x^k+c$ for $k\mid n$ can be gotten by completely analog means.

Claim:
$f(p)=p^k+f(0)$ for some $k\mid n$

Proof:
Consider the assertion $P(p,0)$ where $p$ is a prime, we get:
\[
f(p)-f(0) \mid p^n \implies f(p)=p^k+f(0)  \quad \text{for some $k\leq n$}
\]Now consider the assertions $P(p,q)$ where $p$ and $q$ are prime:
\[
f(p)-f(q) \mid p^n-q^n \iff p^k-q^l \mid p^n - q^n
\]Notice that this is an expression on which we can use the Euclidean algorithm and get something beneficial:
\[
p^k-q^l \mid p^n - q^n-(p^n-q^{l}\cdot p^{n-k}) \implies p^k-q^l \mid p^{n-k} - q^{n-l}
\]WLOG assume that $k>l$, which means that the power of $p$ is going to be the first one to dip under its respective power (basically, what I mean is that after appyling Euclidean algorithm we will get that the power of $p$ is smaller then $k$). So after applying the Euclidean algorithm a couple of times, we will get
\[
p^k-q^l \mid p^x - q^y  \quad \text{where} \quad x<k
\]But now we can just say that we pick $p$ which is large enough so and $q$ small enough, in that way we can make it so that $p^k-q^l > p^x - q^y $
Thus we conclude that $k=l$, now we are looking at (also assuming $p\neq q$)
\[
p^k-q^k \mid p^n-q^n
\]We can now proceed by the Euclidean algorithm or we can simply just scream out cyclotomic polynomials and conclude $k\mid n$

Claim:
$f(p^a)=p^{ak}+f(0)$ for any integer $a$ and for $k\mid n$

Proof:
This is basically as above, only exception is a little uglier exponents

Claim:
$f(pq)=(pq)^k+f(0)$ for some $k\mid n$

Proof:
Okay so we have some structure for primes, but let's extend this to integers which are made up of $2$ primes. By simillar methods as above, we have that $f(pq)=p^k\cdot q^l+f(0)$, and once again, consider the assertion $P(pq,q)$ we get
\[
p^kq^l-q^r\mid p^nq^n-q^n \iff q^r(p^kq^{l-r}-1)\mid q^n(p^n-1) 
\]Now we have $p^kq^{l-r}-1\mid (p^n-1)$, since we can take $q$ to be sufficiently large, we either have $p=1$ (which is a no) or $l=r$

Remark:
We immediately saw that we must have $l\geq r$, in the other case we get \[
p^k-q^{r-l} \mid p^n-1
\]But this is absurd since we can make $p^n-1$ have infinitely many divisors by moving $q$ around

Now assume we consider the assertion $P(pq,p)$, we get something which looks like
\[
p^kq^l-p^r\mid p^nq^n-p^n 
\]By the same reasoning as above we can conclude that $r=l$, hence proving that the degree of $p$ and $q$ is the same.

Claim:
$f(p^aq^b)=(p^aq^b)^k+f(0)$ for $k\mid n$

Proof:
By considering $P(p^aq^b,0)$ we get that $f(p^aq^b)=p^xq ^y$ such that $x\leq an$ and $y \leq bn$. Now we consider the assertion $P(p^aq^b, p^a)$:
\[
p^x(p^{ak-x}-q^y)\mid p^{an}(q^{an}-1) 
\]Since $p^{ak-x}-q^y \nmid p^{an}$ we have
\[
p^{ak-x}-q^y \mid q^{an}-1
\]But since we can select a huge $p$ we have that either $q=1$ (a no), or $ak=x$ (which is a yes)


Claim:
$f(n)=(n)^k+f(0)$ for $k\mid n$

Proof:
Let $n=p_1^{\alpha_1}\cdot p_2^{\alpha_2} \cdots p_m^{\alpha_m}$

This is a generalization of the above. We consider the following assertions
\[
P(n, p_1^{\alpha_1}) \quad P(n,p_2^{\alpha_2}) \quad \dots \quad P(p_m^{\alpha_m})
\]We basically prove the claim for every prime $p$, as seen when we have only $2$ primes, this simply works because we can always selects a huge prime that is not present in the denominator.


Hence finally we can conclude: $f(x)=\pm x^k+c$ for $k\mid n$ and any integer $c$
This post has been edited 1 time. Last edited by Zsnim, Jan 7, 2025, 8:09 PM
Reason: LaTeX fixing
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math004
23 posts
#47
Y by
Note that if $f$ is a solution then so is $-f+a$ for some constant $a.$ Thus, we can suppose WLOG that $f(0)=0$ and $f(1)=1.$

\[P(p,0) : f(p) \mid p^n\]which implies that $f(p)=\pm p^k$ for some non negative integer $k.$ Now, $P(1,p)$ gives that $1\pm p^k \mid p^n -1.$ If $f(p)=-p^k,\quad O_{1-p^k}(p)\mid (2k,n)$ but does not divide $k$ which is impossible. Hence $f(p)$ is a power of $p$ for all primes $p.$ Moreover, \[p^k-1\mid p^n-1 \implies O_{p^k-1}(p)\mid n  \iff k \mid n.\]By piegonhole principle, there is a infinity of prime numbers and a fixed divisor of $n$ named $c,$ such that $f(p)=p^c.$ Now, fix $x$ and take a large enough such a prime and observe that
\[0\equiv  x^n-p^n =x^n -{p^{c}}^{\frac{n}{c}} \equiv x^n-f(x)^{\frac{n}{c}}\pmod{f(x)-p^c}\]For large enough $p^c,$ we have $x^n=f(x)^{n/c} \iff f(x)=x^c.$ Whence the answer is $f\equiv \pm x^c+a  $ for some constant $a$ and $c$ divisor of $n.$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
OronSH
1728 posts
#49 • 3 Y
Y by megarnie, megahertz13, gvh300
We claim $f(x)=(-1)^ix^d+c$ for $d\mid n$ are the solutions, which clearly work.

Shift so that $f(0)=0$. Then $P(p,0)$ implies $f(p)=\pm p^d\mid p^n$. Additionally $P(\pm 1,0)$ gives $P(\pm 1)=\pm 1$ so the product of $P(p,\pm 1)$ gives $p^{2d}-1\mid p^{2n}-1$. By a euclidean algorithm argument, $2d\mid 2n$ so $d\mid n$. Thus there exists some $i\in\{0,1\}$ and $d\mid n$ for which $f(p)=(-1)^ip^d$ for infinitely many primes $p$.

Then $P(x,p)$ gives $f(x)-(-1)^ip^d\mid x^n-p^n$, but $f(x)-(-1)^ip^d\mid f(x)^{\frac nd}-(-1)^ip^n$ so combining these we have $f(x)-(-1)^ip^d\mid f(x)^{\frac nd}-(-1)^ix^n$ for infinitely many $p$, implying $f(x)^{\frac nd}-(-1)^ix^n=0$, or $f(x)=(-1)^ix^d$ for all $x$. Shifting back gives the desired.
This post has been edited 1 time. Last edited by OronSH, Feb 21, 2025, 8:59 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
InterLoop
274 posts
#50
Y by
solution
Z K Y
N Quick Reply
G
H
=
a