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
find angle
TBazar   2
N 5 minutes ago by sunken rock
Given $ABC$ triangle with $AC>BC$. We take $M$, $N$ point on AC, AB respectively such that $AM=BC$, $CM=BN$. $BM$, $AN$ lines intersect at point $K$. If $2\angle AKM=\angle ACB$, find $\angle ACB$
2 replies
+1 w
TBazar
2 hours ago
sunken rock
5 minutes ago
Geometry marathon
HoRI_DA_GRe8   845
N 14 minutes ago by leon.tyumen
Ok so there's been no geo marathon here for more than 2 years,so lets start one,rules remain same.
1st problem.
Let $PQRS$ be a cyclic quadrilateral with $\angle PSR=90°$ and let $H$ and $K$ be the feet of altitudes from $Q$ to the lines $PR$ and $PS$,.Prove $HK$ bisects $QS$.
P.s._eeezy ,try without ss line.
845 replies
HoRI_DA_GRe8
Sep 5, 2021
leon.tyumen
14 minutes ago
My Unsolved Problem
ZeltaQN2008   0
16 minutes ago
Let \(f:[0,+\infty)\to\mathbb{R}\) be a function which is differentiable on \([0,+\infty)\) and satisfies
\[
\lim_{x\to+\infty}\bigl(f'(x)/e^x\bigr)=0.
\]Prove that
\[
\lim_{x\to+\infty}\bigl(f(x)/e^x\bigr)0.
\]
0 replies
ZeltaQN2008
16 minutes ago
0 replies
polonomials
Ducksohappi   0
29 minutes ago
$P\in \mathbb{R}[x] $ with even-degree
Prove that there is a non-negative integer k such that
$Q_k(x)=P(x)+P(x+1)+...+P(x+k)$
has no real root
0 replies
Ducksohappi
29 minutes ago
0 replies
[PMO24 Qualifying II.3] Positive Divisors Problem
kae_3   3
N Feb 18, 2025 by MineCuber
Let $m$ and $n$ be relatively prime positive integers. If $m^3n^5$ has $209$ positive divisors, then how many positive divisors has $m^5n^3$ have?

Answer Confirmation
3 replies
kae_3
Feb 16, 2025
MineCuber
Feb 18, 2025
Sequence of Numbers
4everwise   6
N Feb 4, 2025 by megarnie
A sequence of numbers $x_{1},x_{2},x_{3},\ldots,x_{100}$ has the property that, for every integer $k$ between $1$ and $100,$ inclusive, the number $x_{k}$ is $k$ less than the sum of the other $99$ numbers. Given that $x_{50}=m/n,$ where $m$ and $n$ are relatively prime positive integers, find $m+n.$
6 replies
4everwise
Jan 5, 2007
megarnie
Feb 4, 2025
asdf1434 Mock AIME #9
P_Groudon   6
N Jan 29, 2025 by Squ_red
In regular tetrahedron $ABCD$ of side length 1, let $P$ be a point on line $AB$ and let $Q$ be a point on the line through $C$ and the midpoint of $AD$. The least possible value of $PQ^2$ can be written as $\frac{m}{n}$ for relatively prime positive integers $m$ and $n$. Find $m + n$.
6 replies
P_Groudon
May 8, 2024
Squ_red
Jan 29, 2025
asdf1434 Mock AIME #6
P_Groudon   8
N Jan 20, 2025 by clarkculus
Let $ABCD$ be a trapezoid with $AB \parallel CD$. Let $M$ and $N$ be the midpoints of $AB$ and $CD$ respectively, and let $E$ be the intersection of diagonals $AC$ and $BD$. If $EM = 1$, $EN = 3$, $CD = 10$, and $\frac{AD}{BC} = \frac{3}{4}$, then $AD^2 + BC^2$ can be expressed as $\frac{m}{n}$ for relatively prime positive integers $m$ and $n$. Find $m + n$.
8 replies
P_Groudon
May 8, 2024
clarkculus
Jan 20, 2025
jungle diff ff 15 feed
hexuhdecimal   3
N Jan 17, 2025 by sdfgfjh
Let $\phi(n)$ denote the number of positive integers less than or equal to $n$ which are relatively prime to $n$. Compute \[\sum_{i=1}^{\phi(2023)} \frac{gcd(i, \phi(2023))}{\phi(2023)}\].
3 replies
hexuhdecimal
Jan 17, 2025
sdfgfjh
Jan 17, 2025
Fractions
Jia_Le_Kong   3
N Jan 12, 2025 by Lankou
I write down a list of all fractions $\frac{m}{n}$, where $m, n$ are relatively prime positive integers and $n$ is at most $2025$.

The list is sorted in ascending order. What is the fraction that comes right after $\frac{26}{49}?$
3 replies
Jia_Le_Kong
Jan 12, 2025
Lankou
Jan 12, 2025
Exercise 4. Find all distinct positive integers a, b, c that have relatively pri
hoangvu1009   3
N Dec 16, 2024 by AbhayAttarde01
Exercise 4. Find all distinct positive integers a, b, c that have relatively prime factors such that the sum of any two numbers is always divisible by the third number.
3 replies
hoangvu1009
Dec 15, 2024
AbhayAttarde01
Dec 16, 2024
Infinate Geometric Series
4everwise   6
N Dec 13, 2024 by pateywatey
An infinite geometric series has sum $2005$. A new series, obtained by squaring each term of the original series, has $10$ times the sum of the original series. The common ratio of the original series is $\frac{m}{n}$ where $m$ and $n$ are relatively prime integers. Find $m+n$.
6 replies
4everwise
Nov 13, 2005
pateywatey
Dec 13, 2024
Algebra?
SomeonecoolLovesMaths   1
N Nov 24, 2024 by alexheinis
Let $a,b,c$ be positive reals such that $abc + a + b = c$ and $$\frac{19}{\sqrt{a^2+1}} + \frac{20}{\sqrt{b^2+1}} = 31.$$The maximum possible value of $c^2$ can be written in the form $\frac{m}{n}$ where $m$ and $n$ are relatively prime positive integers. Find the value of $m+n$.
1 reply
SomeonecoolLovesMaths
Nov 22, 2024
alexheinis
Nov 24, 2024
Geometry
SomeonecoolLovesMaths   1
N Nov 22, 2024 by sdfgfjh
Let $ABC$ be a triangle with $AB = 5$, $BC = 6$, $CA = 7$. Let $O$ be the circumcenter of $\bigtriangleup ABC$ and let $P$ be a point such that $\overline{AB} \perp \overline{BP}$ and $\overline{AC} \perp \overline{AP}$. If lines $OP$ and $BC$ intersect at $T$, then the length $BT$ can be expressed in the form $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m+n$.
1 reply
SomeonecoolLovesMaths
Nov 22, 2024
sdfgfjh
Nov 22, 2024
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
268 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
619 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
619 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
21 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