Stay ahead of learning milestones! Enroll in a class over the summer!

G
Topic
First Poster
Last Poster
k a May Highlights and 2025 AoPS Online Class Information
jlacosta   0
May 1, 2025
May is an exciting month! National MATHCOUNTS is the second week of May in Washington D.C. and our Founder, Richard Rusczyk will be presenting a seminar, Preparing Strong Math Students for College and Careers, on May 11th.

Are you interested in working towards MATHCOUNTS and don’t know where to start? We have you covered! If you have taken Prealgebra, then you are ready for MATHCOUNTS/AMC 8 Basics. Already aiming for State or National MATHCOUNTS and harder AMC 8 problems? Then our MATHCOUNTS/AMC 8 Advanced course is for you.

Summer camps are starting next month at the Virtual Campus in math and language arts that are 2 - to 4 - weeks in duration. Spaces are still available - don’t miss your chance to have an enriching summer experience. 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 upcoming events:
[list][*]May 9th, 4:30pm PT/7:30pm ET, Casework 2: Overwhelming Evidence — A Text Adventure, a game where participants will work together to navigate the map, solve puzzles, and win! All are welcome.
[*]May 19th, 4:30pm PT/7:30pm ET, What's Next After Beast Academy?, designed for students finishing Beast Academy and ready for Prealgebra 1.
[*]May 20th, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 1 Math Jam, Problems 1 to 4, join the Canada/USA Mathcamp staff for this exciting Math Jam, where they discuss solutions to Problems 1 to 4 of the 2025 Mathcamp Qualifying Quiz!
[*]May 21st, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 2 Math Jam, Problems 5 and 6, Canada/USA Mathcamp staff will discuss solutions to Problems 5 and 6 of the 2025 Mathcamp Qualifying Quiz![/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
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
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
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
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
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
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
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

Paradoxes and Infinity
Mon, Tue, Wed, & Thurs, Jul 14 - Jul 16 (meets every day of the week!)

Intermediate: Grades 8-12

Intermediate Algebra
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
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
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
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
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

AIME Problem Series A
Thursday, May 22 - Jul 31

AIME Problem Series B
Sunday, Jun 22 - Sep 21

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
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
May 1, 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
Find min and max
lgx57   0
11 minutes ago
Source: Own
$x_1,x_2, \cdots ,x_n\ge 0$,$\displaystyle\sum_{i=1}^n x_i=m$. $k_1,k_2,\cdots,k_n >0$. Find min and max of
$$\sum_{i=1}^n(k_i\prod_{j=1}^i x_j)$$
0 replies
lgx57
11 minutes ago
0 replies
Find min
lgx57   0
14 minutes ago
Source: Own
$a,b>0$, $a^4+ab+b^4=60$. Find min of
$$4a^2-ab+4b^2$$
$a,b>0$, $a^4-ab+b^4=60$. Find min of
$$4a^2-ab+4b^2$$
0 replies
lgx57
14 minutes ago
0 replies
Geometry
Lukariman   3
N an hour ago by Lukariman
Given circle (O) and point P outside (O). From P draw tangents PA and PB to (O) with contact points A, B. On the opposite ray of ray BP, take point M. The circle circumscribing triangle APM intersects (O) at the second point D. Let H be the projection of B on AM. Prove that $\angle HDM$ = 2∠AMP.
3 replies
1 viewing
Lukariman
Yesterday at 12:43 PM
Lukariman
an hour ago
III Lusophon Mathematical Olympiad 2013 - Problem 5
DavidAndrade   2
N an hour ago by KTYC
Find all the numbers of $5$ non-zero digits such that deleting consecutively the digit of the left, in each step, we obtain a divisor of the previous number.
2 replies
DavidAndrade
Aug 12, 2013
KTYC
an hour ago
Maximum number of terms in the sequence
orl   11
N 2 hours ago by navier3072
Source: IMO LongList, Vietnam 1, IMO 1977, Day 1, Problem 2
In a finite sequence of real numbers the sum of any seven successive terms is negative and the sum of any eleven successive terms is positive. Determine the maximum number of terms in the sequence.
11 replies
orl
Nov 12, 2005
navier3072
2 hours ago
Combinatorics
P162008   2
N 2 hours ago by cazanova19921
Let $m,n \in \mathbb{N}.$ Let $[n]$ denote the set of natural numbers less than or equal to $n.$

Let $f(m,n) = \sum_{(x_1,x_2,x_3, \cdots, x_m) \in [n]^{m}} \frac{x_1}{x_1 + x_2 + x_3 + \cdots + x_m} \binom{n}{x_1} \binom{n}{x_2} \binom{n}{x_3} \cdots \binom{n}{x_m} 2^{\left(\sum_{i=1}^{m} x_i\right)}$

Compute the sum of the digits of $f(4,4).$
2 replies
P162008
3 hours ago
cazanova19921
2 hours ago
USAMO 2003 Problem 1
MithsApprentice   68
N 2 hours ago by Mamadi
Prove that for every positive integer $n$ there exists an $n$-digit number divisible by $5^n$ all of whose digits are odd.
68 replies
MithsApprentice
Sep 27, 2005
Mamadi
2 hours ago
Centroid, altitudes and medians, and concyclic points
BR1F1SZ   3
N 2 hours ago by EeEeRUT
Source: Austria National MO Part 1 Problem 2
Let $\triangle{ABC}$ be an acute triangle with $BC > AC$. Let $S$ be the centroid of triangle $ABC$ and let $F$ be the foot of the perpendicular from $C$ to side $AB$. The median $CS$ intersects the circumcircle $\gamma$ of triangle $\triangle{ABC}$ at a second point $P$. Let $M$ be the point where $CS$ intersects $AB$. The line $SF$ intersects the circle $\gamma$ at a point $Q$, such that $F$ lies between $S$ and $Q$. Prove that the points $M,P,Q$ and $F$ lie on a circle.

(Karl Czakler)
3 replies
BR1F1SZ
Monday at 9:45 PM
EeEeRUT
2 hours ago
IMO Genre Predictions
ohiorizzler1434   60
N 2 hours ago by Yiyj
Everybody, with IMO upcoming, what are you predictions for the problem genres?


Personally I predict: predict
60 replies
ohiorizzler1434
May 3, 2025
Yiyj
2 hours ago
square root problem
kjhgyuio   5
N 3 hours ago by Solar Plexsus
........
5 replies
kjhgyuio
May 3, 2025
Solar Plexsus
3 hours ago
Diodes and usamons
v_Enhance   47
N 3 hours ago by EeEeRUT
Source: USA December TST for the 56th IMO, by Linus Hamilton
A physicist encounters $2015$ atoms called usamons. Each usamon either has one electron or zero electrons, and the physicist can't tell the difference. The physicist's only tool is a diode. The physicist may connect the diode from any usamon $A$ to any other usamon $B$. (This connection is directed.) When she does so, if usamon $A$ has an electron and usamon $B$ does not, then the electron jumps from $A$ to $B$. In any other case, nothing happens. In addition, the physicist cannot tell whether an electron jumps during any given step. The physicist's goal is to isolate two usamons that she is sure are currently in the same state. Is there any series of diode usage that makes this possible?

Proposed by Linus Hamilton
47 replies
v_Enhance
Dec 17, 2014
EeEeRUT
3 hours ago
3-var inequality
sqing   1
N 3 hours ago by sqing
Source: Own
Let $ a,b\geq  0 ,a^3-ab+b^3=1  $. Prove that
$$  \frac{1}{2}\geq     \frac{a}{a^2+3 }+ \frac{b}{b^2+3}   \geq  \frac{1}{4}$$$$  \frac{1}{2}\geq     \frac{a}{a^3+3 }+ \frac{b}{b^3+3}   \geq  \frac{1}{4}$$$$  \frac{1}{2}\geq \frac{a}{a^2+ab+2}+ \frac{b}{b^2+ ab+2}  \geq  \frac{1}{3}$$$$  \frac{1}{2}\geq \frac{a}{a^3+ab+2}+ \frac{b}{b^3+ ab+2}  \geq  \frac{1}{3}$$Let $ a,b\geq  0 ,a^3+ab+b^3=3  $. Prove that
$$  \frac{1}{2}\geq     \frac{a}{a^2+3 }+ \frac{b}{b^2+3}   \geq  \frac{1}{4}(\frac{1}{\sqrt[3]{3}}+\sqrt[3]{3}-1)$$$$  \frac{1}{2}\geq     \frac{a}{a^3+3 }+ \frac{b}{b^3+3}   \geq  \frac{1}{2\sqrt[3]{9}}$$$$  \frac{1}{2}\geq \frac{a}{a^2+ab+2}+ \frac{b}{b^2+ ab+2}  \geq  \frac{4\sqrt[3]{3}+3\sqrt[3]{9}-6}{17}$$$$  \frac{1}{2}\geq \frac{a}{a^3+ab+2}+ \frac{b}{b^3+ ab+2}  \geq  \frac{\sqrt[3]{3}}{5}$$
1 reply
sqing
4 hours ago
sqing
3 hours ago
IMO ShortList 2001, combinatorics problem 3
orl   37
N 4 hours ago by deduck
Source: IMO ShortList 2001, combinatorics problem 3, HK 2009 TST 2 Q.2
Define a $ k$-clique to be a set of $ k$ people such that every pair of them are acquainted with each other. At a certain party, every pair of 3-cliques has at least one person in common, and there are no 5-cliques. Prove that there are two or fewer people at the party whose departure leaves no 3-clique remaining.
37 replies
orl
Sep 30, 2004
deduck
4 hours ago
area of O_1O_2O_3O_4 <=1, incenters of right triangles outside a square
parmenides51   2
N 4 hours ago by Solilin
Source: Thailand Mathematical Olympiad 2012 p4
Let $ABCD$ be a unit square. Points $E, F, G, H$ are chosen outside $ABCD$ so that $\angle AEB =\angle BF C = \angle CGD = \angle DHA = 90^o$ . Let $O_1, O_2, O_3, O_4$, respectively, be the incenters of $\vartriangle ABE, \vartriangle BCF, \vartriangle CDG, \vartriangle DAH$. Show that the area of $O_1O_2O_3O_4$ is at most $1$.
2 replies
parmenides51
Aug 17, 2020
Solilin
4 hours ago
integer functional equation
ABCDE   148
N Apr 22, 2025 by Jakjjdm
Source: 2015 IMO Shortlist A2
Determine all functions $f:\mathbb{Z}\rightarrow\mathbb{Z}$ with the property that \[f(x-f(y))=f(f(x))-f(y)-1\]holds for all $x,y\in\mathbb{Z}$.
148 replies
ABCDE
Jul 7, 2016
Jakjjdm
Apr 22, 2025
integer functional equation
G H J
G H BBookmark kLocked kLocked NReply
Source: 2015 IMO Shortlist A2
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Sedro
5845 posts
#156
Y by
The only solutions are $f(x)=-1$ and $f(x)=x+1$, which clearly work. We now show that there are no other solutions. Let $P(x,y)$ denote the assertion.

Clearly, the only constant solution is $f(x)=-1$, so assume $f$ is nonconstant. By $P(x,f(x))$, we have that $f(x-f(f(x)))=-1$. Let $u=-f(f(0))$; then, $f(u)=-1$. From $P(x,u)$ we obtain $f(x+1)=f(f(x))$. Then, from $P(f(x)-1,x)$, we obtain $f(-1) = f(f(f(x)-1))-f(x)-1$. Since $f(x+1)=f(f(x))$, we have $f(f(f(x)-1)) = f(f(x)) = f(x+1)$. Thus, $f(x+1)-f(x) = f(-1)+1$. The right hand side is constant, so $f$ is linear. Since we assumed $f$ is nonconstant, $f$ is injective, and by $f(x+1)=f(f(x))$, we must have $f(x)=x+1$, as desired. $\blacksquare$
This post has been edited 1 time. Last edited by Sedro, Jul 21, 2024, 10:24 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
joshualiu315
2534 posts
#157 • 1 Y
Y by Amir Hossein
The answer is $f(x) = \boxed{-1, x-1}$, which works. Denote the given assertion as $P(x,y)$.

Notice that $P(x,f(x))$ yields

\[f(x-f(f(x))) = -1,\]
so there exists a value $k$ such that $f(k)=-1$. Then, consider $P(x,k)$:

\[f(x+1) = f(f(x)).\]
Plug this back into the original equation and denote the new assertion as $Q(x,y)$. Now, $Q(f(x)+k,x)$ yields

\[f(k)+1 = f(x+k+2)-f(x).\]
Setting $k=-1$ shows that each consecutive difference is constant. Hence, $f$ is linear. Finally, plugging in $f(x) = ax+b$ and solving gives 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.
pie854
243 posts
#158
Y by
Setting $x=y+f(y)$ implies $f(f(y+f(y)))=2f(y)+1$. Setting $y=f(x)$ implies $f(x-f(f(x)))=-1$, setting here $x=y+f(y)$ and simplifying gives $f(f(y-1))=f(y)$, thus $f(f(x))=f(x+1)$ for all $x$. Now set $x=f(y)-1$. Note that $$f(f(f(y)-1))=f(f(y))=f(y+1),$$so we get $f(y+1)=f(y)+(1+f(-1))$. By induction $f(x)=f(0)+x(1+f(-1))$. Plugging back we get the only solutions are $f(x)=x+1$ for all $x$ and $f(x)=-1$ for all $x$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
RetroFuel
11 posts
#159
Y by
We claim that the only solutions are $f(x) \equiv -1$ and $f(x)=x+1$ for all $x$. Let $P(x,y)$ be the assertion.
$P(x,f(x))$ gives us that $$f(x-f(f(x)))=-1 \forall x$$This implies that either $f(x) \equiv -1$ which we can check to be a working solution or that $x- f(f(x)) = c \forall x$ where c is a constant value and $f(c) = -1$. This means that $f(f(x)) = c+x$.
Subtituting this in our original function we get that, $$f(x-f(y))=x-f(y) + c -1$$$c-1$ is a constant value, and then we can write $x-f(y) = z$. We see that $z$ can range through all integral values as we can fix $y=y_0$ and then we can vary the value of $x$ accordingly to produce all integer values, this means that $$f(x) = x+d \forall x$$where $d$ is a constant value. Substituting this function in our original function gives us that $d=1$. This means that $f(x)=x+1\forall x$ is also a solution which can be checked. Q.E.D
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
onyqz
195 posts
#160
Y by
needed a hint for the second claim (I am bad in FE :rotfl: )

solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SomeonesPenguin
128 posts
#161
Y by
Here is probably the most awkward solution to this problem.

We will show that the only solutions are $f\equiv -1$ and $f(x)=x+1$. From $P(x,f(x))$ we get that there is $a$ such that $f(a)=-1$. $P(x,a)$ gives \[f(f(x))=f(x+1)\]Now substitute this back into the given FE and let $Q(x,y)$ denote the new FE.

If $f$ is injective, we get the solution $f(x)=x+1$. Now if there are $p\neq q$ such that $f(p)=f(q)$, subtracting $P(p,y)$ from $P(q,y)$ yields $f(p-f(y))=f(q-f(y)$. Let $S=\{x|f(y)=x\}$.

Claim: $f\equiv -1$ or there is some positive integer in $S$.
Proof: Suppose that $f\not\equiv -1$, then there are $n>m$ in $S$.

Case 1. $n=m+1$. Take some $x$ and $y$ such that $f(x+1)=n$ and $f(y)=m$. $Q(n,m)$ gives that $0$ is in $S$. If $f(b)=0$, from $Q(x,b)$ we get $f(x)+1=f(x+1)$, hence $1$ is in $S$, which suffices.

Case 2. $n>m+1$. Take $x$ and $y$ such that $f(x+1)=n$ and $f(y)=m$. $Q(x,y)$ gives the desired conclusion. $\square$

Now look back at $f(p-f(y))=f(q-f(y)$. Since there is a positive integer in $S$ and $-1\in S$, it's not hard to see that $f(n)=f(n+c)$ for all $n$, where $c=|p-q|\neq 0$. $Q(y+kc-1,y)$ gives \[-1=f(y+kc-1-f(y)), \ \forall y\]From now, the idea is to find a smaller period of $f$ and induct to get that $f$ has period $1$. Notice that if there are $x$ and $y$ such that $x-f(x)\not\equiv y-f(y)\pmod c$, then by picking suitable $k$s in the above we can arrive at $-1=f(\alpha)=f(\beta)$ with $|\alpha-\beta|\le c-1$ which gives a smaller period.

Now suppose that $x-f(x)$ is constant modulo $c$. Looking at $f(f(x))=f(x+1)$ modulo $c$ gives that $f(x)\equiv x+1\pmod c$. Notice that this implies that $|S|=c$. From $Q(x,y)$ we get that $|S-S|=|S|=c$ (Here $S-S=\{x-y|(x,y)\in S\times S\}$). One can see that $|S-S|$ is at least $2|S|-1$ since we have $|S|-1$ positive and $|S|-1$ negative differences and we have $0$. Hence $c\le 1$, which implies that $f$ is constant. $\blacksquare$
This post has been edited 2 times. Last edited by SomeonesPenguin, Nov 8, 2024, 5:13 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
L13832
267 posts
#162 • 1 Y
Y by alexanderhamilton124
Nice one!

Let $P(x,y)$ be the assertion $f(x-f(y))=f(f(x))-f(y)-1$

$P(x,f(x))\implies f(x-f(f(x)))=-1$, so there exists an $a$ such that $f(a)=-1$.

$P(x,a)\implies f(f(f(x)))=f(f(x))\implies f(x+1)=f(f(x))$, if $f$ is injective then $\boxed{f(x)=x+1}$.

$P(x,x)\implies f(x-f(x))=f(x+1)-f(x)-1$, also
$f(x-f(x))= f(f(x-f(x)-1))=f(f(x-f(f(x))))=f(-1)$
so $f(x+1)-f(x)$ is constant giving $f$ to be linear.

If $f$ is constant then $\boxed{f\equiv -1}$ otherwise $f$ is injective. :yoda:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8860 posts
#163
Y by
The answers are $f \equiv -1$ and $f \equiv x+1$, which both work.

Main Proof: Setting $y=f(x)$ yields $f(x-f(f(x)) = -1$, which we call $(1)$. Setting $x = f(y)$ shows $f(0) = f(f(f(y))) - f(y) - 1$, which we call $(2)$. But rearranging terms and applying $(1)$ yields \[-1=f(f(y) - f(f(f(y)))) = f(-1-f(0))\]i.e. for $c = f(0) + 1$, we have $f(-c) = -1$.

Set $y=c$ in the original to get $f(x+1) = f(f(x))$. In other words, $(2)$ rearranges to \[f(y+2) - f(y) = f(0)+1.\]In other words, $f(2k) = ck+f(0)$ and $f(2k+1) = ck+f(1)$ for all integers $k$.

Annoying Cleanup: The rest of the proof is suprisingly annoying. Suppose $c \neq 0$ for now; it follows that there are at most two values $x$ such that $f(x) = -1$. On the other hand, $(1)$ with $x = 2k$ yields $f(2k-ck-f(1)) = -1$. If $c \neq 2$, $2k-ck-f(1)$ can take on infinitely many values, hence we must have $c = 2$. It follows that $f(0) = 1$.

Now let $r = f(1)$. I claim $r = 2$ or $r$ must be odd; this follows because $f(2k+2) = f(2k+r)$ by setting $x = 2k+1$, hence we cannot have $r$ any even number except for $2$. Now assume for the sake of contradiction that $r$ is odd. Setting $x = 2k+1$ and $y = 2\ell + 1$ in the original,
\[2(k-\ell) - r + 2 = f(2k+1-2\ell - r) = 2k+2r-1 - 2\ell - r - 1 = 2(k-\ell) + r-2.\]It follows $r = 2$, contradiction. This case thus yields $f \equiv x+1$.

Now assume $c = 0$. Then $f(0) = -1$, so $f(2k) = -1$ for all $k$. Setting $(x, y) = (0, 1)$ yields $f(-f(1)) = -1$, thus either $f \equiv -1$ on the odds too or $f(1)$ is even. But then by setting $x$ odd and $y = 1$, \[f(1) = f(x-f(1)) = f(f(x)) - f(1) - 1 = -f(1) - 2\]which yields $f(1) = -1$, contradiction. Thus $f \equiv -1$ in this case, and we are finally done.

Remark: I just noticed I solved this problem before in a pretty similar way while also remarking on the annoying nature of the finish. Some things never change.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
616 posts
#164
Y by
The answer is $f\equiv-1, f\equiv x + 1,$ both of which clearly work.
let $P(x, y)$ be the assertion.
$P(x, f(x))\implies f(x - f(f(x))) = f(f(x)) - f(f(x)) -1 = -1.$
$P(x, x - f(f(x)))\implies f(x + 1) = f(x - f(x - f(f(x)))) = f(f(x)) - f(x - f(f(x))) - 1 = f(f(x)).$
$P(x, y), P(x - 1, y)\implies$
\begin{align*}
    f(x - f(y)) & = f(x + 1) - 1 - f(y) \\ 
    f(x - 1 - f(y)) & = f(x) - 1 - f(y) 
\end{align*}By subtracting, we get $f(x - f(y)) - f(x - 1 - f(y)) = f(x + 1) - f(x).$ Taking $x= f(y)$, we get $f(0) - f(-1) = f(f(y) + 1) - f(f(y)) = f(f(f(y))) - f(f(f(y - 1))).$ Hence, $f(f(f(x)))$ is a linear function since its finite difference is constant. We write $f(f(f(x))) = ax + b.$
$P(f(y), y)\implies f(0) = f(f(f(y))) - f(y) - 1\implies f(y) = ay + b + 1 - f(0),$ or $f$ is linear.

let $f(x) = ax + b.$ plug this in to get $ax - a^2y - ab + b = a^2x + ab + b - ay - b - 1.$ Thus, $a = 1, 0.$ If $a = 1, b = 1,$ and if $a = 0, b = -1.$
This post has been edited 1 time. Last edited by Ilikeminecraft, Jan 24, 2025, 11:13 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.
EpicBird08
1751 posts
#165
Y by
The only solutions are $f(x) = -1$ and $f(x) = x + 1$, which both work. Now we show that these are all the solutions. Let $P(x,y)$ denote the given assertion.

$P(0,f(0))$ gives $f(-f(f(0))) = -1.$ Letting $u = -f(f(0)),$ we see that $P(x,u)$ gives $$\boxed{f(f(x)) = f(x+1)}.$$Then $P(f(x),x)$ gives $$f(0) = f(f(f(x))) - f(x) - 1 = f(f(x+1)) - f(x) - 1 = f(x+2) - f(x) - 1.$$This implies that $$\boxed{f(x+2) = f(x) + f(0) + 1}.$$We now consider two cases.

Case 1: $f(0) = -1.$ The above boxed equation immediately gives $f(2k) = -1$ for all $k \in \mathbb{Z}.$ Let $f(1) = f(2k+1) = c$ for integers $k.$
Subcase 1: $c$ is odd. Then $P(2k,2k-1)$ gives $c = c - c - 1 \implies c = -1,$ yielding our first solution $f(x) = -1$ for all $x.$
Subcase 2: $c$ is even. Then $P(2k+1,2k+1)$ gives $c = -1 - c - 1 \implies c = -1,$ a contradiction.
Thus this case has been exhausted, and it yields one solution $\boxed{f(x) = -1}.$

Case 2: $f(0) \ne -1.$ Then the first boxed equation implies that if $f(x) \equiv x+1 \pmod{2},$ then $f(x) = x+1.$ By the second boxed equation, we know $f(2) = 2 f(0) + 1$ is odd, as is $2 + 1 = 3.$ Hence $f(2) = 3,$ immediately giving $f(0) = 1.$ Hence $f(x) = x+1$ for even $x.$ Let $f(x) = x + c$ for odd $x.$ Again, the first boxed equation implies $f(1+c) = f(f(1)) = f(2) = 3.$ Hence either $1+c+1 = 3$ or $1 + 2c = 3.$ Both cases give $c = 1,$ yielding our second solution $\boxed{f(x) = x + 1}$ for all $x.$

Hence the only solutions are those claimed at the beginning.
This post has been edited 2 times. Last edited by EpicBird08, Jan 29, 2025, 12:11 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
616 posts
#166
Y by
The solution is $f\equiv 1, x + 1.$

Take $y = f(x)$ to get that there exists $a = x - f(f(x))$ such that $f(a) = -1.$

Take $y = a$ to get that $f(x + 1) = f(f(x)).$

If $f$ is injective, we are done, as this implies $x + 1 = f(x),$ which indeed works.

Now, assume $f$ is not injective, and $f(a) = f(b)$ for some $a\neq b.$ Note that we can get $f(a + 1) = f(f(a)) = f(f(b)) = f(b + 1),$ and so thus, $f(x) = f(x + k(a - b))$ for some $k \in \mathbb Z.$

Take $x = f(y)$ to get $f(0) = f(f(f(y))) - f(y) - 1 = f(y + 2) - f(y) - 1$ to get that $f(2k)$ is linear and $f(2k + 1)$ is linear. By $f(x) = f(x + k(a - b)),$ we can also get that $f(2k) = c_2, f(2k + 1) = c_1$ for two constants(not necessarily the same). Finally, we do parity casework on $c_1, c_2:$
\begin{enumerate}
\item If $c_2\equiv 0\pmod 2,$ then taking $x\equiv y\equiv 0\pmod 2$ tells us $c_2 = -1,$ contradiction.
\item If $c_1 \equiv 0\pmod 2,$ then taking $x\equiv 0, y\equiv 1\pmod 2$ tells us $c_1 = -1,$ contradiction.
\item If $c_1 \equiv c_2 \equiv 1 \pmod 2,$ taking $x\equiv 0\pmod 2$ tells us $f(y) = -1,$ which finishes.
\end{enumerate}
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Bardia7003
20 posts
#167
Y by
Let $P(x,y)$ denote the given assertion.
$\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}}
P(f(x),x): f(0) = \underline{f(f(f(x))) - f(x) - 1 \quad (\RomanNumeral{1})} \\
P(x, f(x)):  \underline{f(x - f(f(x))) = -1 \quad (\RomanNumeral{2})} \\
P(x, x - f(f(x))): f(x - f(x - f(f(x)))) = f(f(x)) - f(x - f(f(x))) - 1 \xrightarrow{\RomanNumeral{2}}  \underline{f(x+1) = f(f(x)) \quad (\RomanNumeral{3})}$
So by $\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} (\RomanNumeral{3})$ we have that $f(f(f(x))) = f(f(x+1)) = f(x+2)$, and putting that in $\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} (\RomanNumeral{1})$ we have: $ \underline{f(0) + 1 = f(x+2) - f(x) \newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} \quad (\RomanNumeral{4})}$. Which means $f(2x)$ is linear. So $f(2x) = ax + b$, which $a = f(0) + 1 = b + 1$, So $f(2x) = (b+1)x + b$.
$f(2x+1)$ is also linear, so $f(2x + 1) = ax + c (a = f(0) + 1)$
We want to prove that $b$ is odd, so we assume otherwise. For an odd $x$, $f(f(2x)) = f((b+1)x + b)$, $(b+1)x$ is odd and $b$ is even so the value is odd: $f(f(2x)) = (b+1)(\frac{(b+1)x + b - 1}{2}) + c$. Also by $\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} (\RomanNumeral{3})$ we know $f(f(2x)) = f(2x + 1) = (b+1)x + c$
So $(b+1)x = (b+1)(\frac{(b+1)x + b - 1}{2})$. $b$ is even so $b+1\neq0$ and we can cross it out: $x = \frac{bx + x + b - 1}{2} \rightarrow x = bx + b -1 \rightarrow (1-b)x = (b - 1) \xrightarrow{b-1\neq0} x = -1$, but we had the equation for any odd $x$, hence contradiction. As a result, we proved $b$ is odd.
Now we know $f(2x+1) = ax+c \xrightarrow{\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} \RomanNumeral{3}} f(f(2x)) = ax + c \rightarrow f(ax + b) = ax + c \xrightarrow{x := 0} f(b) = c$
As we know $b$ is odd, so:
$c = f(b) = a(\frac{b-1}{2}) + c \rightarrow a(\frac{b-1}{2}) = 0$ so $b = 1$ or $a = 0$.
Case 1: $a = 0$. Then $b+1 = 0, f(2x) = b \rightarrow f(2x) = -1$ and $f(2x + 1) = c$. If c is odd, then by $\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} (\RomanNumeral{3})$ we know $f(c+1) = f(f(c)) = f(c) = c$ and $c + 1$ is even so $-1 = c = f(2x+1)$.
Hence $\boxed{f(x) = -1 \quad \forall x \in \mathbb{Z}}$ is the solution in this case, which indeed works.
Case 2: $b=1$. Then $f(2x) = 2x + 1, f(2x + 1) = 2x + c$. By $\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} (\RomanNumeral{2})$ we know $\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} f(2x - f(f(2x)) = -1 \xrightarrow{\RomanNumeral{3}} f(2x - f(2x + 1)) = -1 \rightarrow f(2x - 2x - c) = -1 \rightarrow f(-c) = -1$. If c is even then $-c +1 = -1 \rightarrow c = 2$, and we want to prove $c$ is even so we can conclude $c=2$, so we assume not. If c is odd then $f(f(c)) = f((c-1) + c) = ((2c-1)-1) + c$, and by $\newcommand{\RomanNumeral}[1]{\MakeUppercase{\romannumeral #1}} (\RomanNumeral{3})$ we know that $f(f(c)) = f(c+1) = (c+1) + 1$ so $3c - 2 = c + 2 \rightarrow c = 2$ but we supposed c is odd, contradiction.
So we proved $c$ is even and as a result $c=2$, as we proved. Now we have that $f(2x) = 2x+1, f(2x+1) = 2x+2$, so we can generally conclude $\boxed{f(x) = x+1 \quad \forall x \in \mathbb{Z}}$ in this case, which is also a solution.
So both cases are solved and we found all the solutions. $\blacksquare$
Please feel free to point out if I've made any mistakes through this proof, thanks. :)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ihatecombin
60 posts
#168
Y by
A pretty unique problem, bit annoying to be honest lol. The only solutions are $f(x) \equiv -1$ and $f(x) \equiv x+1$.
You can use \(P(x,f(x))\) to get
\[f(x - f^2(x)) = -1\]Afterwards let \(f(r) = -1\), we can use \(P(x,r)\)
to get
\[f(x+1) = f^2(x)\]Notice that the equation can be transformed into
\[f(x-f(y)) = f(x+1) - f(y) - 1\]Let \(f(p+1) = k \neq -1\) (otherwise \(f(x) \equiv -1\), which works).
Notice that if we use \(P(k+p+1,p+1)\), then we must have
\[f(p+1) = f(k+p+2) -k-1 \Longrightarrow 2k+1 =  f(k+p+2)\]Since \(k \neq -1\), we must have that \(2k+1 \neq k\) and \(2k+1\) is also in the image of \(f(x)\),
thus \(2(2k+1) + 1\) is also in the image and so on. Therefore the set containing all the integers which are in the image of \(f(x)\) is infinite.
Now let \(n\) be a number such that \(f(n) = k \neq -1\) for some \(k\). Substituting \(P(x,n)\) we have
\[f(x-k) = f(x+1)-k-1\]we already know that if \(k\) is in the image of \(f(x)\), then \(2k+1\) is in the image. Let \(f(m) = 2k+1\), we can substitute \(P(x,m)\) to get
\[f(x-2k-1) = f(x+1) - 2k - 2\]Thus we must have
\[f(x-2k-1) + k + 1= f(x-k) \Longrightarrow f(x) = f(x-k-1) +k+1\]for some \(k \neq -1\).

Notice that since \(f(x+1) = f^2(x)\), if \(f(x)\) is injective then we are done \(f(x) \equiv x+1\).
Therefore assume \(f(x) \not\equiv -1\) and \(f(x) \not\equiv x+1\) and \(f(x)\) is not injective. Let \(f(a) = f(b)\), notice that since \(f(x+1) = f^2(x)\), we must have
\[f(a+1) = f^2(a) = f^2(b) = f(b+1)\]similarly
\[f(a+2) = f^2(a+1) = f^2(b+1) = f(b+2) \Longrightarrow f(a) = f(b) = f(2b-a)\]By induction we have
\[f(a) = f(xb-(x-1)a)\]However substituting \(k+1\), we have
\[f(a) = f([k+1](b-a) + a)\]But since \(f(x) = f(x-k-1) + k +1\), we easily get
\[f(a) = f([k+1](b-a) + a) = f(a) + (k+1)(b-a)\]This is a clear contradiction.
This post has been edited 1 time. Last edited by Ihatecombin, Mar 13, 2025, 1:28 PM
Reason: Apparently \textbf{} doesn't cause bold text in AOPS
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Adywastaken
19 posts
#169
Y by
$y=f(x)\implies f(x-f(f(x)))=-1$
$y=x-f(f(x))\implies f(x+1)=f(f(x))$
$x=f(y)-1\implies f(-1)+1=f(f(f(x)-1))-f(x)=f(f(x))-f(x)=f(x+1)-f(x)$
So, $f=mx+c$, and matching coefficients,
$m^2=m, 2mc=c+1$
So, $(m,c)=(0,-1),(1,0)$
$f(x) \equiv -1$ or $f(x)=x+1$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Jakjjdm
4 posts
#170
Y by
The only solutions are $f(x) \equiv -1$ and $f(x) = x + 1$. Let $P(m,n)$ be the main equation plugging $x = m$ and $y = n$. $P(x,f(x)) : f(x - f(f(x))) = - 1$, so let k be an integer such that $f(k) = -1$, so $P(x,k) : f(x +1) = f(f(x))$. $P(f(y) - 1, y) : f(-1) + 1 = f(f(f(y) - 1)) - f(y) = f(y + 1) - f(y)$, so the function is linear. Now, Just check the cases when $f(x) \equiv c$, giving $f(x) \equiv -1$, and check when $f(x) = x + c$, that gives $f(x) = x + 1$, and we're done.
Z K Y
N Quick Reply
G
H
=
a