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
Geometric inequality with angles
Amir Hossein   7
N 4 minutes ago by MathIQ.
Let $p, q$, and $r$ be the angles of a triangle, and let $a = \sin2p, b = \sin2q$, and $c = \sin2r$. If $s = \frac{(a + b + c)}2$, show that
\[s(s - a)(s - b)(s -c) \geq 0.\]
When does equality hold?
7 replies
Amir Hossein
Sep 1, 2010
MathIQ.
4 minutes ago
IMO 2014 Problem 3
v_Enhance   103
N 11 minutes ago by Mysteriouxxx
Source: 0
Convex quadrilateral $ABCD$ has $\angle ABC = \angle CDA = 90^{\circ}$. Point $H$ is the foot of the perpendicular from $A$ to $BD$. Points $S$ and $T$ lie on sides $AB$ and $AD$, respectively, such that $H$ lies inside triangle $SCT$ and \[
\angle CHS - \angle CSB = 90^{\circ}, \quad \angle THC - \angle DTC = 90^{\circ}. \] Prove that line $BD$ is tangent to the circumcircle of triangle $TSH$.
103 replies
v_Enhance
Jul 8, 2014
Mysteriouxxx
11 minutes ago
JBMO Shortlist 2022 N1
Lukaluce   9
N 19 minutes ago by MathIQ.
Source: JBMO Shortlist 2022
Determine all pairs $(k, n)$ of positive integers that satisfy
$$1! + 2! + ... + k! = 1 + 2 + ... + n.$$
9 replies
Lukaluce
Jun 26, 2023
MathIQ.
19 minutes ago
fraction sum
miiirz30   5
N 26 minutes ago by MathIQ.
Source: 2025 Euler Olympiad, Round 1
Evaluate the following sum:
$$ \frac{1}{1} + \frac{1}{1 + 2} + \frac{1}{1 + 2 + 3} + \frac{1}{1 + 2 + 3 + 4} + \ldots + \frac{1}{1 + 2 + 3 + 4 + \dots + 2025} $$
Proposed by Prudencio Guerrero Fernández
5 replies
miiirz30
Mar 31, 2025
MathIQ.
26 minutes ago
Serbian selection contest for the IMO 2025 - P2
OgnjenTesic   8
N an hour ago by MathLuis
Source: Serbian selection contest for the IMO 2025
Let $ABC$ be an acute triangle. Let $A'$ be the reflection of point $A$ over the line $BC$. Let $O$ and $H$ be the circumcenter and the orthocenter of triangle $ABC$, respectively, and let $E$ be the midpoint of segment $OH$. Let $D$ and $L$ be the points where the reflection of line $AA'$ with respect to line $OA'$ intersects the circumcircle of triangle $ABC$, where point $D$ lies on the arc $BC$ not containing $A$. If \( M \) is a point on the line \( BC \) such that \( OM \perp AD \), prove that \( \angle MAD = \angle EAL \).

Proposed by Strahinja Gvozdić
8 replies
OgnjenTesic
Today at 4:02 PM
MathLuis
an hour ago
Primes and sets
mathisreaI   41
N 2 hours ago by Tinoba-is-emotional
Source: IMO 2022 Problem 3
Let $k$ be a positive integer and let $S$ be a finite set of odd prime numbers. Prove that there is at most one way (up to rotation and reflection) to place the elements of $S$ around the circle such that the product of any two neighbors is of the form $x^2+x+k$ for some positive integer $x$.
41 replies
mathisreaI
Jul 13, 2022
Tinoba-is-emotional
2 hours ago
Minimum times maximum
y-is-the-best-_   64
N 2 hours ago by ezpotd
Source: IMO 2019 SL A2
Let $u_1, u_2, \dots, u_{2019}$ be real numbers satisfying \[u_{1}+u_{2}+\cdots+u_{2019}=0 \quad \text { and } \quad u_{1}^{2}+u_{2}^{2}+\cdots+u_{2019}^{2}=1.\]Let $a=\min \left(u_{1}, u_{2}, \ldots, u_{2019}\right)$ and $b=\max \left(u_{1}, u_{2}, \ldots, u_{2019}\right)$. Prove that
\[
a b \leqslant-\frac{1}{2019}.
\]
64 replies
y-is-the-best-_
Sep 22, 2020
ezpotd
2 hours ago
Prove $x+y$ is a composite number.
mt0204   1
N 2 hours ago by sharknavy75
Let $x, y \in \mathbb{N}^*$ such that $1000 x^{2023}+2024 y^{2023}$ is divisible by $x+y$ and $x+y>2$. Prove that $x+y$ is a composite number.
1 reply
mt0204
Today at 3:59 PM
sharknavy75
2 hours ago
Serbian selection contest for the IMO 2025 - P1
OgnjenTesic   2
N 2 hours ago by MathLuis
Source: Serbian selection contest for the IMO 2025
Let \( p \geq 7 \) be a prime number and \( m \in \mathbb{N} \). Prove that
\[\left| p^m - (p - 2)! \right| > p^2.\]Proposed by Miloš Milićev
2 replies
OgnjenTesic
Today at 4:01 PM
MathLuis
2 hours ago
JBMO Shortlist 2021 N1
Lukaluce   15
N 2 hours ago by LeYohan
Source: JBMO Shortlist 2021
Find all positive integers $a, b, c$ such that $ab + 1$, $bc + 1$, and $ca + 1$ are all equal to
factorials of some positive integers.

Proposed by Nikola Velov, Macedonia
15 replies
Lukaluce
Jul 2, 2022
LeYohan
2 hours ago
a+b+c+d divides abc+bcd+cda+dab
v_Enhance   51
N 2 hours ago by BossLu99
Source: USA Team Selection Test for IMO 2021, Problem 1
Determine all integers $s \ge 4$ for which there exist positive integers $a$, $b$, $c$, $d$ such that $s = a+b+c+d$ and $s$ divides $abc+abd+acd+bcd$.

Proposed by Ankan Bhattacharya and Michael Ren
51 replies
v_Enhance
Mar 1, 2021
BossLu99
2 hours ago
three discs of radius 1 cannot cover entirely a square surface of side 2
parmenides51   1
N 3 hours ago by Blast_S1
Source: 2014 Romania NMO VIII p4
Prove that three discs of radius $1$ cannot cover entirely a square surface of side $2$, but they can cover more than $99.75\%$ of it.
1 reply
parmenides51
Aug 15, 2024
Blast_S1
3 hours ago
Floor sequence
va2010   88
N 3 hours ago by heheman
Source: 2015 ISL N1
Determine all positive integers $M$ such that the sequence $a_0, a_1, a_2, \cdots$ defined by \[ a_0 = M + \frac{1}{2}   \qquad  \textrm{and} \qquad    a_{k+1} = a_k\lfloor a_k \rfloor   \quad \textrm{for} \, k = 0, 1, 2, \cdots \]contains at least one integer term.
88 replies
va2010
Jul 7, 2016
heheman
3 hours ago
2025 Caucasus MO Juniors P6
BR1F1SZ   2
N 4 hours ago by IEatProblemsForBreakfast
Source: Caucasus MO
A point $P$ is chosen inside a convex quadrilateral $ABCD$. Could it happen that$$PA = AB, \quad PB = BC, \quad PC = CD \quad \text{and} \quad PD = DA?$$
2 replies
BR1F1SZ
Mar 26, 2025
IEatProblemsForBreakfast
4 hours ago
Problem 4
teps   74
N Mar 29, 2025 by bjump
Find all functions $f:\mathbb Z\rightarrow \mathbb Z$ such that, for all integers $a,b,c$ that satisfy $a+b+c=0$, the following equality holds:
\[f(a)^2+f(b)^2+f(c)^2=2f(a)f(b)+2f(b)f(c)+2f(c)f(a).\]
(Here $\mathbb{Z}$ denotes the set of integers.)

Proposed by Liam Baker, South Africa
74 replies
teps
Jul 11, 2012
bjump
Mar 29, 2025
Problem 4
G H J
G H BBookmark kLocked kLocked NReply
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cj13609517288
1922 posts
#70
Y by
Setup, using homogeneous

Defining and giving value to g(x) substitution

Casework

Finishing
This post has been edited 8 times. Last edited by cj13609517288, Dec 1, 2022, 4:45 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Taco12
1757 posts
#71
Y by
writing this up from before because I'm bored
We claim the only solutions are

$$f(x)=\begin{cases}0\qquad x \equiv 0 \pmod 2 \\ c\qquad x \equiv 1 \pmod 2\end{cases}$$$$f(x)=\begin{cases}0\qquad x\equiv 0\pmod 4 \\ c\qquad x\equiv 1,3\pmod 4 \\ 4c\qquad x\equiv 2\pmod 4\end{cases}$$$$f(x)=cx^2.$$
Now, we show they are the only ones. Let $P(a,b,c)$ be the assertion. Then,

$P(0,0,0) \rightarrow f(0)=0$.
$P(a,-a, 0) \rightarrow f(a)=f(-a) \rightarrow f \text{ even }$.
$P(a,a,-2a) \rightarrow f(2a) = 0 \text{ or } f(2a) = 4f(a)$.

Claim: If $f(x)=0$, then $f(cx) = 0$ for all integers $c$.
Proof. Use induction, with the base case trivial. Assume $f(x)=f(2x)=\dots=f(cx-c)=0$. Then, $$P(x, cx-c, -cx) \rightarrow f(cx)=0. \square$$
Now we casework on $f(1), f(2), f(4)$.

Case 1: $f(2)=0, f(1) \neq 0$.
By the claim, $f(x)=0$ for even $x$. Let $n,m$ be odd integers. Then $$P(n,m,1-n-m) \rightarrow f(n)=f(m),$$which means $f(x)=c$ for odd $x$.

Case 2: $f(4)=0, f(1), f(2) \neq 0$.
We have $f(x)=0$ for $x \equiv 0 \pmod 4$. Let $n \equiv 1 \pmod 4, m \equiv 3 \pmod 4$. Then $$P(n,m,-n-m) \rightarrow f(n)=f(m),$$which implies $f(x)$ is constant for odd $x$. Now, let $n\equiv 2 \pmod 4$. Note that $f(n) \neq 0$, as otherwise $P(-2, 2-n, n)$ would yield a contradiction. Thus, $f(x)=4x$ for $x \equiv 2 \pmod 4$.

Case 3: $f(1), f(2), f(4) \neq 0$.
Note that $f(2) = 4f(1), f(4) = 16f(1)$. Then, $$P(-1, -2, 3) \rightarrow f(3) = f(1) \text{ or } f(3) = 9f(1).$$Similarly, $$P(-1,-3,4) \rightarrow f(3) = 9f(1) \text{ or } f(3) = 25f(1),$$and combining gives $f(3)=9f(1)$. We can use a similar argument inductively to show that $f(x)=cx^2$.

Case 4: $f(1)=0$.
This implies $f(x)=0$ which falls under the solution previously found in Case 3.

Since all the solutions work and we have exhausted all cases, we are done. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
fclvbfm934
759 posts
#72
Y by
Let $P(a, b, c)$ denote the assertion. Quick facts:
\begin{align*}
P(0, 0, 0): f(0) &= 0 \\
P(a, -a, 0): f(a) &= f(-a)
\end{align*}so we get that $f$ is even. Letting $c = - a - b$, we have
$$f(a)^2 + f(b)^2 + f(a + b)^2 = 2f(a)f(b) + 2f(a+b)[f(a) + f(b)].$$Using the quadratic formula to solve for $f(a + b)$ gives us
$$f(a + b) = f(a) + f(b) \pm 2 \sqrt{f(a)f(b)} \qquad{(1)}.$$This tells us a couple of things. The $\sqrt{f(a)f(b)}$ tells us that $f$ must have the same sign everywhere. Furthermore, if we allow $b = 1$, then this means
$$f(a) = \frac{g(a)^2}{f(1)}$$for some $g(a) \ge 0$, unless $f(1) = 0$. Note that if $f(1) = 0$, then by Equation (1), we have $f(a + 1) = f(a)$, so $f(a) = 0$ everywhere. So assume that $f(1) \neq 0$.

Replacing all $f$s with $g$s in Equation (1) yields
\begin{align*}
g(a + b)^2 &= g(a)^2 + g(b)^2 \pm 2g(a)g(b) \\
\Longrightarrow g(a + b) &= |g(a) \pm g(b)| \qquad{(2)}.
\end{align*}We know $g(0) = 0$, and let $g(1) = k$ for some positive integer $k$. Let $Q(a, b)$ denote plugging in $a$ and $b$ into equation (2).

By $Q(1, 1)$, we have $g(2) = |k \pm k|$, so we have two cases.

Case 1: $g(2) = 0$. Using $Q(x, 2)$ gives us $g(x + 2) = g(x)$, and so we have $g(x) = 0$ for even $x$ and $g(x) = k$ for odd $x$.

Case 2: $g(2) = 2k$. By $Q(2, 1)$, we have $g(3) = k$ or $g(3) = 3k$.

Case 2.1: $g(3) = k$. Then, $Q(3, 1)$ tells us $g(4) = 0$ or $2k$. But if $g(4) = 2k$, then $Q(2, 2)$ is a contradiction. So, $g(4) = 0$, and now by $Q(x, 4)$, we get that $g$ is periodic with period $4$, and this determines all of $g$.

Case 2.2: $g(3) = 3k$. We shall use induction to show that $g(n) = nk$ for all positive $n$, with the base case of the first three $n$ handled. Suppose $g(n - 2) = (n-2)k$
and $g(n - 1) = (n-1)k$. Then we have
\begin{align*}
Q(n - 2, 2): g(n) &= nk \text{  or  } (n - 3)k \\
Q(n - 1, 1): g(n) &= nk \text{  or  } (n - 2)k
\end{align*}Notice that there are no absolute value signs here because $n \ge 3$. The only overlapping value for $g(n)$ is $nk$, and so we complete our induction.

Solutions: Wrapping up, we have shown that the only admissible solutions are
  • $g(x) = 0$
  • $g(x) = k$ for $x \equiv 1 \pmod{2}$ and $0$ otherwise
  • $g(0) = 0$, $g(1) = k$, $g(2) = 2k$, and $g(3) = k$, and $g(x) = g(x \pmod{4})$ for all other $x$.
  • $g(x) = kx$ for all $x$.
Then, take $f(x) = c \cdot g(x)$ for any integer $c$. It is easy to see that all of these are valid solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
BlazingMuddy
282 posts
#73
Y by
There are three classes of solutions to this functional equations; one of them is the nice polynomial function $x \mapsto cx^2$. The other two classes of solutions can be viewed as a function induced from a solution to the same functional equation but with signatures $\mathbb{Z}/2\mathbb{Z} \to \mathbb{Z}$ and $\mathbb{Z}/4\mathbb{Z} \to \mathbb{Z}$, respectively. In general, there is one missing class, induced from a solution with signature $(\mathbb{Z}/2\mathbb{Z})^2 \to \mathbb{Z}$. Of course, it doesn't appear in this problem since $(\mathbb{Z}/2\mathbb{Z})^2$ is not a group quotient of $\mathbb{Z}$.
Quote:
Let $(G, +)$ be an abelian group and $R$ be an integral domain (with $char(R) \neq 2, 3$). Say that $(a, b, c) \in R^3$ is a Heron triple if $a^2 + b^2 + c^2 = 2ab + 2bc + 2ca$. Find all functions $f : G \to R$ such that $(f(x), f(y), f(z))$ is a Heron triple for any $x, y, z \in G$ with $x + y + z = 0$.
The case $char(R) = 2$ is not very interesting on itself; the answers are precisely the group homomorphisms.
On the other hand, the case $char(R) = 3$ to be more complicated than the case $char(R) \neq 3$, since we don't even have $f(0) = 0$ guaranteed anymore!

Answer. A function $f : G \to R$ satisfies the desired properties iff it has one of the following properties:
  • there exists $c \in R$ non-zero and a group homomorphism $\phi : G \to R$ such that $c f(x) = \phi(x)^2$ for any $x \in G$;
  • there exists $c \in R$ and a surjective group homomorphism $\phi : G \to \mathbb{Z}/2\mathbb{Z}$ such that
    \[ f(x) = \begin{cases} 0, & \phi(x) = 0, \\ c, & \phi(x) = 1; \end{cases} \]
  • there exists $c \in R$ and a surjective group homomorphism $\phi : G \to \mathbb{Z}/4\mathbb{Z}$ such that
    \[ f(x) = \begin{cases} 0, & \phi(x) = 0, \\ c, & \phi(x) = \pm 1, \\ 4c, & \phi(x) = 2; \end{cases} \]
  • there exists a Heron triple $(a, b, c) \in R^3$ and a surjective group homomorphism $\phi : G \to (\mathbb{Z}/2\mathbb{Z})^2$ such that
    \[ f(x) = \begin{cases} 0, & \phi(x) = (0, 0), \\ a, & \phi(x) = (1, 0), \\ b, & \phi(x) = (0, 1), \\ c, & \phi(x) = (1, 1). \end{cases} \]
    Since $R$ is an integral domain with $char(R) \neq 3$, for any $r \in R$, $(r, r, r)$ is a Heron triple iff $3r^2 = 0 \iff r = 0$. In particular, $f(0) = 0$.
    Since $R$ is an integral domain, for any $r, s \in R$, $(0, r, s)$ is a Heron triple iff $r = s$. Together with $f(0) = 0$, plugging $x = 0$ and $z = -y$ gives $f(y) = f(-y)$ for any $y \in G$; i.e., $f$ is even. Note that this only requires $f(0) = 0$, but not $char(R) \neq 3$. In particular, the original condition is now equivalent to $(f(x), f(y), f(x + y))$ being a Heron triple for any $x, y \in G$.
    Some parts of the solution will assume that $char(R) \neq 3$, and some parts only assume that $f(0) = 0$.

    First, notice that if $f(x) = 0$, then $(f(x + y), f(y), 0)$ is a Heron triple and thus $f(x + y) = f(y)$ for any $y \in G$. This means that $f^{-1}(0)$ is a subgroup of $G$, and that we have a well-defined induced map $\tilde{f} : G/f^{-1}(0) \to R$ satisfying $\tilde{f}([x]) = f(x)$ for any $x \in G$, and one can check that $\tilde{f}$ is good as well, i.e., $(\tilde{f}(x), \tilde{f}(y), \tilde{f}(x + y))$ is a Heron triple for any $x, y \in G/f^{-1}(0)$. Thus, we may assume that $f^{-1}(0) = \{0\}$ whenever necessary, as we can just replace $G$ with the quotient group $G/f^{-1}(0)$.

    Rearranging the Heron triple condition yields $(f(x + y) - f(x) - f(y))^2 = 4 f(x) f(y)$ for any $x, y \in G$. Thus, for any $x, y \in G$, since $(f(x - y), f(x), f(y))$ and $(f(x + y), f(x), f(y))$ are Heron triples, we get $(f(x + y) - f(x) - f(y))^2 = (f(x - y) - f(x) - f(y))^2 = 4 f(x) f(y)$, and thus
    \[ f(x + y) = f(x - y) \vee f(x + y) + f(x - y) = 2 f(x) + 2 f(y) \quad \forall x, y \in G. \tag{1} \]In particular, this gives $f(2x) \in \{0, 4 f(x)\}$ for any $x \in G$. We now divide into three cases:

    • Case 1. $f(2x) = 4 f(x)$ for all $x \in G$.

      The corresponding answer is the first category shown above. To motivate the solution, you should think that $f$ is supposed to be similar to the square function.

      If $f \equiv 0$ then we are done, so now suppose that $f(g_0) \neq 0$ for some $g_0 \in G$. If $f$ is the square function, then $f(x + y) - f(x) - f(y)$ would be bilinear in terms of $x$ and $y$; it becomes linear if we fix one of $x$ or $y$. Thus it makes sense to guess that $c = 4 f(g_0)$ and $\phi(x) = f(x + g_0) - f(x) - f(g_0)$ works; it already satisfies $c f(x) = \phi(x)^2$ for all $x \in G$, and $c \neq 0$ since $f(g_0) \neq 0$ and $4 = 2^2 \neq 0$ in $R$. It remains to show that $\phi$ is indeed a group homomorphism, which reduces to showing the following equality by substituting $z = g_0$:
      \[ f(x + y + z) + f(x) + f(y) + f(z) = f(x + y) + f(y + z) + f(z + x) \quad \forall x, y, z \in G. \]
      We first show that $f(x + y) + f(x - y) = 2 f(x) + 2 f(y)$ for any $x, y \in G$. By (1), either we are done or we can assume $A = f(x + y) = f(x - y)$. Then $(A, A, f(2x))$ and $(A, A, f(2y))$ are Heron triples, forcing $f(2x) = f(2y) = 4A$. By the case's hypothesis, this implies $f(x) = f(y) = A$. But then $(A, A, A) = (f(x), f(y), f(x + y))$ is a Heron triple, which forces $A = 0$ due to $char(R) \neq 3$. This also yields $f(x + y) + f(x - y) = 2 f(x) + 2 f(y)$, as desired.

      Now the proof of the main equality is as follows: for any $x, y, z \in G$,
      \[ 2 f(x + y + z) + 2 f(x) + 2 f(y) + 2 f(z) = f(2x + y + z) + f(y + z) + f(y + z) + f(y - z) = 2 f(x + y) + 2 f(x + z) + 2 f(y + z). \]The second equality holds since $2x + y + z = (x + y) + (x + z)$ and $y - z = (x + y) - (x + z)$. Now $char(R) \neq 2$ and $R$ is an integral domain, so we can cancel the factor of $2$ out and we are done.

    • Case 2. $f(2x) = 0$ for all $x \in G$.

      The corresponding solutions fall into the second and fourth category. Using the quotient $G/f^{-1}(0)$, we now assume that $f^{-1}(0) = \{0\}$. In particular, the case's hypothesis implies that $G$ is $2$-torsion, or equivalently an $\mathbb{F}_2$-vector space. The claim about what the solutions are is equivalent to saying that $G$ has dimension at most $2$. It now suffices to show that $\dim_{\mathbb{F}_2}(G) \leq 2$, i.e., any $3$ elements of $G$ are linearly dependent over $\mathbb{F}_2$.

      Fix some elements $x, y, z \in G$; the goal is to show that one of $x, y, z$, $x + y, x + z, y + z$, or $x + y + z$ equals zero. Recall that $a^2 + b^2 + c^2 = 2ab + 2bc + 2ca$ can be rearranged to $(c - a - b)^2 = 4ab$. Then $4 f(x) f(w)$ is a square for each $w \in \{x, y, z, x + y, x + z, y + z, x + y + z\}$. For each $\alpha, \beta, \gamma \in \{0, 1\}$ (i.e. $\mathbb{F}_2$), pick some $r_{\alpha \beta \gamma} \in R$ such that $4 f(x) f(\alpha x + \beta y + \gamma z) = r_{\alpha \beta \gamma}^2$. We can change $r_{\alpha \beta \gamma}$ to $-r_{\alpha \beta \gamma}$ if desired.

      Since $(f(x), f(y), f(x + y))$ is Heron, after multiplying by $(4 f(x))^2$, we get that $(r_{100}^2, r_{010}^2, r_{110}^2)$ is also Heron, which forces $r_{110} = r_{100} \pm r_{010}$. The same method yields $r_{\mathbf{v}_1 + \mathbf{v}_2} = r_{\mathbf{v}_1} \pm r_{\mathbf{v}_2}$ for each $\mathbf{v}_1, \mathbf{v}_2 \in \mathbb{F}_2^3$. Fix a sign of $r_{100}$, then choose a sign for $r_{010}$ such that $r_{110} = r_{100} + r_{010}$, and then choose a sign for $r_{001}$ such that $r_{111} = r_{110} + r_{001} = r_{100} + r_{010} + r_{001}$. Now we list some values of $f$:
      \begin{align*}
f(x) &= r_{100}^2 \\
f(y) &= r_{010}^2 \\
f(z) &= r_{001}^2 \\
f(x + y) &= (r_{100} + r_{010})^2 \\
f(x + z) &= (r_{100} \pm r_{001})^2 \\
f(y + z) &= (r_{010} \pm r_{001})^2 \\
f(x + y + z) &= (r_{100} + r_{010} + r_{001})^2
\end{align*}Recall that the goal is to show that at least one of the entries above is equal to $0$. Suppose for the sake of contradiction that none of them are zero. We just case-bash based on the choices of sign in the two $\pm$s.

      First, since $(f(x), f(y + z), f(x + y + z))$ is Heron, we get that $f(y + z)$ is equal to either $(r_{010} + r_{001})^2$ or $(2 r_{100} + r_{010} + r_{001})^2$. In the latter case, some choices of sign of $\pm$ yields $2 r_{100} + r_{010} + r_{001} = \pm r_{010} \pm r_{001}$. If both signs are $-$, then $r_{100} + r_{010} + r_{001} = 0$ and thus $f(x + y + z) = 0$. If both signs are $+$, then $r_{100} = 0$. If one of the sign is $-$, say $2 r_{100} + r_{010} + r_{001} = -r_{010} + r_{001}$, then $r_{100} + r_{010} = 0$ and thus $f(x + y) = 0$; so $f(y + z) = (2 r_{100} + r_{010} + r_{001})^2$ yields a contradiction. The only case remaining is that $f(y + z) = (r_{010} + r_{001})^2$. By symmetry, avoiding contradiction also yields $f(x + z) = (r_{100} + r_{001})^2$.

      Now consider that $(f(x + y), f(x + z), f(y + z))$ is Heron. This implies that, for some choice of the signs $\pm$,
      \[ \pm (r_{100} + r_{010}) \pm (r_{100} + r_{001}) \pm (r_{010} + r_{001}) = 0. \]WLOG suppose that at least two of the signs are $+$. If all three are equal to $+$, then we get $r_{100} + r_{010} + r_{001} = 0$ and thus $f(x + y + z) = 0$. Otherwise, WLOG the signs for $r_{100} + r_{010}$ and $r_{100} + r_{001}$ are $+$. Then the previous equality becomes $2 r_{100} = 0$, which yields that $r_{100} = 0$ and thus $f(x) = 0$; a contradiction as well. All cases yield a contradiction, so one of the seven values shown above must be equal to $0$. We are done.

      (There should be an alternative way, free of the above kind of bash, but either I didn't actually do it or that I forgot how to do it.)

    • Case 3. There exists $g \in G$ such that $f(2g) = 4 f(g) \neq 0$ and $g' \in G$ such that $f(g') \neq 0$ and $f(2g') = 0$.

      Again, pass on to the quotient and WLOG assume that $f^{-1}(0) = \{0\}$. The corresponding solutions fall into the third category; we claim that $g$ is a generator of $G$ of order $4$, which also implies that $g' = 2g$.

      For convenience, let $f(g) = A \neq 0$. Since $2g' = 0$, we have $f(g + g') = f(g - g') = f(g' - g)$. On the other hand, $(f(g + g'), f(g' - g), f(2g) = 4A)$ is a Heron triple, so we necessarily have $f(g + g') = f(g' - g) = A$. Since $f(g') \neq 0$ and $(A, A, f(g')) = (f(g), f(g' - g), f(g'))$ is Heron, we get $f(g') = 4A$. Now both $(f(g' - 2g), f(g' - g), f(g)) = (f(g' - 2g), A, A)$ and $(f(g' - 2g), f(g'), f(2g)) = (f(g' - 2g), 4A, 4A)$ are Heron, so either $f(g' - 2g) = 0$ or $f(g' - 2g) = 4A = 16A$. Since $char(R) \neq 2, 3$, the latter yields $A = 0$; a contradiction. Thus $f(g' - 2g) = 0 \implies g' = 2g$, and so $4g = 2g' = 0$.

      Fix any $x \in G$; the goal is to show that $x \in \{0, g, 2g, -g\}$. By (1), we get either $f(x + 2g) = f(x)$ or $f(x + 2g) + f(x) = 2 f(x + g) + 2 f(g)$. Similarly, either $f(x + 2g) = f(x)$ or $f(x + 2g) + f(x) = 2 f(x - g) + 2 f(g)$ holds, so we have either $f(x + 2g) = f(x)$ or $2 f(x + g) + 2 f(g) = 2 f(x - g) + 2 f(g) \implies f(x + g) = f(x - g)$. It now suffices to show that for any $x \in G$, $f(x + g) = f(x - g)$ implies $x \in \{0, 2g\}$; then we can apply the result to either $x$ or $x + g$.

      Fix any $x \in G$ such that $f(x + g) = f(x - g)$. Since $(f(x + g), f(x - g), f(2g)) = (f(x + g), f(x + g), 4A)$ is Heron and $A \neq 0$, we get $f(x + g) = A = f(g)$. Then we get $f(x + 2g), f(x) \in \{0, 4A\}$. If $f(x + 2g) = f(x) = 4A = f(2g)$, then $(4A, 4A, 4A)$ is a Heron triple; a contradiction, since $4A \neq 0$. So either $f(x + 2g) = 0 \implies x + 2g = 0 \implies x = 2g$, or $f(x) = 0 \implies x = 0$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5610 posts
#74
Y by
Writing this up again I forgot my solution anyway:

The only solutions are $f\equiv 0$, $f(x) = cx^2$, $f(x) = \begin{cases} 
0 & x\equiv 0\pmod 2 \\
c & x\equiv 1\pmod 2 \\
\end{cases}$, and $f(x) = \frac{n + |n|}{2}  \cdot  c$, for any integer constant $c\ne 0$, where $x_4$ is the remainder when $x$ is divided by $4$ and $n = \nu_2( 2^{x_4} + x_4^3 + x_4^2  + 8 x_4 ) - 1$. We can check that these work, now we prove they are the only solutions.

Let $P(a,b,c)$ be the given assertion.

$P(0,0,0): f(0) = 0$.

Claim: If $a + b + c = 0$ and $f(c) = 0$, then $f(a) = f(b)$.
Proof: We have $f(a)^2 + f(b)^2 = 2f(a)f(b)$, so $(f(a) - f(b))^2 = 0\implies f(a) = f(b)$. $\square$

This implies that $f$ is even.

$P(a, a, -2a): 2f(a)^2 + f(2a)^2 = 2f(a)^2 + 4f(a)f(2a)$, so either $f(2a) = 0$ or $f(2a) = 4f(a)$ for each $a$.

The equation implies that \[ f(a) ^2 + f(b)^2 + f(a+b)^2 = 2f(a)f(b) + 2f(b) f(a+b) + 2f(a+b)f(a) ,\]so \[ f(a+b)^2 - (2(f(a) + f(b))) f(a+b) + (f(a) - f(b))^2 = 0, \]so using the quadratic formula, \[f(a+b) = \frac{ 2f(a) + 2f(b) \pm \sqrt{4 ( (f(a) + f(b))^2  - (f(a) - f(b))^2) }}{2} = \frac{2f(a) + 2f(b) \pm 4\sqrt{f(a)f(b)}}{2}\]
This can be simplified to $f(a) + f(b) \pm 2\sqrt{f(a)f(b)} = \left(\sqrt{f(a)} \pm \sqrt{f(b)}\right)^2$. Let $Q(a,b)$ denote the assertion that \[ f(a+b) = \left(\sqrt{f(a)} \pm \sqrt{f(b)}\right)^2\]
Note that if $f(x) = 0$ for some $x$, then $f(a + x) = f(a)$ by $P(a,x)$, so $f(a) = f( a\pmod x )$ (in fact implying that $f(kx) = 0$ for any integer $k$).

Thus if $f(1) =0$, then $f\equiv 0$. So assume $f(1)  = c \ne 0$.

Now if $f(2) = 0$, we see that $f(2x) = 0$ for any integer $x$, and $f(2x+ 1) = c$ due to $f$ being periodic with period $2$ (from $P(a,2)$). This corresponds to one of the solutions described in the beginning. Now we may assume $f(2) \ne 0$, so $f(2) = 4c$.

If $f(4) = 0$, then $f(4x) = 0$ for any integer $x$, so $f$ is periodic with period $4$. Since $-1 \equiv 3 \pmod 4$ and $f$ is even, we have $f(1\pmod 4) = f(3\pmod 4 )= c$ and $f(2\pmod 4) = 4c$, corresponding to one of the solutions in the beginning.

Now assume $f(1), f(2), f(4)$ are nonzero. We have $f(1) = c, f(2) = 4c, f(4) = 16c$. From $P(2, 1)$, we see that $f(3)$ is either $\left(\sqrt{c} + 2\sqrt{c}\right)^2 = 9c$ or $(\sqrt{c} - 2\sqrt{c})^2 = c$. If $f(3) = c$, from $P(3,1)$, we see that $16c = \left(\sqrt{c} \pm \sqrt{c}\right)^2$, but this means $c = 0$, absurd. Thus, $f(3) = 9c$. Now we induct to show $f(n) = n^2 c $ for any positive integer $n$, with base cases $1,2,3,4$.

Suppose it's true for $1,2,\ldots, n$ and $n\ge 4$. We have from $P(n,1)$ that $f(n+1) = \left( (n \pm 1) \sqrt{c} \right)^2 = (n \pm 1)^2 c $. If $f(n+1) = (n-1)^2 c $, then $P(n-1,2)$ gives that $f(n +1) = \left( (n-1) \sqrt{c} \pm 2 \sqrt{c} \right)^2$, which is either $(n-3)^2 c$ or $(n+1)^2 c$, but this means that $(n-1)^2 = (n-3)^2$ or $(n+1)^2 = (n+3)^2$, both are false for $n > 2$. Thus, we must have $f(n+1) = (n+1)^2 c$, and the induction is complete.

Then of course $f(n) = n^2 c $ for any integer $n$ because $f$ is even.
This post has been edited 3 times. Last edited by megarnie, Jan 28, 2024, 3:40 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
naonaoaz
333 posts
#75
Y by
Let $P(x,y,z)$ be the assertion. $P(0,0,0) \implies f(0) = 0$. Let $b = 0$ to get
\[f(a)^2+f(-a)^2 = 2f(a)f(-a) \implies (f(a)-f(-a))^2 = 0 \implies f(a) = f(-a)\]for all integers $a$. Next letting $c = -(a+b)$ gives
\[f(a+b)^2 - 2(f(a)+f(b))f(a+b) + (f(a)-f(b))^2 = 0\]\[\implies f(a+b) = f(a)+f(b) \pm 2\sqrt{f(a)f(b)}\]Thus either all $f(x) \ge 0$ or all $\le 0$ or else there will be an complex output of $f$. Since there is a bijection between all positive $f(x)$ and negative, WLOG all $f(x) \ge 0$. Thus
\[\sqrt{f(a+b)} = \left(\sqrt{f(a)}\pm \sqrt{f(b)}\right)^2 \implies g(a+b) = g(a) \pm g(b)\]where $g(x) = \sqrt{f(x)}$. Note that $g(2) = g(1) \pm g(1)$.
  • If $g(2) = 0$, then we can inductively show $g(2k) = 0$ for all integer $k$. Next notice $g(2k+1) = g(2k) \pm g(1) = g(1)$ where we took $+$ sign to avoid $g(2k)$ being negative.
  • If $g(2) = 2g(1)$. Next if $g(4) = 0$, then $g(4k) = 0$ for all integer $k$. Next $g(4k+1) = g(4k) \pm g(1) = g(1)$. Similarly, $g(4k+2) = 2g(1)$. Lastly since $0 = g(1) \pm g(4k+3)$, so $g(4k+3) = g(1)$.

    If $g(4) = 4g(1)$, then $g(3) = 3g(1)$. Next since $g(5) = 4g(1) \pm g(1) = 3g(1) \pm 2g(1)$, we must have $g(5) = 5g(1)$. Induction gives $g(n) = n g(1)$.
Concluding, we see
  • $f(x) = 0$ for even $x$, and $f(x) = c$ for odd $x$.
  • $f(x) = 0$ for $x \equiv 0 \pmod 4$, $f(x) = c$ for $x \equiv 1,3 \pmod 4$, and $f(x) = 4c$ if $x \equiv 2 \pmod 4$.
  • $f(x) = cx^2$ for all $x$.
for any $c \in \mathbb{Z}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AngeloChu
471 posts
#76
Y by
only a simple sketch of my full sol since i got lazy
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
KevinYang2.71
428 posts
#77
Y by
We claim the only functions are $\boxed{f(x)\equiv cx^2}$,
\[
\boxed{f(x)\equiv
\begin{cases}
0 & \text{if $x\equiv 0\pmod 2$}\\
c & \text{if $x\equiv 1\pmod 2$}
\end{cases}
},
\]and
\[
\boxed{f(x)\equiv
\begin{cases}
0 & \text{if $x\equiv 0\pmod 4$}\\
c & \text{if $x\equiv 1\pmod 2$}\\
4c & \text{if $x\equiv 2\pmod 4$}
\end{cases}
}
\]for a constant $c\in\mathbb{Z}$. It is not hard to check that these work.

Let $P(a,b,c)$ denote the given assertion. From $P(0,0,0)$ we get $f(0)=0$ and $P(a,-a,0)$ gives us $f(a)=f(-a)$. Then $P(a,b,-a-b)$ yields
\[
f(a)^2+f(b)^2+f(a+b)^2=2f(a)f(b)+2f(a+b)(f(a)+f(b))
\]so
\[
f(a+b)=f(a)+f(b)\pm\sqrt{2f(a)f(b)}\tag{*}
\]for all $a,b\in\mathbb{Z}$. Since $f(a+1)$ is real, it follows that $f(a)$ and $f(1)$ have the same sign. If $f(1)$ is negative we can multiply $(*)$ by $-1$ so $-f$ is positive and we can simply let $c$ be negative in our boxed functions. Thus we may WLOG assume $f(1)\geq 0$. Then $\sqrt{f(a+b)}=\left|\sqrt{f(a)}\pm\sqrt{f(b)}\right|$. Let $g(x):=\sqrt{f(x)}$ so $g(a+b)=|g(a)\pm g(b)|$ for all $a,b\in\mathbb{Z}$. Note that $g(n)=g(-n)\geq 0$ for all $n\in\mathbb{Z}$. Let $r:=g(1)$. Then $g(2)\in\{0,2r\}$.

Case 1: $g(2)=0$. We prove by induction on $|x|$ that
\[
g(x)\equiv
\begin{cases}
0 & \text{if $x\equiv 0\pmod 2$}\\
r & \text{if $x\equiv 1\pmod 2$}
\end{cases}
\]with the base cases trivial. Assume the statement for $|x|\leq k$ (with $k\geq 2$). Then $g(k+1)=|g(k-1)\pm g(2)|=g(k-1)$ so the induction step is complete. This yields the second solution set with $c:=r^2$.

Case 2: $g(2)=2r$. Then $g(3)\in\{r,3r\}$.

Case 2.1: $g(3)=r$. We prove by induction on $|x|$ that
\[
g(x)\equiv
\begin{cases}
0 & \text{if $x\equiv 0\pmod 4$}\\
r & \text{if $x\equiv 1\pmod 2$}\\
2r & \text{if $x\equiv 2\pmod 4$}
\end{cases}
\]with the base cases trivial. Note that $g(4)=|g(3)\pm g(1)|\in\{0,2r\}$ and $g(4)=|g(2)\pm g(2)|\in\{0,4r\}$ so $g(4)=0$. Assume the statement for $|x|\leq k$ (with $k\geq 4$). Then $g(k+1)=|g(k-3)\pm g(4)|=g(k-3)$ so the induction step is complete. This yields the third solution set with $c:=r^2$.

Case 2.2: $g(3)=3r$. We prove by induction on $|x|$ that $g(x)\equiv rx$ with the base cases trivial. Assume the statement for $|x|\leq k$ (with $k\geq 3$). Then $g(k+1)=|g(k)\pm g(1)|=\{c(k-1),c(k+1)\}$ and $g(k+1)=|g(k-1)\pm g(2)|=\{r(k-3),r(k+1)\}$ so $g(k+1)=r(k+1)$. This yields the first solution set with $c:=r^2$.

We are done. $\square$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ezpotd
1286 posts
#78
Y by
I claim the solution set is given by $f = kx^2$, $f = 0$, $f$ giving distinct values mod $2$, and lastly $f$ giving values mod $4$, where it gives $0$ for $0$, $k$ for $1$, $4k$ for $2$, $k$ for $3$. We check each of these work.

For the first function, we desire to prove $a^4 + b^4 + c^4 = 2a^2b^2 + 2b^2c^2 + 2a^2c^2$, setting $c=  -(a + b)$ and raw expansion finishes.
The second function is obvious.
The third function just requires us to analyze the summation cases mod $2$, of which there are only two, $0 + 0 + 0 =0$ and $0 + 1 + 1 = 0$, both of which obviously work.
The last function requires us to analyze the summation cases mod $4$, of which there are just three, $0 + 0 + 0 = 0, 0 + 1 + 3 = 0, 0 + 2 + 2 = 0$, all of which obviously work.

Set $a,b,c = 0$ to get $f(0) = 0$. Then set $a = -b, c = 0$ to get $f(a) = f(-a)$. We use this without mention, effectively restraining the problem over positive values. Now take $a = b, c = -2a$, and we get $2f(a)^2 + f(-2a)^2 = 2f(a)^2 + 4f(a)f(-2a)$, giving $f(-2a)^2 = 4f(a)f(-2a)$, or $f(2a)(f(2a) - 4f(a)) = 0$. Thus for all $a$, we have $f(2a) = 0$ OR $f(2a) = 4f(a)$. We now divide into two cases.

Case 1: $f(n) = 0$ for some positive $n$. We first inductively prove $f(kn )=  0$ for all $k$. The case of $k = 2$ is obvious. Then take $a = n, b = kn, c = -kn - n$, we get $f(kn + n)^2 = 0$ as desired. Now we take $n | x + y$, setting $a = x ,b = y, c = -n$ gives $f(x)^2 + f(y)^2 = 2f(x)f(y)$, giving $f(x) = f(y)$. This means that if $x \equiv -y \mod n, f(x) = f(y)$ (this also implies that $f$ operates modulo $n$). Now we take the smallest positive root of $f$, $n$, and we claim that all other roots are multiples of $n$. Assume this is not the case, then there must be another root $m$ not divisible by $n$ , and $f(n - (m \mod n))$ must be equal to $f(m)$ and thus equal to $0$, forcing a smaller multiple, contradiction. It suffices now to do casework on $n$. If $n = 1$, we get $f$ is just $0$ over its entire domain. If $n$ has an odd prime divisor, we can find some solution with $k > 0, n \nmid x$ to $2^k x \equiv x \mod n$, which gives $f(2^kx) = 4f(2^{k - 1}x)  = \cdots  = 2^{2k}f(x)$, but since $f$ operates modulo $n$, we must have $f(x) = 2^{2k}f(x)$, which has no solutions since $f(x) \neq 0$. If $n = 2$, the only possible solution is $f$ has some value over odds and another over evens, which always works. If $n = 4$, we must have $f(1) = f(3), f(2) \neq 0$, the latter of which forces $f(2) = 4f(1)$. This constrains the solution to a mod $4$ repetition of $f(0) = 0, f(1) = k, f(2) = 4k, f(3) = k$, which always works. If $n \ge 8$, we have $f(\frac n2) > 0$, so $\frac 14(n^2)f(3) = \frac{1}{16}n^2f(6) = \cdots  f(\frac n2) = \cdots = \frac{1}{16}n^2 f(2) = \frac 14 n^2 f(1)$, so $f(1) = f(3)$, then taking $a = 1, b = 3, c= -4$, gives $f(4) = 4f(1)$, contradiction.

Case 2: $f(n) \neq 0$ for all positive $n$. In this case take $f(1) = k$, now we inductively prove $f(n) = cn^2$ for positive integers, then using $f$ even finishes. The base case of $n = 1,2$ are trivial. After this, take $a = 1, b = n, c=  -n - 1$, this gives $c^2 + c^2n^4 + f(n + 1)^2 = 2c^2n^2 + (2cn^2 + 2c)f(n + 1)$, which gives $f(n + 1) = c(n + 1)^2, c(n  - 1)^2$. If the latter is true, substitute $a = n , b =n , c = -2n$, we then get $f(2n) = 4f(n) = 4cn^2$, but substituting $a = n - 1, b = n+ 1 , c = -2n$ gives $f(2n) = 4f(n - 1) = 4c(n - 1)^2$, contradiction. This forces $f(n + 1) = c(n + 1)^2$.
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
#79
Y by
Let $P(a,b,c)$ denote the given assertion. Then, \begin{align*}
P(0,0,0) & \ \Rightarrow 3f(0)^2=6f(0)^2 \Rightarrow f(0)=0 \\
P(a,-a,0) & \ \Rightarrow (f(a)-f(-a))^2=0 \Rightarrow f(a)=f(-a). \end{align*}So $f$ is even, we'll use this fact a lot now. If $f(1)=0$ then $P(n+1,n,-1)$ gives us $f(n+1)=f(n)$ for all $n$ so by induction $f(n)=0$. This clearly works.

Let us now assume $f(1)$ is not $0$, then by scaling lets assume $f(1)=1$. $P(1,1,-2)$ implies that $f(2)\in \{0,4\}$. Let us first consider $f(2)=0$ then it's easy to find $f(n+2)=f(n)$ for all $n$. So $$f (n)=\begin{cases} 0 & n\equiv 0 \pmod 2 \\ 1 & n\equiv 1 \pmod 2\end{cases}.$$It's not too hard to verify by casework that this is indeed a solution.

Let's consider $f(2)=4$. Suppose $f(n)=n^2$ for all $0 \leq n\leq k$ for $k\geq 2$. Then $$P(k,1,-k-1) \Rightarrow f(k+1)^2-2f(k+1)(k^2+1)+(k^2-1)^2=0 \Rightarrow f(k+1)=(k\pm 1)^2.$$Suppose it were that $f(k+1)=(k- 1)^2$. Then $f(k-1)=f(k+1)$ and \begin{align*} P(k+1,k-1,-2k) & \ \Rightarrow f(2k)^2=4f(2k)f(k+1) \\ P(k,k,-2k) & \ \Rightarrow f(2k)^2=4f(2k)f(k) \end{align*}This implies $f(2k)=0$. So, $P(n,2k,-n-2k)$ gives us $f(n+2k)=f(n)$. We have $$P(k-1,k-1,-2k+2)\Rightarrow 2(k-1)^4+2^4=4(k-1)^2\cdot 2^2+2\cdot (k-1)^2\cdot (k-1)^2 \Rightarrow k=0,2 \qquad (\star)$$so $k=2$. So, $f(n+4)=f(n)$ and by induction we get $$f (n)=\begin{cases} 0 & n\equiv 0 \pmod 4 \\ 1 & n\equiv 1,3 \pmod 4 \\ 4 & n\equiv 2 \pmod 4\end{cases}.$$Again, it's not too hard to verify by casework that this is indeed a solution. Now if $f(k+1)=(k+1)^2$ then by induction $f(n)=n^2$ for all $n$, which clearly works. Note that the induction works because $k+1>2$ - look at $ (\star)$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cursed_tangent1434
639 posts
#80
Y by
Pretty nasty casework. Note that,
\[P(0,0,0)\implies 3f(0)^2=6f(0)^2\]which gives us that $f(0)=0$. Now, $P(a,-a,-0)$ gives us that
\begin{align*}
    f(a)^2+f(-a)^2 &= 2f(a)f(-a)\\
    f(a)^2-2f(a)f(-a)+f(-a)^2 &= 0\\
    (f(a)-f(-a))^2 &= 0
\end{align*}Thus, $f(-a)=f(a)$ for all $a \in \mathbb{Z}^+$. Now, look at $P(a,b,-a-b)$ to obtain that,
\[f(a)^2+f(b)^2+f(-a-b)^2 =2f(a)f(b)+2f(b)f(-a-b)+2f(-a-b)f(a)\]So,
\begin{align*}
    f(a+b)^2-2f(a+b)(f(a)+f(b))+f(a)^2-2f(a)f(b)+f(b)^2&=0 \\
    (f(a+b)^2-f(a)-f(b))^2 &= 4f(a)f(b)
\end{align*}
Now, note that, this means,
\[(f(2)-2f(1))^2=4f(1)^2\]and thus, $f(2)=4f(1)$ or $f(2)=0$. Based on these two value, we have several cases.

Case 1 : $f(1)=c$ and $f(2)=4c$. In this case note that we have,
\[(f(3)-f(2)-f(1))^2=4f(2)f(1)=16f(1)^2\]so, $f(3)=9c$ or $f(3)=c$. So, we have two sub cases.

\textbf{Subcase 1 : } $f(3)=9c$. Here, simply note that if we have $f(1)=c,\dots, f(n)=n^2c$ for some $n\geq 3$ then,
\begin{align*}
    (f(n+1)-f(n)-f(1))^2 &= 4f(n)f(1)\\
    (f(n+1)-n^2c-c)^2 &= 4n^2c^2
\end{align*}So, $f(n+1)=(n-1)^2c$ or $f(n+1)=(n+2)^2c$. But if $f(n+1)=(n-1)^2c$,
\begin{align*}
    (f(n+1)-f(n-1)+f(2))^2 &= 4f(n-1)f(2)\\
    (f(n+1)-(n-1)^2c+4c)^2 &= 16(n-1)^2c^2\\
    16c^2 &= 16(n-1)^2c^2
\end{align*}which is clearly impossible for all $n\geq 3$. Thus, we must have $f(n+1)=(n+1)^2c$. Thus, by the PMI, we have that for all integers $k \geq 1$, $f(k)=k^2f(1)$. This gives us the function $f(n)=n^2c$ for some constant $c$ for all positive integers $n$.

Subcase 2 : $f(3)=c$. In this case note that we have,
\[(f(4)-8c)^2=(f(4)-2f(2))^2=4f(2)^2=64c^2\]So, $f(4)=16c$ or $f(4)=0$. But note that if $f(4)=16c$ we have
\[4c^2=4f(3)f(1)=(f(4)-f(3)-f(1))^2=(16c-c-c)^2\]so, $4c^2=196c^2$ which requires, $c=0$, which implies that $f(4)=0$ anyways. Thus, in all cases we have that $f(4)=0$.

Note that then, we can obtain
\begin{align*}
    (f(n+4)-f(n)-f(4))^2 &= 4f(n)f(4)\\
    f(n+4)-f(n)-f(4) &= 0 \\
    f(n+4) &= f(n)
\end{align*}for all $n \geq 1$. Thus, the function is periodic with a period of $4$ giving us,
\[
f(n)=
    \begin{cases}
        c & \text{if } n \equiv 1,3 \pmod{4}\\
        4c & \text{if } n \equiv 2 \pmod{4}\\
        0 & \text{if } n \equiv 0 \pmod{4}
    \end{cases}
\]for all $n \in \mathbb{N}$ for some constant $c \in \mathbb{N}$.

Case 2 : $f(2)=0$. Here, note that
\begin{align*}
    (f(n+2)-f(n)-f(2))^2 &= 4f(n)f(2)\\
    f(n+2)-f(n)-f(2) &= 0\\
    f(n+2) &= f(n)
\end{align*}for all $n\geq 1$. Thus, the function is periodic with a period of $2$ giving us the function,
\[
f(n)=
    \begin{cases}
        c & \text{if } n \equiv 1 \pmod{2}\\
        0 & \text{if } n \equiv 0 \pmod{2}
    \end{cases}
\]Thus, we have exhausted all cases and are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AshAuktober
1009 posts
#82
Y by
Nice problem!

Show that $f(0) = 0, f(-x) = f(x)$.
Then from here, assuming $f(1) \ne 0$, show that if $f(n) = n^2f(1)$, then $f(n+1) \in \{(n-1)^2f(1), (n+1)^2f(1)\}$.
From here, if $f(n+1) = (n+1)^2f(1) \forall n,$ then $f(x) = f(1)x^2$. Further note that if $f(2) = (1-1)f(1)^2 = 0$ then we get the solution $$f(x) = \begin{cases}
f(1), \quad \text{ if } n \equiv 1 \pmod{2}\\
0, \quad \text{ if } 2 \mid n.
\end{cases}$$so assume otherwise.
If $f(n+1) = (n-1)^2f(1)$ for some $n \in \mathbb{N}_{\ge 2}$, with $f(x) = x^2f(1) \forall x \le n$, comparing the equations of $(2, n-1, a)$ and $(0, n+1,a)$ gives us $f(2)^2 = 4f(2)(n-1)^2f(1)$, or $f(2) \in \{0, 4(n-1)^2f(1)\}$. $f(2) \ne 0$, so $f(2) = 4(n-1)^2f(1)$.
But $4f(1) = f(2) = 4(n-1)^2f(1)  \implies n \in \{0, 2\}$. $n = 0$ is false as $n \in \mathbb{N}_{\ge 2}$. So consider $n = 2$. This is basically the same as $f(3) = f(1)$. Further we may assume $f(2) = 4f(1)$ as previous.
Then $f(4) = f(2\times 2) \in \{0, 16f(1)\},$ and $f(4) = f(3+1) \in \{0, 4f(1)\}$. Since $f(1) \ne 0$, this implies $f(4) = 0$. In particular, $f$ is periodic with period 4, so we get
$$f(x) = \begin{cases}
0, \quad \text{ if } 4 \mid n.\\
f(1) \quad \text{ if } n \equiv 1 \pmod{2}.\\
4f(1) \quad \text{ if } n \equiv 2 \pmod{4}.
\end{cases}$$All of the functions extracted above work, so we're done. $\square$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
658 posts
#83
Y by
what the impossible p4

The answer is:
\[f\equiv\begin{cases}0&x\equiv0\bmod4\\k&x\equiv1,3\bmod4\\4k&x\equiv2\bmod4\end{cases}\]\[f\equiv\begin{cases}0&x\equiv0\bmod2\\k&x\equiv1\bmod2\end{cases}\]\[f\equiv 0\]
Begin by taking $(0, 0, 0) \implies f(0) = 0, (0, a, -a) \implies f(a)$ is even.

Observe that $(f(a) + f(b) - f(c))^2 = f(a)^2 + f(b)^2 + f(c)^2 - 2f(c)f(a) - 2f(c)f(b) + 2f(a)f(b) = 4f(a)f(b).$ Hence, $f(a)f(b)$ is a perfect square. Let $f \equiv k g^2,$ where $k\in\mathbb Z, g\colon\mathbb Z\to\mathbb N_0$ and $g$ is even. Hence, $g(a)^2 + g(b)^2 - g(a + b)^2 = \pm 2g(a)g(b).$ Hence, $g(a + b) = g(a) + g(b)$ or $g(a + b) = |g(a) - g(b)|.$ Hence, we can assume that $g(1) = 1$.

Now, assume there exists $k$ such that $g(k) = 0.$ Then $g(a) = g(k - a) = 0$ or $g(a) = g(k - a),$ and thus, if $g(k) = 0,$ then $g(a) = g(k - a) = g(a - k).$ Hence, $g$ has period $k.$ However, we also know $g$ is even, and thus, if $k$ is odd, then $g\equiv 0.$ Otherwise, the period is even. If $k= 2, 4,$ then $g\equiv x\pmod2$ or
\[g\equiv\begin{cases}0&x\equiv0\bmod4\\1&x\equiv1,3\bmod4\\2&x\equiv2\bmod4\end{cases}\]Now, assume $k> 4.$ In the original equation, take $(a, a, 2a)$ to get $f(2a) = 4f(a)$ or $f(2a) = 0.$ However, this implies $k \leq 4.$

Now, assume that $g$ has no other roots. Now, we induct. Assume there was a pair $(a, b)$ such that $g(a + b) = |g(a) - g(b)| < g(a) + g(b) = g(a) + g(b - 1) + 1 = g(a + b - 1) + 1,$ which finishes. Thus, $g\equiv x.$
This post has been edited 2 times. Last edited by Ilikeminecraft, Mar 29, 2025, 11:29 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Nari_Tom
117 posts
#84
Y by
I will write down my solution for some reason.

Indeed, there are only three sets of solutions for this problem. Solutions are:
$(a)$. $f(x)=kx^2$, for all $x \in \mathbb {Z}$, where $k$ is a constant.
$(b)$. $f(x)=0$ for all even $x$, and $f(x)=k$ for all odd $x$ where $k$ is a constant.
$(c)$. $f(x)=k$ for all odd $x$, $f(x)=0$ for all $x \equiv 0 \pmod 4$, $f(x)=4k$ for all $x \equiv 2 \pmod 4$.


It's easy to prove that $f(0)=0$, and $f(x)=f(-x)$.


Lemma (1): If $f(a)=0$, then $f(b)=f(c)$ where $a+b+c=0$.
Proof: $f(a)=0$, then $f(b)^2+f(c)^2=2f(b)f(c)$ $\implies$ $(f(b)-f(c))^2=0$ and result follows.


Lemma (2): $f(2x)[f(2x)-4f(x)]=0$, for all $x \in \mathbb{Z}$.
Proof: Just take $(a=x, b=x, c=-2x)$, then result follows since $f$ is even.


Lemma (3): Let's define $g(x)=\frac {f(x)}{f(1)}$. Then $g(1)=1$. If we have $g(a)=a^2$ and $g(b)=b^2$, then $g(a+b)=(a+b)^2$ or $g(a+b)=(a-b)^2$.
Proof: Just plug $(a=a, b=b, c=-(a+b))$, then we have $[g(a+b)-(a+b)^2]*[g(a+b)-(a-b)^2]=0$, and the result follows.


If $f(1)=0$, then by Lemma (1) we have that $f(a+1)=f(a)$, so our function is const, so $f(x)=0$ in this case.


Otherwise by using Lemma (2) we get that $f(2)=0$ or $f(2)=4f(1)$.


If $f(2)=0$, then by applying Lemma (1) we have that $f(x)=0$ for all even x, and $f(x)=k$ for all odd $x$.


Now assume that $f(2)=4f(1)$. Let's define $g(x)=\frac {f(x)}{f(1)}$. Then $g(1)=1$ and $g(2)=4$. Let $g(3)=d$, then by taking $(a=1, b=2, c=-3)$ we will get that $(a-1)(a-9)=0$. We will consider each cases here.


(Case 1)
Let $g(3)=1$, Then we can get $g(4)=0$ by checking small values. Since $g(4)=4$, by using Lemma (1), we will get $g(n+4)=g(n)$, for all $n$ which gives us Solution(c).


(Case 3)
Let $g(3)=9$, in this case we can easily induct on natural numbers using Lemma (3), which gives us Solution(a).
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bjump
1032 posts
#85
Y by
solution
This post has been edited 1 time. Last edited by bjump, Mar 30, 2025, 3:00 PM
Z K Y
N Quick Reply
G
H
=
a