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
Incircle in an isoscoles triangle
Sadigly   0
9 minutes ago
Source: own
Let $ABC$ be an isosceles triangle with $AB=AC$, and let $I$ be its incenter. Incircle touches sides $BC,CA,AB$ at $D,E,F$, respectively. Foot of altitudes from $E,F$ to $BC$ are $X,Y$ , respectively. Rays $XI,YI$ intersect $(ABC)$ at $P,Q$, respectively. Prove that $(PQD)$ touches incircle at $D$.
0 replies
Sadigly
9 minutes ago
0 replies
A sharp one with 3 var
mihaig   3
N 42 minutes ago by mihaig
Source: Own
Let $a,b,c\geq0$ satisfying
$$\left(a+b+c-2\right)^2+8\leq3\left(ab+bc+ca\right).$$Prove
$$ab+bc+ca+abc\geq4.$$
3 replies
mihaig
May 13, 2025
mihaig
42 minutes ago
Acute triangle, equality of areas
mruczek   5
N 44 minutes ago by LeYohan
Source: XIII Polish Junior MO 2018 Second Round - Problem 2
Let $ABC$ be an acute traingle with $AC \neq BC$. Point $K$ is a foot of altitude through vertex $C$. Point $O$ is a circumcenter of $ABC$. Prove that areas of quadrilaterals $AKOC$ and $BKOC$ are equal.
5 replies
mruczek
Apr 24, 2018
LeYohan
44 minutes ago
Gives typical russian combinatorics vibes
Sadigly   3
N an hour ago by AL1296
Source: Azerbaijan Senior MO 2025 P3
You are given a positive integer $n$. $n^2$ amount of people stand on coordinates $(x;y)$ where $x,y\in\{0;1;2;...;n-1\}$. Every person got a water cup and two people are considered to be neighbour if the distance between them is $1$. At the first minute, the person standing on coordinates $(0;0)$ got $1$ litres of water, and the other $n^2-1$ people's water cup is empty. Every minute, two neighbouring people are chosen that does not have the same amount of water in their water cups, and they equalize the amount of water in their water cups.

Prove that, no matter what, the person standing on the coordinates $(x;y)$ will not have more than $\frac1{x+y+1}$ litres of water.
3 replies
Sadigly
May 8, 2025
AL1296
an hour ago
No more topics!
Continued fraction
tapir1729   11
N Yesterday at 1:52 AM by Mathandski
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
11 replies
tapir1729
Jun 24, 2024
Mathandski
Yesterday at 1:52 AM
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
1354 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 • 7 Y
Y by OronSH, avisioner, dolphinday, ihatemath123, awesomeguy856, Rounak_iitr, Mathandski
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
1754 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
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathandski
760 posts
#12
Y by
You can get $P(x)$ has coefficients divisible by $p$ with a combo argument by looking at subsets of ${1, \dots, p-1}$ where there are no consecutive numbers and summing the products of such subsets.

How many partials if you prove $P(x)$ has all coefficients multiples of $p$ but unable to prove the $Q(x)$ thing?
Edit: According to puffypundo + liam 2 points ;-;
This post has been edited 1 time. Last edited by Mathandski, Yesterday at 2:07 AM
Z K Y
N Quick Reply
G
H
=
a