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
Yesterday at 11:16 PM
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
Yesterday at 11:16 PM
0 replies
extremaly hard NT
gggzul   0
14 minutes ago
Source: Cambodian IMO training camp
We will say that a set of $2025$ consecutive positive integers is cool if it contains exactly $13$ primes. Are there infinitely many cool sets?
0 replies
gggzul
14 minutes ago
0 replies
3 var inequality
sqing   1
N 16 minutes ago by pooh123
Source: Own
Let $ a,b,c>0 ,\frac{a}{b} +\frac{b}{c} +\frac{c}{a} \leq 2\left( \frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right). $ Prove that
$$a+b+c+2\geq abc$$Let $ a,b,c>0 , a^3+b^3+c^3\leq 2(ab+bc+ca). $ Prove that
$$a+b+c+2\geq abc$$
1 reply
sqing
Wednesday at 9:30 AM
pooh123
16 minutes ago
Tangent to two circles
Mamadi   0
22 minutes ago
Source: Own
Two circles \( w_1 \) and \( w_2 \) intersect each other at \( M \) and \( N \). The common tangent to two circles nearer to \( M \) touch \( w_1 \) and \( w_2 \) at \( A \) and \( B \) respectively. Let \( C \) and \( D \) be the reflection of \( A \) and \( B \) respectively with respect to \( M \). The circumcircle of the triangle \( DCM \) intersect circles \( w_1 \) and \( w_2 \) respectively at points \( E \) and \( F \) (both distinct from \( M \)). Show that the line \( EF \) is the second tangent to \( w_1 \) and \( w_2 \).
0 replies
Mamadi
22 minutes ago
0 replies
Number Theory problem
Mamadi   0
24 minutes ago
Source: Own
Find all \( a, b \in \mathbb{N} \) such that \( a! + b \) and \( b! + a \) are both perfect squares.
0 replies
Mamadi
24 minutes ago
0 replies
trigonometric functions
VivaanKam   10
N Today at 12:43 AM by aok
Hi could someone explain the basic trigonometric functions to me like sin, cos, tan etc.
Thank you!
10 replies
VivaanKam
Apr 29, 2025
aok
Today at 12:43 AM
Geometry
BBNoDollar   0
Yesterday at 11:13 PM
Let ABCD be a convex quadrilateral with angles BAD and BCD obtuse, and let the points E, F ∈ BD, such that AE ⊥ BD and CF ⊥ BD.
Prove that 1/(AE*CF) ≥ 1/(AB*BC) + 1/(AD*CD) .
0 replies
BBNoDollar
Yesterday at 11:13 PM
0 replies
Coprime sequence
Ecrin_eren   1
N Yesterday at 10:19 PM by revol_ufiaw


"Let N be a natural number. Show that any two numbers from the following sequence are coprime:

2^1 + 1, 2^2 + 1, 2^3 + 1, ..., 2^N + 1."



1 reply
Ecrin_eren
Yesterday at 8:53 PM
revol_ufiaw
Yesterday at 10:19 PM
Find the functions
Ecrin_eren   1
N Yesterday at 10:02 PM by undefined-NaN


"Find all differentiable functions f that satisfy the condition f(x) + f(y) = f((x + y) / (1 - xy)) for all x, y ∈ R, where x ≠ 1 and y ≠ 1."





1 reply
Ecrin_eren
Yesterday at 8:58 PM
undefined-NaN
Yesterday at 10:02 PM
If it is an integer then perfect square
Ecrin_eren   0
Yesterday at 8:55 PM


"Let a, b, c, d be non-zero digits, and let abcd and dcba represent four-digit numbers.

Show that if the number abcd / dcba is an integer, then that integer is a perfect square."



0 replies
Ecrin_eren
Yesterday at 8:55 PM
0 replies
Sum of arctan
Ecrin_eren   1
N Yesterday at 8:53 PM by Shan3t


Find the value of the sum:
sum from n = 0 to infinity of arctan(k / (n² + kn + 1))


1 reply
Ecrin_eren
Yesterday at 8:49 PM
Shan3t
Yesterday at 8:53 PM
Cool vieta sum
Kempu33334   6
N Yesterday at 6:29 PM by Lankou
Let the roots of \[\mathcal{P}(x) = x^{108}+x^{102}+x^{96}+2x^{54}+3x^{36}+4x^{24}+5x^{18}+6\]be $r_1, r_2, \dots, r_{108}$. Find \[\dfrac{r_1^6+r_2^6+\dots+r_{108}^6}{r_1^6r_2^6+r_1^6r_3^6+\dots+r_{107}^6r_{108}^6}\]without Newton Sums.
6 replies
Kempu33334
Wednesday at 11:44 PM
Lankou
Yesterday at 6:29 PM
đề hsg toán
akquysimpgenyabikho   3
N Yesterday at 5:50 PM by Lankou
làm ơn giúp tôi giải đề hsg

3 replies
akquysimpgenyabikho
Apr 27, 2025
Lankou
Yesterday at 5:50 PM
A problem with a rectangle
Raul_S_Baz   13
N Yesterday at 4:38 PM by undefined-NaN
On the sides AB and AD of the rectangle ABCD, points M and N are taken such that MB = ND. Let P be the intersection of BN and CD, and Q be the intersection of DM and CB. How can we prove that PQ || MN?
IMAGE
13 replies
Raul_S_Baz
Apr 26, 2025
undefined-NaN
Yesterday at 4:38 PM
Find the domain and range of $f(x)=2-|x-5|.$
Vulch   1
N Yesterday at 12:13 PM by Mathzeus1024
Find the domain and range of $f(x)=2-|x-5|.$
1 reply
Vulch
Yesterday at 2:07 AM
Mathzeus1024
Yesterday at 12:13 PM
Number theory or function ?
matematikator   15
N Apr 23, 2025 by YaoAOPS
Source: IMO ShortList 2004, algebra problem 3
Does there exist a function $s\colon \mathbb{Q} \rightarrow \{-1,1\}$ such that if $x$ and $y$ are distinct rational numbers satisfying ${xy=1}$ or ${x+y\in \{0,1\}}$, then ${s(x)s(y)=-1}$? Justify your answer.

Proposed by Dan Brown, Canada
15 replies
matematikator
Mar 18, 2005
YaoAOPS
Apr 23, 2025
Number theory or function ?
G H J
Source: IMO ShortList 2004, algebra problem 3
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
matematikator
110 posts
#1 • 3 Y
Y by Adventure10, Mango247, and 1 other user
Does there exist a function $s\colon \mathbb{Q} \rightarrow \{-1,1\}$ such that if $x$ and $y$ are distinct rational numbers satisfying ${xy=1}$ or ${x+y\in \{0,1\}}$, then ${s(x)s(y)=-1}$? Justify your answer.

Proposed by Dan Brown, Canada
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
grobber
7849 posts
#2 • 3 Y
Y by Adventure10, Mango247, and 1 other user
Where did you find this problem? It is realy interesting.

I believe the answer to be 'yes', and I think I have a way of constructing the function, but it's only verified empirically, and I haven't fixed my ideas well enough to provide a full proof. Here's what I thought we could do:

It suffices to determine the function on the positive rationals, of course, so let's restrict our attention to those. Construct the Stern-Brocot tree step by step. At each step, to each leaf you attach a leaf to the left and a leaf to the right. Label the leaf to the left with $-1$ and the leaf to the right with $1$. It seems to work.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Myth
4464 posts
#3 • 2 Y
Y by Adventure10, Mango247
We have $s(x)=s(1+x)=-s(1/x)$. I see a direct way to use continuous fractions here, since having these rules we can obtain $s(x)$ from $s(1)$. :?
Did I say something stupid?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
matematikator
110 posts
#4 • 2 Y
Y by Adventure10, Mango247
Solution: Let x=a/b be a positive rational, where a,b are coprime positive integers. Consider the squence of consecutive remainders given by euclidean algorithm for the ordered pairs (a,b). if u mod v denotes the least non negative remainder of u modulo v, this sequence can be written as
r_0=a, r_1=b, r_2=a mod b, ... , r_(i+1)=r_(i-1) mod r_i, ... , r_n=1, r_(n+1)=0 (1)

the index n=n(x) of the least nonzero remainder r_n=1 is uniquily determined by x, so
t(x)=(-1)^n(x) is a well-defined function from the positive rationals into {-1,1}. Now define s: Q-->{-1,1} by

s(x)=t(x) for x in Q, x>0 or s(x)=-t(-x) for x in Q, x<0 or s(0)=1

We prove that s has the desired properties. Let x and y be distinct rational numbers.
* If x+y=0, let x>0 and y<0 (x,y are nonzero). Then , by definition, s(x)=t(x),
s(y)=-t(-y)=-t(x), hence s(x)s(y)=-1.
**If xy=1 then x and y are of the same sign and neither equals 1 or -1. Suppose first
that x=a/b >0, y=b/a >0, with a,b coprime positive integers, one may also assume
that a>b. Euclidean algorithm for (a,b) starts a,b, (a mod b), ... .On the other hand,
the algorithm for pair (b,a) gives b,a,b,(a mod b)m,... .
Because a>b implies r_2=(b mod a)=b. Each term in (1) depends only on the previous
two, so the sequence for x has length by 1 less than the sequence for y, that is,
n(y)=n(x)+1. Hence t(y)=-t(x), and so s(y)=-s(x), as needed. Now the case of x,y
follows from the definition...
**If x+y=1 then ....

by the same logic it'll be true...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Myth
4464 posts
#5 • 2 Y
Y by Adventure10, Mango247
We see that $t(x)$ is a number of subfractions in the continuous fraction representing $x$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
matematikator
110 posts
#6 • 2 Y
Y by Adventure10, Mango247
absolutely...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Raúl
69 posts
#7 • 2 Y
Y by Adventure10, Mango247
I knew it's imoral relive topic but I have a question: we can prove that $ s(1) = 0$ if we use $ s(x) = - s(\frac {1}{x})\Leftrightarrow s(1) = - s(1)\Leftrightarrow s(1) = 0$ contradiction.

I dont really understand :maybe:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bearkiller
37 posts
#8 • 2 Y
Y by Adventure10, Mango247
x and y are distinct rational numbers if you use s(x) =-s(1/x) for x=1 then we have x=1=1/1=1/x=y.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Wolstenholme
543 posts
#9 • 7 Y
Y by bcp123, jt314, JasperL, meowme, Adventure10, Mango247, Sedro
Every positive rational number has a unique continued fraction of the form $ a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{\ddots\frac{1}{a_{m - 1} + \frac{1}{a_m}}}}} $ for some $ m \in \mathbb{N} $ where $ a_i \in \mathbb{N} $ for all $ i $. From now on this will be denoted as $ [a_0; a_1, a_2, \dots, a_m] $.

For every $ a \in \mathbb{Q}^{+} $, let $ s(a) = (-1)^m $. Then let $ s(0) = -1 $ and for all $ b \in \mathbb{Q} \setminus \{0\} $ let $ s(-b) = -s(b) $. I claim that this $ s $ satisfies the desired properties. To prove this, consider two rational numbers $ x < y $.

$ 1) $ If $ x + y = 0 $ then by definition $ s(x)s(y) = -1 $ as desired.

$ 2) $ If $ x + y = 1 $ and $ x = 0 $ then by definition $ s(x)s(y) = -1 $ as desired since $ s(1) = 1 $.

$ 3) $ If $ x + y = 1 $ and $ x < 0 $ then to prove that $ s(x)s(y) = -1 $ it suffices to show that $ s(-x) = s(y) $. Let $ -x = [a_0; a_1, a_2, \dots, a_m] $. Then $ y = [a_0 + 1; a_1, a_2, \dots, a_m] $ and so $ s(-x) = s(y) = (-1)^m $ as desired.

$ 4) $ If $ x + y = 1 $ and $ x > 0 $ we can let $ y = [0; 1, a_2, \dots, a_m] $ so that $ x = [0; a_2 + 1, a_3, \dots, a_m] $ so $ s(y) = (-1)^m $ and $ s(x) = (-1)^{m - 1} $ which implies that $ s(x)s(y) = -1 $ as desired.

$ 5) $ If $ xy = 1 $, we can assume WLOG that $ 0 < x < 1 $. Then letting $ x = [0; a_1, a_2, \dots, a_m] $ we have that $ y = [a_1; a_2, a_3, \dots, a_m] $ so $ s(x) = (-1)^m $ and $ s(y) = (-1)^{m - 1} $ which implies that $ s(x)s(y) = -1 $ as desired.

This implies that my claim is true and so we are done. Note that this also implies that Grobber's idea about the Stern-Brocot tree works as well.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dgrozev
2463 posts
#10 • 1 Y
Y by Adventure10
Note also that this function $s$ is unique up to multiplication by $-1$. Indeed let $x\in\mathbb{Q}^{+}$ and $x=[a_0;a_1,\ldots,a_m]$. Using $s(x+1)=s(x)$ and $s(x)=-s(1/x)$ it's easily obtained $s(x)=(-1)^m s(1)$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math_pi_rate
1218 posts
#11 • 3 Y
Y by AlastorMoody, amar_04, AmirKhusrau
Fake alg, pure NT :furious:. Anyway, here's my solution: For two integers $0<p<q$, let $f(p,q)$ denote the number of steps taken in the Euclidean Algorithm to find $\gcd(p,q)$. In other words, if we let $b_0=q,$ $b_1=p$ and write the system of equations $$b_r=a_{r+1}b_{r+1}+b_{r+2} \text{ such that } 0<b_{r+1}<b_r \quad \forall r \in \{0,1, \dots ,n\} \text{ and } b_{n+2}=0$$then $f(p,q)=n,$ where $n \geq 0$. Then we claim that the following function works-
The ProGawd Function wrote:
  1. $s(n)=1$ for $n \in \mathbb{N},$ and $s(-m)=-1$ for $m \in \mathbb{N} \cup \{0\}.$
    $\text{ }$
  2. $s \left(\frac{-1}{2} \right)=1.$
    $\text{ }$
  3. $s(1+x)=s(x)$ for $x \neq \frac{-1}{2},0.$
    $\text{ }$
  4. For integers $p,q$ with $0<p<q$, $$s \left (\frac{p}{q} \right)=(-1)^{f(p,q)+1}$$
It's easy to see that this uniquely defines the image of all rationals. Now we show that this indeed satisfies all the given properties.
  • First we prove $s(x)s(-x)=-1$ when $x \neq 0$. For $x \in \mathbb{N}$ and $x=\pm \frac{1}{2}$, this easily follows from the definition, so we can ignore these cases. WLOG assume $x>0$ and suppose $x \in (n-1,n)$ for some $n \in \mathbb{N}$ with $2x \neq 1$. Then from property 3 of our function, we have $s(x)=s(x-(n-1))$ and $s(-x)=s((n-1)-x)$. Since $0<x-(n-1)<1,$ so it suffices to show that $s(x) \cdot s(-x)=-1$ for $x \in (0,1)$.

    Take $x=\frac{p}{q}$ for $0<p<q$, and first suppose $p< \frac{q}{2}$. We have $$s \left( \frac{-p}{q} \right)=s \left(1-\frac{p}{q} \right)=(-1)^{f(q-p,q)+1}$$But, as $q-p>\frac{q}{2}>p$, so the first step of our Euclidean Algorithm while finding $\gcd(q-p,q)$ will be $q=(q-p)+p$. So $f(q-p,q)=1+f(p,q-p)$. Also, using $q>2p$, we get $f(p,q-p)=f(p,q)$. Thus, we have $$s \left( \frac{-p}{q} \right)=(-1)^{f(q-p,q)+1}=(-1)^{1+f(p,q)+1}=-s \left( \frac{p}{q} \right)$$Thus, for $x \in \left(0, \frac{1}{2} \right),$ we have $s(x)s(-x)=-1$. Finally, if $x \in \left(\frac{1}{2},1 \right),$ then $s(x)=s(x-1)$ and $s(-x)=s(1-x)$. Since $0<1-x<\frac{1}{2}$, then the previous result gives $s(1-x)s(-(1-x))=-1$. Combined with the above equalities, we get $s(x)s(-x)=-1$. Thus, the result is true for all $x \in \mathbb{Q}$.
    $\text{ }$
  • Now we show that $s(x)s(1-x)=-1$ for $x \neq \frac{1}{2}$. For $x=1$, the result is true by definition. And for $x \neq 1,\frac{1}{2}$, by the above result, we have $s(1-x)=-s(x-1)=-s((x-1)+1),$ which directly gives the desired property.
    $\text{ }$
  • Finally we show that $s(x)s \left(\frac{1}{x} \right)=-1$ when $x \neq 0,\pm 1$. Since $s(-x)=-s(x)$ (proved before), so it suffices to show the result for positive $x$. Also, WLOG we can take $0<x<1$, and write $x=\frac{p}{q}$ with $p<q$ and $p,q \in \mathbb{N}$. Then $$s \left(\frac{1}{x} \right)=s \left( \frac{q}{p} \right)=s \left( \frac{q}{p} -1\right)= \dots =s \left( \frac{q \pmod{p}}{p} \right)=(-1)^{f(q \pmod{p},p)+1}$$But, while finding $\gcd(q\pmod{p},p)$ we simply start from the second step in the Euclidean Algorithm to find $\gcd(p,q)$. So we have $f(q \pmod{p},p)+1=f(p,q)$. This gives us $$s \left(\frac{1}{x} \right)=(-1)^{f(q \pmod{p},p)+1}=(-1)^{f(p,q)}=-s \left(\frac{p}{q} \right)=-s(x)$$Thus, we have $s(x)s(-x)=-1$ as desired. $\blacksquare$
This post has been edited 1 time. Last edited by math_pi_rate, Mar 29, 2020, 8:57 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
blacksheep2003
1081 posts
#12
Y by
Solution
This post has been edited 1 time. Last edited by blacksheep2003, Oct 13, 2020, 10:29 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
yayups
1614 posts
#13 • 5 Y
Y by Mathematicsislovely, TechnoLenzer, Mango247, Mango247, richrow12
The answer is yes, and we construct such a function. First, note that the only condition on $s(0)$ is that $s(0)=-s(1)$, which we can manually enforce at the end. Thus, we assume that the inputs to $s$ are nonzero rationals.

Write $x=a/b$ where $\gcd(a,b)=1$ and $b>0$. We set \[s(x) = \begin{cases}1 &\text{if } (a^{-1}\mod b)\le b/2 \\ -1 &\text{if } (a^{-1}\mod b)>b/2.\end{cases}\]From this definition, it is clear that $s(x)= - s(-x)$ and $s(x)=-s(1-x)$, so it suffices to show that $s(x)=-s(1/x)$. Since we know $s$ is odd, it suffices in fact to show $s(x)=-s(1/x)$ for $x>0$.

Lemma: If $a,b\ge 1$ are relatively prime positive integers, then \[a\cdot(a^{-1}\mod b) + b\cdot(b^{-1}\mod a) = ab+1.\]
Proof: Indeed, letting $T$ be the left side of the above equation, we see that $T\equiv 1\pmod{a}$ and $T\equiv 1\pmod{b}$, so $T\equiv 1\pmod{ab}$ since $\gcd(a,b)=1$.

Furthermore, we have \[a+b\le T\le a(b-1)+b(a-1)<2ab,\]so we must in fact have $T=ab+1$, as desired. $\blacksquare$

The above lemma implies that $(a^{-1}\mod b)\le b/2$ if and only if $(b^{-1}\mod a)>a/2$, which implies that $s(a/b) = -s(b/a)$.

Remark: The condition is basically the same as ISL 2017 N8, which motivates the classification of $s$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
awesomeming327.
1711 posts
#14
Y by
We define $n(x)$ on the positive rational numbers to be the number of terms in the continued fraction of $x$. Then let $s(x)=-1^{n(x)}$ and $s(-x)=-s(x)$. Then, clearly $s(x)s(-x)=-1$. If $xy=1$ and $x>1$ then $y = 0+\tfrac{1}{x}$ and therefore $n(y)=1+n(x)$, so $s(x)s(y)=-1$.

Suppose $x+y=1$. WLOG, $x > \tfrac{1}{2}$. If $x < 1$ then $x=[0;1,a,\dots]$ and $y=[0;1+a,\dots]$ where the $\dots$ is the same. If $x>1$ then $x=(-y)+1$ so they have the same number of terms in the continued fraction, thus $s(x)=s(-y)=-s(y)$ as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
asdf334
7585 posts
#15 • 1 Y
Y by megarnie
The answer is yes. We construct $s$ directly.
First assume $s(0)=1$. For any $x>0$ we have
\[s(x)=-s(-x)=s(x+1)\]and we also have $s(1)=-1$. Hence for any $n\in \mathbb{N}$ we have $s(n)=-1$.
For each $q\ge 2$ (starting from the smallest), we now choose $s\left(\frac{p}{q}\right)$ for $p$ starting from $1$ and relatively prime to $q$ according to the following rules:
  • If $p<q$ then $s\left(\frac{p}{q}\right)=-s\left(\frac{q}{p}\right)$.
  • If $p>q$ then $s\left(\frac{p}{q}\right)=s\left(\frac{p-q}{q}\right)$.
Evidently all outputs for nonnegative inputs have been chosen with no problems.
Now we prove that for distinct positive rationals $x$ and $y$ the conditions hold. Importantly our selection of outputs satisfies $s(x)=s(x+1)$ as well. (The only restriction on $s(0)$ is $s(0)=-s(1)$ which clearly holds.)
  • If $xy=1$ then WLOG $x=\frac{p}{q}$ with $p<q$. From the first rule in the previous section we are fine.
  • Notice that $x+y=0$ cannot hold. If $x+y=1$ then write $x=\frac{a}{a+b}$ and $y=\frac{b}{a+b}$. Then
    \[s(x)=-s(1/x)=-s(1/x-1)=-s(b/a)\]\[s(y)=-s(1/y)=-s(1/y-1)=-s(a/b)\]thus $s(x)s(y)=-1$.

Now we write $s(-x)=-s(x)$ for positive $x$.
  • If $x$ and $y$ are distinct, negative and satisfy $xy=1$ we are okay: $s(-x)s(-y)=-1\implies s(x)s(y)=-1$.
  • If $x$ and $y$ are distinct and satisfy $x+y=0$ we are okay by definition.
  • If $x+y=1$ and WLOG $x$ is negative while $y$ is positive, then
    \[s(y)=s(y-1)=-s(1-y)=-s(x)\]and we are okay.

All cases are exhausted and the construction works. $\blacksquare$
This post has been edited 1 time. Last edited by asdf334, Jun 2, 2024, 5:01 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1535 posts
#16 • 1 Y
Y by NicoN9
This problem gets no big booms.


we claim the answer is yes. We first define a function $f: \mathbb{Q}^+ \times \mathbb{Q}^+ \to \{+1, -1\}$ for coprime nonzero inputs as follows: let $f(1, 1) = +1, f(1, a) = -1, f(a, 1) = +1$ for all $a \ne 1$. Then we define recursively
\[
	f(a+b,b) = f(a,a+b) = f(a,b).
\]This is well defined as $f$ is defined on input by Euclidean algorithm, and $f(a,b)$ is defined uniquely by whichever of $a, b$ is smaller.

Now note that $f(a, b) = -f(b, a)$ follows since $f(1, a) = -f(a, 1)$ recursively with the Euclidean algorithm. Furthermore, for $a < b$, $f(b-a, b) = f(b-a, a) = f(b,a) = -f(b,a) = -f(a,b)$ $(\heartsuit)$.

We now extend $f$ to negative coprime inputs by defining $f(-a, b) = f(a, -b) = -f(a, b)$. By $(\heartsuit)$ and by the definition, it follows that for $b \ne 1$
\[
	f(a, b) = f(a+b, b), f(b, a) = f(b, a+b)
\]holds for all $a$. We finally define $s\left(\frac{a}{b}\right) = f(a, b)$ for coprime $a, b$. Then $f(a,b) = -f(b,a)$ holds over the extension for the same reasons, $f(a,b) = -f(-a,b)$ holds by definition, and $f(a,b) = -f(b-a,b)$ holds since
\[
	f(b-a,b) = f(-a,b) = -f(a,b)
\]so we are done.
Z K Y
N Quick Reply
G
H
=
a