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
Quadratic system
juckter   35
N 14 minutes ago by shendrew7
Source: Mexico National Olympiad 2011 Problem 3
Let $n$ be a positive integer. Find all real solutions $(a_1, a_2, \dots, a_n)$ to the system:

\[a_1^2 + a_1 - 1 = a_2\]\[ a_2^2 + a_2 - 1 = a_3\]\[\hspace*{3.3em} \vdots \]\[a_{n}^2 + a_n - 1 = a_1\]
35 replies
juckter
Jun 22, 2014
shendrew7
14 minutes ago
IMO Shortlist 2012, Geometry 3
lyukhson   75
N an hour ago by numbertheory97
Source: IMO Shortlist 2012, Geometry 3
In an acute triangle $ABC$ the points $D,E$ and $F$ are the feet of the altitudes through $A,B$ and $C$ respectively. The incenters of the triangles $AEF$ and $BDF$ are $I_1$ and $I_2$ respectively; the circumcenters of the triangles $ACI_1$ and $BCI_2$ are $O_1$ and $O_2$ respectively. Prove that $I_1I_2$ and $O_1O_2$ are parallel.
75 replies
lyukhson
Jul 29, 2013
numbertheory97
an hour ago
Diophantine
TheUltimate123   31
N an hour ago by SomeonecoolLovesMaths
Source: CJMO 2023/1 (https://aops.com/community/c594864h3031323p27271877)
Find all triples of positive integers \((a,b,p)\) with \(p\) prime and \[a^p+b^p=p!.\]
Proposed by IndoMathXdZ
31 replies
TheUltimate123
Mar 29, 2023
SomeonecoolLovesMaths
an hour ago
Cyclic ine
m4thbl3nd3r   1
N 2 hours ago by arqady
Let $a,b,c>0$ such that $a^2+b^2+c^2=3$. Prove that $$\sum \frac{a^2}{b}+abc \ge 4$$
1 reply
m4thbl3nd3r
5 hours ago
arqady
2 hours ago
Non-homogenous Inequality
Adywastaken   7
N 2 hours ago by ehuseyinyigit
Source: NMTC 2024/7
$a, b, c\in \mathbb{R_{+}}$ such that $ab+bc+ca=3abc$. Show that $a^2b+b^2c+c^2a \ge 2(a+b+c)-3$. When will equality hold?
7 replies
Adywastaken
5 hours ago
ehuseyinyigit
2 hours ago
FE with devisibility
fadhool   2
N 2 hours ago by ATM_
if when i solve an fe that is defined in the set of positive integer i found m|f(m) can i set f(m) =km such that k is not constant and of course it depends on m but after some work i find k=c st c is constant is this correct
2 replies
fadhool
4 hours ago
ATM_
2 hours ago
Japan MO Finals 2023
parkjungmin   2
N 2 hours ago by parkjungmin
It's hard. Help me
2 replies
1 viewing
parkjungmin
Yesterday at 2:35 PM
parkjungmin
2 hours ago
Iranian geometry configuration
Assassino9931   2
N 2 hours ago by Captainscrubz
Source: Al-Khwarizmi Junior International Olympiad 2025 P7
Let $ABCD$ be a cyclic quadrilateral with circumcenter $O$, such that $CD$ is not a diameter of its circumcircle. The lines $AD$ and $BC$ intersect at point $P$, so that $A$ lies between $D$ and $P$, and $B$ lies between $C$ and $P$. Suppose triangle $PCD$ is acute and let $H$ be its orthocenter. The points $E$ and $F$ on the lines $BC$ and $AD$, respectively, are such that $BD \parallel HE$ and $AC\parallel HF$. The line through $E$, perpendicular to $BC$, intersects $AD$ at $L$, and the line through $F$, perpendicular to $AD$, intersects $BC$ at $K$. Prove that the points $K$, $L$, $O$ are collinear.

Amir Parsa Hosseini Nayeri, Iran
2 replies
Assassino9931
Today at 9:39 AM
Captainscrubz
2 hours ago
f(m + n) >= f(m) + f(f(n)) - 1
orl   30
N 3 hours ago by ezpotd
Source: IMO Shortlist 2007, A2, AIMO 2008, TST 2, P1, Ukrainian TST 2008 Problem 8
Consider those functions $ f: \mathbb{N} \mapsto \mathbb{N}$ which satisfy the condition
\[ f(m + n) \geq f(m) + f(f(n)) - 1
\]
for all $ m,n \in \mathbb{N}.$ Find all possible values of $ f(2007).$

Author: Nikolai Nikolov, Bulgaria
30 replies
orl
Jul 13, 2008
ezpotd
3 hours ago
Classic Diophantine
Adywastaken   3
N 3 hours ago by Adywastaken
Source: NMTC 2024/6
Find all natural number solutions to $3^x-5^y=z^2$.
3 replies
Adywastaken
5 hours ago
Adywastaken
3 hours ago
Add d or Divide by a
MarkBcc168   25
N 3 hours ago by Entei
Source: ISL 2022 N3
Let $a > 1$ be a positive integer and $d > 1$ be a positive integer coprime to $a$. Let $x_1=1$, and for $k\geq 1$, define
$$x_{k+1} = \begin{cases}
x_k + d &\text{if } a \text{ does not divide } x_k \\
x_k/a & \text{if } a \text{ divides } x_k
\end{cases}$$Find, in terms of $a$ and $d$, the greatest positive integer $n$ for which there exists an index $k$ such that $x_k$ is divisible by $a^n$.
25 replies
MarkBcc168
Jul 9, 2023
Entei
3 hours ago
Alice and Bob play, 8x8 table, white red black, minimum n for victory
parmenides51   14
N 3 hours ago by Ilikeminecraft
Source: JBMO Shortlist 2018 C3
The cells of a $8 \times 8$ table are initially white. Alice and Bob play a game. First Alice paints $n$ of the fields in red. Then Bob chooses $4$ rows and $4$ columns from the table and paints all fields in them in black. Alice wins if there is at least one red field left. Find the least value of $n$ such that Alice can win the game no matter how Bob plays.
14 replies
parmenides51
Jul 22, 2019
Ilikeminecraft
3 hours ago
GEOMETRY GEOMETRY GEOMETRY
Kagebaka   71
N 4 hours ago by bin_sherlo
Source: IMO 2021/3
Let $D$ be an interior point of the acute triangle $ABC$ with $AB > AC$ so that $\angle DAB = \angle CAD.$ The point $E$ on the segment $AC$ satisfies $\angle ADE =\angle BCD,$ the point $F$ on the segment $AB$ satisfies $\angle FDA =\angle DBC,$ and the point $X$ on the line $AC$ satisfies $CX = BX.$ Let $O_1$ and $O_2$ be the circumcenters of the triangles $ADC$ and $EXD,$ respectively. Prove that the lines $BC, EF,$ and $O_1O_2$ are concurrent.
71 replies
Kagebaka
Jul 20, 2021
bin_sherlo
4 hours ago
Equation of integers
jgnr   3
N 4 hours ago by KTYC
Source: Indonesia Mathematics Olympiad 2005 Day 1 Problem 2
For an arbitrary positive integer $ n$, define $ p(n)$ as the product of the digits of $ n$ (in decimal). Find all positive integers $ n$ such that $ 11p(n)=n^2-2005$.
3 replies
jgnr
Jun 2, 2008
KTYC
4 hours ago
Continued fraction
tapir1729   10
N Apr 27, 2025 by EpicBird08
Source: TSTST 2024, problem 2
Let $p$ be an odd prime number. Suppose $P$ and $Q$ are polynomials with integer coefficients such that $P(0)=Q(0)=1$, there is no nonconstant polynomial dividing both $P$ and $Q$, and
\[
  1 + \cfrac{x}{1 + \cfrac{2x}{1 + \cfrac{\ddots}{1 +
  (p-1)x}}}=\frac{P(x)}{Q(x)}.
\]Show that all coefficients of $P$ except for the constant coefficient are divisible by $p$, and all coefficients of $Q$ are not divisible by $p$.

Andrew Gu
10 replies
tapir1729
Jun 24, 2024
EpicBird08
Apr 27, 2025
Continued fraction
G H J
Source: TSTST 2024, problem 2
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
tapir1729
71 posts
#1 • 1 Y
Y by Rounak_iitr
Let $p$ be an odd prime number. Suppose $P$ and $Q$ are polynomials with integer coefficients such that $P(0)=Q(0)=1$, there is no nonconstant polynomial dividing both $P$ and $Q$, and
\[
  1 + \cfrac{x}{1 + \cfrac{2x}{1 + \cfrac{\ddots}{1 +
  (p-1)x}}}=\frac{P(x)}{Q(x)}.
\]Show that all coefficients of $P$ except for the constant coefficient are divisible by $p$, and all coefficients of $Q$ are not divisible by $p$.

Andrew Gu
This post has been edited 2 times. Last edited by tapir1729, Jan 6, 2025, 2:37 AM
Reason: fixed italics
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1541 posts
#2 • 1 Y
Y by sami1618
Very cool problem.


We instead consider the expression \[ 1 + \frac{(1-p)x}{1 + \frac{(2-p)x}{1 + \frac{\ddots}{1 - x}}} = \frac{P_{p-1}(x)}{Q_{p-1}(x)} \]We then have the relation \[ \frac{P_k(x)}{Q_k(x)} = 1 + \frac{-kx}{\frac{P_{k-1}(x)}{Q_{k-1(x)}}} = \frac{P_{k-1}(x) -kx Q_{k-1}(x)}{P_{k-1}(x)} \]We inductively then have that $\gcd(P_i, Q_i) = 1$. Define $P_1' = 1-x, P_0' = 1$, so this rewrites as $P_k'(x) = P_{k-1}' - kx P_{k-2}'(x)$.
Now, replace $x$ with $-x$ and shift to instead get $P_0 = 1, P_1 = 1, P_k = P_{k-1} + (k-1)x P_{k-2}$, and we want to show that instead $P_{p} \equiv 1 \pmod{p}$ and $P_{p-1}$ has all nonzero coefficients.
Here's a table of the first few entries of $p$.
\begin{tabular}{c|ccccccccc} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1  \\ $x$ & 0 & 0 & 1 & 3 & 6 & 10 & 15 & 21 & 28  \\ $x^2$ & 0 & 0 & 0 & 0 & 3 & 15 & 45 & 105 & 210  \\ $x^3$ & 0 & 0 & 0 & 0 & 0 & 0 & 15 & 105 & 420  \\ $x^4$ & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 105 \end{tabular}
Claim: We have that $[x^k]P_x = A_k(x)$ where \[ A_k(x) = \frac{x(x-1) \cdots (x-(2k-2))(x-(2k-1))}{2^k k!} \]Proof. We have that $[x^t] P_k = [x^t] P_{k-1} + [x^{t-1}] (k-1) P_{k-2}$. This rewrites as showing that \[ A_t(k) - A_t(k-1) = (k-1) A_{t-1}(k-2) \]Expand this and factor out \[ \frac{1}{2^{t-1} (t-1)!} (k-2) \cdots (k-(2t+1)) \]to simplify this as $\frac{1}{2t} \left((k(k-1) - (k-1)(k - 2t))\right) = k-1$ which finishes. $\blacksquare$

This then finishes by plugging in $t = p, t = p-1$.

Remark: Trying to represent each row as a polynomial follows from noticing the fact that the first three rows are in fact $1$, $\binom{n}{2}$, and $\binom{\binom{n}{2}}{2}$ or noticing that $P_k \equiv P_{p} \pmod{p}$.
Getting this specific form for the polynomial comes from fundamental theorem of algebra.
As a matter of fact, this is enough to prove that $P_{p-1} \equiv 1 \pmod{p}$.

EDIT: CANBANKAN points out some valid concerns about the correspondence between the new polynomials and old ones. Coprimality and being the same degree both follow by expansion so it's nothing too major but it's still an issue.
This post has been edited 1 time. Last edited by YaoAOPS, Jun 27, 2024, 7:03 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Assassino9931
1336 posts
#3
Y by
Representing this as a continued fraction and using the well known convergents relations (e.g. Wikipedia, section Infinite continued fractions and convergents) should work.

EDIT: The computations are actually very inconvenient, my bad.
This post has been edited 1 time. Last edited by Assassino9931, Jun 25, 2024, 9:14 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
a1267ab
223 posts
#4
Y by
Assassino9931 wrote:
Representing this as a continued fraction and using the well known convergents relations (e.g. Wikipedia, section Infinite continued fractions and convergents) should work.

Are you sure about that?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
brainfertilzer
1831 posts
#5 • 2 Y
Y by sami1618, KevinYang2.71
Let
\[1 + \cfrac{kx}{1 + \cfrac{(k+1)x}{1 + \cfrac{\ddots}{1 +
  (p-1)x}}} = \frac{P_k(x)}{Q_k(x)}\]for coprime $P_k,Q_k$, each with constant term $1$. Note that
\[1 + kx\frac{Q_{k+1}(x)}{P_{k+1}(x)} = \frac{P_k(x)}{Q_k(x)}\implies Q_k(P_{k+1} + kxQ_{k+1}) = P_{k+1}P_k.\]This means $Q_k\mid P_{k+1}P_k$, and since $P_k$ is coprime with $Q_k$, we have $Q_k\mid P_{k+1}$. Also, note that $P_{k+1}$ and $P_{k+1} + kxQ_{k+1}$ are coprime, so $P_{k+1}\mid Q_k$. Since $Q_k, P_{k+1}$ both have constant term $1$, we get $P_{k+1} = Q_k$. It follows that
\[Q_k + kxQ_{k+1} = Q_{k-1}.\]Work in $\mathbb{F}_p[x]$ for the rest of the problem. We have $Q_{p-1} = 1$ and $Q_{p-2} = 1 + (p-1)x = 1-x$.

Claim: We have \[Q_{p-m} = \sum_{n\ge 0}\frac{(-1)^nm!}{2^nn!(m-2n)!}x^n.\]proof: Induct. It's just a big bash so I won't write it $\square$

Now take $m = p-1$ to get
\[Q_1 = \sum_{n\ge 0}\frac{(-1)^{n}(p-1)!}{2^{n}n!(p-1 - 2n)!}x^n,\]and all of the coefficients of that are clearly nonzero. Next note that
\[P_1 = Q_0 = \sum_{n\ge 0}\frac{(-1)^np!}{2^nn!(p-2n)!}x^n,\]all of whose terms vanish aside from $1x^0$. This is all we needed to prove.
This post has been edited 1 time. Last edited by brainfertilzer, Jun 26, 2024, 1:21 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5001 posts
#6 • 1 Y
Y by crazyeyemoody907
"a five year old with a CAS could do it"


We instead consider the expression
$$1-\cfrac{kx}{1-\cfrac{(k-1)x}{1+\cfrac{\ddots}{1-x}}}:=\frac{P_k(x)}{Q_k(x)},$$and wish to show that for any odd prime $p$, $P_{p-1}(x)$ has all coefficients except the constant divisible by $p$, and $Q_{p-1}(x)$ has all coefficients not divisible by $p$. Clearly we have $A_1(x)=1-x$ and $B_1(x)=1$ as well as $A_k(x)=A_{k-1}(x)-kxB_k(x)$ and $B_k(x)=A_{k-1}(x)$. Defining $A_0=B_1$ we thus have $A_k(x)=A_{k-1}(x)-kxA_{k-2}(x)$ for all $x$. To extract coefficients we note that $[x^t]A_k=[x^t]A_{k-1}-k[x^{t-1}]A_{k-2}$. Now I claim that
$$[x^t]A_k=\frac{(-1)^n(k+1)_{2t}}{(2t)!!},$$which follows by induction since
$$(k+1)_{2t}-(k)_{2t}=((k+1)-(k-2t+1))(k)_{2t-1}=k(2t((k-2)+1)_{2t-2}).$$Note that for $k \leq 2t-1 \iff t\geq \tfrac{k+1}{2}$ we have $[x^t]A_k=0$. Now just plug in $k=p-1$ and $k=p-2$ and note that for any $t<\tfrac{k+1}{2}$ the denominator doesn't vanish modulo $p$, but if $k=p-1$ the numerator does and if $k=p-2$ the numerator doesn't. $\blacksquare$


edit: should be noted that we want the rewrite of the expression and the redefinition of the polynomials to not change their degree - this is obviously true

edit edit: it has been pointed out that you also need to show relatively prime. it’s obvious that simplifying the fraction will achieve this (in both scenarios) because everything you get has constant coeff 1
This post has been edited 2 times. Last edited by IAmTheHazard, Jun 26, 2024, 6:35 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dkedu
180 posts
#7
Y by
We work in $\mathbb F_p[x]$ instead and consider
$$1-\cfrac{nx}{1-\cfrac{(n-1)x}{1-\cfrac{\ddots}{1-x}}}=\frac{P_n(x)}{Q_n(x)}$$We get the two recursive relations $$Q_n(x) = P_{n-1}(x), P_n(x) = P_{n-1}(x) - nxQ_{n-1}(x) = P_{n-1}(x) - nxP_{n-2}(x)$$with $P_1(x) = 1- x, Q_1(x) = 1$. Note that $P_i(x), Q_i(x)$ are always relatively prime by Euclidean algorithm. Now we let
$$P_n(x) = \sum_{m=0}^\infty a_{m,n}x^m$$Note that we get $a_{m,n} = a_{m,n-1} - na_{m-1,n-2}$. Now I claim $$a_{m,n} = (-1)^n(2m-1)!!\binom{n+1}{2m}.$$We can verify this works since
$$a_{m,n} =  -\sum_{i = 0}^{n-2} na_{m-1, i} = (-1)^m \sum_{i = 0}^{n-2} (i+2)\cdot (2m-3)!! \binom{i+1}{2m-2} =(-1)^m \sum_{i = 0}^{n-2}(2m-3)!! \cdot (2m-1) \binom{i+2}{2m-1} = (-1)^m (2m-1)!!\sum_{i = 0}^{n-2} \binom{i+2}{2m-1} = (-1)^m(2m-1)!!\binom{n+1}{2m}.$$Now we conclude that $a_{m,p-1} \equiv 0 \pmod{p}$ for $m \ge 1$ and $a_{m,p-2} \not\equiv 0 \pmod{p}$. Since $p\mid \binom pk$ and $p \nmid \binom{p-1}k$ which is equivalent to the result.
This post has been edited 2 times. Last edited by dkedu, Jun 27, 2024, 8:50 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
CANBANKAN
1301 posts
#8
Y by
YaoAOPS wrote:
Very cool problem.


We instead consider the expression \[ 1 + \frac{(1-p)x}{1 + \frac{(2-p)x}{1 + \frac{\ddots}{1 - x}}} = \frac{P_{p-1}(x)}{Q_{p-1}(x)} \]We then have the relation \[ \frac{P_k(x)}{Q_k(x)} = 1 + \frac{-kx}{\frac{P_{k-1}(x)}{Q_{k-1(x)}}} = \frac{P_{k-1}(x) -kx Q_{k-1}(x)}{P_{k-1}(x)} \]We inductively then have that $\gcd(P_i, Q_i) = 1$. Define $P_1' = 1-x, P_0' = 1$, so this rewrites as $P_k'(x) = P_{k-1}' - kx P_{k-2}'(x)$.
Now, replace $x$ with $-x$ and shift to instead get $P_0 = 1, P_1 = 1, P_k = P_{k-1} + (k-1)x P_{k-2}$, and we want to show that instead $P_{p} \equiv 1 \pmod{p}$ and $P_{p-1}$ has all nonzero coefficients.
Here's a table of the first few entries of $p$.
\begin{tabular}{c|ccccccccc} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1  \\ $x$ & 0 & 0 & 1 & 3 & 6 & 10 & 15 & 21 & 28  \\ $x^2$ & 0 & 0 & 0 & 0 & 3 & 15 & 45 & 105 & 210  \\ $x^3$ & 0 & 0 & 0 & 0 & 0 & 0 & 15 & 105 & 420  \\ $x^4$ & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 105 \end{tabular}
Claim: We have that $[x^k]P_x = A_k(x)$ where \[ A_k(x) = \frac{x(x-1) \cdots (x-(2k-2))(x-(2k-1))}{2^k k!} \]Proof. We have that $[x^t] P_k = [x^t] P_{k-1} + [x^{t-1}] (k-1) P_{k-2}$. This rewrites as showing that \[ A_t(k) - A_t(k-1) = (k-1) A_{t-1}(k-2) \]Expand this and factor out \[ \frac{1}{2^{t-1} (t-1)!} (k-2) \cdots (k-(2t+1)) \]to simplify this as $\frac{1}{2t} \left((k(k-1) - (k-1)(k - 2t))\right) = k-1$ which finishes. $\blacksquare$

This then finishes by plugging in $t = p, t = p-1$.

Remark: Trying to represent each row as a polynomial follows from noticing the fact that the first three rows are in fact $1$, $\binom{n}{2}$, and $\binom{\binom{n}{2}}{2}$ or noticing that $P_k \equiv P_{p} \pmod{p}$.
Getting this specific form for the polynomial comes from fundamental theorem of algebra.
As a matter of fact, this is enough to prove that $P_{p-1} \equiv 1 \pmod{p}$.

This is also the initial solution I found while testsolving. I however don't see a way to see how to show the original $P,Q$ are coprime using this method, since the image of $P$ in $\mathbb{F}_p[x]$ is just 1. This is very minor.
This post has been edited 1 time. Last edited by CANBANKAN, Jun 27, 2024, 6:34 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Gogobao
1039 posts
#9 • 1 Y
Y by OronSH
The coefficient of $x^k$ in $P$ is $(2k-1)!!\binom{p}{2k}$ and in $Q$ is $\sum_{n=0}^k (-1)^n(2k-2n-1)!!(2n-1)!!\binom{p}{2(k-n)}$
Here we adapt the assumption $(-1)!! = 1$.
This post has been edited 1 time. Last edited by Gogobao, Jun 28, 2024, 3:44 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
peace09
5419 posts
#10 • 6 Y
Y by OronSH, avisioner, dolphinday, ihatemath123, awesomeguy856, Rounak_iitr
Misleadingly, $P\equiv1$ is doable without a closed form: denote
\[\frac{P_n(x)}{P_{n-1}(x)}=1+\frac{(p-n)x}{1+\frac{(p-n+1)x}{1+\frac{\ddots}{1+(p-1)x}}}=1+\frac{(p-n)x}{\frac{P_{n-1}(x)}{P_{n-2}(x)}}=\frac{P_{n-1}(x)+(p-n)xP_{n-2}(x)}{P_{n-1}(x)}.\]Coprimality is easy inductively, as $(P_n,P_{n-1})=(P_{n-1}+(p-n)xP_{n-2},P_{n-1})=(P_{n-1},(p-n)xP_{n-2})=1$ by Euclid.

The key claim is that $[x^k]P_n=S_k[p-n,p-1]'$, the $k^\text{th}$ symmetric sum of integers in $[p-n,p-1]$ no two of which are consecutive (hence the ${}'$). Indeed, inductively,
\begin{align*}
[x^k]P_n&=[x^k]P_{n-1}+(p-n)[x^k]xP_{n-2}\\
&=S_k[p-n+1,p-1]'+(p-n)S_{k-1}[p-n+2,p-1]',
\end{align*}which span $k$-factor products in $[p-n,p-1]'$ without and with the factor $(p-n)$, respectively, giving $S_k[p-n,p-1]'$.

Since $P=P_{p-1}$ in the problem statement, we want to show $[x_k]P_{p-1}=S_k[1,p-1]'\equiv0~(p)$. The trick is to rewrite $S_k[1,p-1]'$ as $S_k[0,p-1]'$ to "complete" $\mathbb{Z}_p$ and somehow use symmetry. Take inspiration from the necklace proof of Fermat's little theorem: by primality, we may partition $S_k[0,p-1]'$ into "cyclic size-$p$ rings" of the form
\[\sum_{x=0}^{p-1}\prod_{i=1}^k(a_i+x):=\prod_{i=1}^ka_i+\prod_{i=1}^k(a_i+1)+\dots+\prod_{i=1}^k(a_i+(p-1)),\]where each $k$-factor product in $S_k[0,p-1]'$ belongs to exactly one such ring.

We claim that each such ring vanishes $(\text{mod }p)$, which finishes. Expanding each product and grouping by degree in $x$, we have
\[\sum_{d=0}^kS_{k-d}[a_i]\sum_{x=0}^{p-1}x^d:=S_0[a_i]\sum_{x=0}^{p-1}x^k+S_1[a_i]\sum_{x=0}^{p-1}x^{k-1}+\dots+S_k[a_i]\sum_{x=0}^{p-1}x^0,\]where for any given $d$, $\textstyle\sum x^d=\sum g^{di}\equiv\sum g^i=\sum x\equiv0$ for $g$ a primitive root. $\square$
Unfortunately, for $Q=P_{p-2}$, showing $[x_k]P_{p-2}=S_k[2,p-1]\not\equiv0$ seems much more difficult, since the aforementioned "completeness" is lost. Indeed, it suffices to show that its complement in the complete $S_k[1,p-1]\equiv0$ is nonzero; but said complement is simply $S_{k-1}[3,p-1]$, and everything spirals out of control from there. It was here that I finally realized I would need to say something about general $[x_k]P_n$"here" as in "with 15 minutes left", after finding and writing up the non-closed-form solution to part (a) for 2+ hours with the expectation that part (b) would be identical :blush:. Then I found and wrote up the closed-form solution in the last 15 minutes :blush:.

Personally, I was rather bummed when I discovered the closed form, since the problem essentially becomes a mid-AIME binomial recursion with polynomial flavortext and a Legendre-like extraction. (The first thing that came to mind was 1993 #5, though there's bound to be a better example.) Indeed, I suspect that if the problem were computationalized with said extraction and presented to the students as an AIME problem with a 15-minute timer (as I had), everyone would have solved it :blush:.
This post has been edited 1 time. Last edited by peace09, Jul 13, 2024, 5:34 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
EpicBird08
1752 posts
#11
Y by
Very nice and instructive problem to solve, horrible problem to type up.

The idea is to work modulo $p$ and build the fraction from the bottom up. In particular, let us define the function $R_k(x)$ recursively by $R_1(x) = 1+(p-1)x$ and $R_k(x) = 1 + \frac{(p-k)x}{R_{k-1}(x)}.$ We claim that $$R_n(x) \equiv \frac{P_n(x)}{P_{n-1}(x)} \pmod{p},$$where $$P_n(x) = \sum_{i=0}^{\infty} (-1)^i (2i-1)!! \cdot \binom{n+1}{2i} x^i$$with $(2n+1)!! = (2n+1) \cdot (2n-1) \cdots 3 \cdot 1$ letting $(-1)!! = 1$. We will prove this claim by induction on $n,$ with the base case $n=1$ following from $R_1(x) \equiv 1 - x \pmod{p}.$ For the inductive step, we have
\begin{align*}
R_n(x) &= 1 + \frac{(p-n)x}{R_{n-1}(x)} \\
&\equiv 1 - \frac{nx}{R_{n-1}(x)} \pmod{p} \\
&= 1 - \frac{nx P_{n-2} (x)}{P_{n-1} (x)} \\
&= \frac{P_{n-1} (x) - nx P_{n-2} (x)}{P_{n-1} (x)} \\
&= \frac{\sum_{i=0}^{\infty} (-1)^i (2i-1)!! \cdot \binom{n}{2i} x^i - n \sum_{i=1}^{\infty} (-1)^{i-1} (2i-3)!! \cdot \binom{n-1}{2i-2} x^i}{P_{n-1} (x)} \\
&= \frac{1 + \sum_{i=1}^{\infty} \left((-1)^i (2i-1)!! \cdot \binom{n}{2i} - n(-1)^{i-1} (2i-3)!! \cdot \binom{n-1}{2i-2}\right) x^i}{P_{n-1}(x)} \\
&= \frac{1 + \sum_{i=1}^{\infty} (-1)^i (2i-3)!! \left((2i-1) \binom{n}{2i} + n \binom{n-1}{2i-2}\right) x^i}{P_{n-1}(x)} \\
&= \frac{1 + \sum_{i=1}^{\infty} (-1)^i (2i-1)!! \cdot \binom{n+1}{2i} x^i}{P_{n-1}(x)} \\
&= \frac{P_n (x)}{P_{n-1} (x)},
\end{align*}where we used the identity $\binom{n}{2i} + \frac{n}{2i-1} \binom{n-1}{2i-2} = \binom{n+1}{2i}$ (which can be proven by Pascal's Identity). This completes the induction.

In particular, the desired expression is just $R_{p-1} (x),$ which after taking coefficients modulo $p$ is just $\frac{P_{p-1} (x)}{P_{p-2} (x)}.$ It is easy to see by the recursion that this cannot be further simplified. Now, in the numerator, the binomial coefficients $\binom{p}{2i}$ are always divisible by $p$ except when $i=0,$ making all the coefficients except for the constant coefficient divisible by $p.$ Similarly, in the denominator, the binomial coefficients $\binom{p-1}{2i}$ are always not divisible by $p$ unless $i > \frac{p-1}{2},$ and similarly $(2i-1)!!$ is not divisible by $p$ either unless $i > \frac{p-1}{2}.$ In any case, the coefficients of $x^i$ in $P_{p-2} (x)$ for $0 \le i \le \frac{p-1}{2}$ are not divisible by $p.$ However, by a much easier induction, we have that the degree of $Q(x)$ is exactly $\frac{p-1}{2}$. Thus $P(x)$ has all its coefficients divisible by $p$ except for the constant coefficient, and $Q(x)$ has all its coefficients not divisible by $p,$ as desired.
This post has been edited 6 times. Last edited by EpicBird08, Apr 27, 2025, 5:53 PM
Z K Y
N Quick Reply
G
H
=
a