We have your learning goals covered with Spring and Summer courses available. Enroll today!

G
Topic
First Poster
Last Poster
k a March Highlights and 2025 AoPS Online Class Information
jlacosta   0
Mar 2, 2025
March is the month for State MATHCOUNTS competitions! Kudos to everyone who participated in their local chapter competitions and best of luck to all going to State! Join us on March 11th for a Math Jam devoted to our favorite Chapter competition problems! Are you interested in training for MATHCOUNTS? Be sure to check out our AMC 8/MATHCOUNTS Basics and Advanced courses.

Are you ready to level up with Olympiad training? Registration is open with early bird pricing available for our WOOT programs: MathWOOT (Levels 1 and 2), CodeWOOT, PhysicsWOOT, and ChemWOOT. What is WOOT? WOOT stands for Worldwide Online Olympiad Training and is a 7-month high school math Olympiad preparation and testing program that brings together many of the best students from around the world to learn Olympiad problem solving skills. Classes begin in September!

Do you have plans this summer? There are so many options to fit your schedule and goals whether attending a summer camp or taking online classes, it can be a great break from the routine of the school year. Check out our summer courses at AoPS Online, or if you want a math or language arts class that doesn’t have homework, but is an enriching summer experience, our AoPS Virtual Campus summer camps may be just the ticket! We are expanding our locations for our AoPS Academies across the country with 15 locations so far and new campuses opening in Saratoga CA, Johns Creek GA, and the Upper West Side NY. Check out this page for summer camp information.

Be sure to mark your calendars for the following events:
[list][*]March 5th (Wednesday), 4:30pm PT/7:30pm ET, HCSSiM Math Jam 2025. Amber Verser, Assistant Director of the Hampshire College Summer Studies in Mathematics, will host an information session about HCSSiM, a summer program for high school students.
[*]March 6th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar on Math Competitions from elementary through high school. Join us for an enlightening session that demystifies the world of math competitions and helps you make informed decisions about your contest journey.
[*]March 11th (Tuesday), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS Chapter Discussion MATH JAM. AoPS instructors will discuss some of their favorite problems from the MATHCOUNTS Chapter Competition. All are welcome!
[*]March 13th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar about Summer Camps at the Virtual Campus. Transform your summer into an unforgettable learning adventure! From elementary through high school, we offer dynamic summer camps featuring topics in mathematics, language arts, and competition preparation - all designed to fit your schedule and ignite your passion for learning.[/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
Sunday, Mar 2 - Jun 22
Friday, Mar 28 - Jul 18
Sunday, Apr 13 - Aug 10
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
Tuesday, Mar 25 - Jul 8
Sunday, Apr 13 - Aug 10
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, Mar 23 - Jul 20
Monday, Apr 7 - Jul 28
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
Sunday, Mar 16 - Jun 8
Wednesday, Apr 16 - Jul 2
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
Monday, Mar 17 - Jun 9
Thursday, Apr 17 - Jul 3
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
Sunday, Mar 2 - Jun 22
Wednesday, Apr 16 - Jul 30
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Tuesday, Mar 4 - Aug 12
Sunday, Mar 23 - Sep 21
Wednesday, Apr 23 - Oct 1
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

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Mar 16 - Sep 14
Tuesday, Mar 25 - Sep 2
Monday, Apr 21 - Oct 13
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
Sunday, Mar 23 - Aug 3
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Friday, Apr 11 - Jun 27
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Sunday, Mar 16 - Aug 24
Wednesday, Apr 9 - Sep 3
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Wednesday, Mar 5 - May 21
Tuesday, Jun 10 - Aug 26

Calculus
Sunday, Mar 30 - Oct 5
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
Sunday, Mar 23 - Jun 15
Wednesday, Apr 16 - Jul 2
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
Friday, Apr 11 - Jun 27
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
Tuesday, Mar 4 - May 20
Monday, Mar 31 - Jun 23
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

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
Monday, Mar 24 - Jun 16
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
Sunday, Mar 30 - Jun 22
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Tuesday, Mar 25 - Sep 2
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Mar 2, 2025
0 replies
Help with combinatorics
Kingfireboy   0
a few seconds ago
I dont really understand the concept of inclusion/exclusion principle which states that \[
\left| A_1 \cup A_2 \cup \dots \cup A_n \right| = \sum_{i=1}^{n} |A_i| - \sum_{1 \leq i < j \leq n} |A_i \cap A_j| + \sum_{1 \leq i < j < k \leq n} |A_i \cap A_j \cap A_k| - \dots + (-1)^{n+1} |A_1 \cap A_2 \cap \dots \cap A_n|
\]
\[
\left| \bigcup_{i=1}^{n} A_i \right| = \sum_{k=1}^{n} (-1)^{k+1} \sum_{1 \leq i_1 < i_2 < \dots < i_k \leq n} \left| A_{i_1} \cap A_{i_2} \cap \dots \cap A_{i_k} \right|
\]
Please help. Ty
0 replies
Kingfireboy
a few seconds ago
0 replies
tangent lines
pnf   1
N 35 minutes ago by ohiorizzler1434
let ABC be a right angel triangle ($\angle A = 90^{\circ}$) and M midpoint of BC. $\omega1$ is the circumcircle of tringle $AMB$ and $\omega2$ circumcircle of triangle $AMC$. the line through C is tangent to $\omega1$ at P and line through B is tangent to $\omega2$ at Q. D is the midpoint of arc BC (does not contain A) in ($ABC$). prove that quadrilateral DPMQ is cyclic.
1 reply
pnf
an hour ago
ohiorizzler1434
35 minutes ago
geometry party
pnf   0
42 minutes ago
pnf
42 minutes ago
0 replies
Factorial Divisibility
Aryan-23   44
N an hour ago by Ilikeminecraft
Source: IMO SL 2022 N2
Find all positive integers $n>2$ such that
$$ n! \mid \prod_{ p<q\le n, p,q \, \text{primes}} (p+q)$$
44 replies
Aryan-23
Jul 9, 2023
Ilikeminecraft
an hour ago
No more topics!
Like ISL 2011 N7
v_Enhance   32
N Today at 1:31 PM by Zany9998
Source: ELMO 2009, Problem 6
Let $p$ be an odd prime and $x$ be an integer such that $p \mid x^3 - 1$ but $p \nmid x - 1$. Prove that \[ p \mid (p - 1)!\left(x - \frac {x^2}{2} + \frac {x^3}{3} - \cdots - \frac {x^{p - 1}}{p - 1}\right).\]John Berman
32 replies
v_Enhance
Dec 31, 2012
Zany9998
Today at 1:31 PM
Like ISL 2011 N7
G H J
G H BBookmark kLocked kLocked NReply
Source: ELMO 2009, Problem 6
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6857 posts
#1 • 8 Y
Y by lc426, A-Thought-Of-God, Aimingformygoal, HamstPan38825, megarnie, HWenslawski, Adventure10, Mango247
Let $p$ be an odd prime and $x$ be an integer such that $p \mid x^3 - 1$ but $p \nmid x - 1$. Prove that \[ p \mid (p - 1)!\left(x - \frac {x^2}{2} + \frac {x^3}{3} - \cdots - \frac {x^{p - 1}}{p - 1}\right).\]John Berman
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dinoboy
2903 posts
#2 • 12 Y
Y by A-Thought-Of-God, srijonrick, Aimingformygoal, megarnie, HWenslawski, Kobayashi, alecamporo, Adventure10, Funcshun840, and 3 other users
It suffices to show $\dbinom{p}{p-1}x^{p-1} + \dbinom{p}{p-2}x^{p-2} + ... + \dbinom{p}{1}x \equiv 0 \pmod{p^2}$ by multiplying the conclusion we want by $p$.
So we want then: \[\sum_{i=0}^{p} \dbinom{p}{i} x^i \equiv x^p + 1 \pmod{p^2}\]
\[ (1+x)^p \equiv x^p + 1 \pmod{p^2}\]
Now it is a well-known problem that when $p|(a^2 + ab + b^2)$ then $p^3|((a+b)^p - a^p - b^p)$ for $p \ge 5$. Then since that $p|(x^2 + x + 1)$, we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
jowramos
208 posts
#3 • 3 Y
Y by megarnie, Adventure10, Mango247
dinoboy, could you please explain your first step? I did not see why one implies the other...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dinoboy
2903 posts
#4 • 21 Y
Y by va2010, wwwrqnojcm, Tommy2000, qwert159, JasperL, Wizard_32, ywq233, Aryan-23, srijonrick, A-Thought-Of-God, Aimingformygoal, k12byda5h, megarnie, Kobayashi, cttg8217, Adventure10, Mango247, Sedro, Funcshun840, vrondoS, and 1 other user
I'm using the (highly) useful identity $\frac{(-1)^{k-1}p}{k} \equiv \dbinom{p}{k} \pmod{p^2}$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
jowramos
208 posts
#5 • 3 Y
Y by megarnie, Adventure10, Mango247
Ok, now I've got it!

Really nice identity :lol:

Indeed, it's a know example of the Wilson's Theorem, now I realize there are many books with this relation.

Also, nice proof for the problem :D
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Kezer
986 posts
#6 • 9 Y
Y by Severus, Aimingformygoal, ILOVEMYFAMILY, a_n, megarnie, alexgsi, Adventure10, Mango247, Funcshun840
Just for the sake of it, another finish, even though really the first step is the key.

LEMMA. For $k=1,2,\dots,p-1$ we have \[ \frac{1}{k} \equiv (-1)^{k-1} \frac{1}{p} \binom{p}{k} \pmod p. \]Proof. Not too difficult. $\square$

Note that it suffices to just take the second factor and let the fraction be inverses, using the lemma we have \[ x - \frac {x^2}{2} + \frac {x^3}{3} - \cdots - \frac {x^{p - 1}}{p - 1} \equiv \frac{1}{p} \sum_{i=1}^{p-1} x^i \binom{p}{i} = \frac{1}{p} \left( (x+1)^p-x^p-1 \right). \]Note that the requirement $p \mid x^3-1$ but $p \nmid x-1$ gives us $p \mid x^2+x+1$, so $x+1 \equiv -x^2 \pmod p$ which lets us transform the above into \[ \frac{1}{p} \left( (x+1)^p-x^p-1 \right) = - \frac{1}{p} \left( x^{2p}+x^p+1 \right) = - \frac{1}{p} \cdot \frac{x^{3p}-1}{x-1}. \]As $p \nmid x-1$, it now suffices to prove $p^2 \mid x^{3p}-1$. For that use \[ x^{3p-1}-1 = \left(x^3-1 \right) \left(x^{3p-3}+x^{3p-6}+\dots+1 \right). \]The first factor is divisible by $p$, so if we can show that the second factor is divisible by $p$ as well, then we are done. But using $x^3 \equiv 1 \pmod p$ we get \[ x^{3p-3}+x^{3p-6}+\dots+1 \equiv \underbrace{1+1+\dots+1}_{p \text{ times}} = p \equiv 0 \pmod p. \]Done. $\square$
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
#8 • 2 Y
Y by A-Thought-Of-God, guptaamitu1
Nice and easy! Here's my solution: Note that, for any $1 \leq i \leq p-1$, we have $$\frac{1}{i}=\frac{(p-i)!(i-1)!}{i!(p-i)!}=\frac{(i-1)!(p-(p-1))(p-(p-2)) \dots (p-i)}{i!(p-i)!} \equiv \frac{(-1)^{p-i} (p-1)!}{i!(p-i)!}=\frac{(-1)^{i-1}}{p} \binom{p}{i} \pmod{p}$$Using Wilson's Theorem, and the above fact, it suffices to prove $$0 \equiv (p-1)! \sum_{i=1}^{p-1} \frac{(-1)^ix^i}{i} \equiv \sum_{i=1}^{p-1} (-1)^{i+1}x^i \times \frac{(-1)^{i-1}}{p} \binom{p}{i} \Leftrightarrow \sum_{i=1}^{p-1} \binom{p}{i} x^i \equiv 0 \pmod{p^2}$$Since $x^3 \equiv 1 \pmod{p}$ (which also gives $3 \mid p-1$, since $3$ is the order of $x$ modulo $p$), so we get that $$\frac{1}{p}\sum_{i=1}^{p-1} \binom{p}{i} x^i \equiv \frac{1}{p} \left(\sum_{j=1}^{\frac{p-1}{3}} \binom{p}{3j}+x\sum_{j=1}^{\frac{p-1}{3}} \binom{p}{3j-2}+x^2\sum_{j=1}^{\frac{p-1}{3}} \binom{p}{3j-1} \right) \pmod{p}$$Let $\omega$ denote a complex cube root of unity. Then one easily gets (using the expansion of $(1+x)^p$, and from $1+\omega+\omega^2=0$, as well as by $p \equiv 1 \pmod{3}$) that $$a=\left(\sum_{j=0}^{\frac{p-1}{3}} \binom{p}{3j} \right)-\binom{p}{0}=\frac{2^p+(1+\omega)^p+(1+\omega^2)^p}{3}-1=\frac{2^p-\omega^{2p}-\omega^p}{3}-1=\frac{2^p-\omega^2-\omega-3}{3}=\frac{2}{3}(2^{p-1}-1)$$$$b=\left(\sum_{j=1}^{\frac{p+2}{3}} \binom{p}{3j-2} \right)-\binom{p}{p}=\frac{2^p+\omega^2(1+\omega)^p+\omega(1+\omega^2)^p}{3}-1=\frac{2^p-\omega^{2p+2}-\omega^{p+1}}{3}-1=\frac{2^p-\omega-\omega^2-3}{3}=\frac{2}{3}(2^{p-1}-1)$$$$c=\sum_{j=1}^{\frac{p-1}{3}} \binom{p}{3j-1}=\frac{2^p+\omega(1+\omega)^p+\omega^2(1+\omega^2)^p}{3}=\frac{2^p-\omega^{2p+1}-\omega^{p+2}}{3}-1=\frac{2^p-1-1}{3}=\frac{2}{3}(2^{p-1}-1)$$Thus, we find that $$a+bx+cx^2 =\frac{2}{3}(2^{p-1}-1)(1+x+x^2) \equiv 0 \pmod{p^2}$$where the last congruence follows by FLT, and the fact that $\text{ord}_p(x)=3$ implies $p \mid 1+x+x^2$. Hence, done. $\blacksquare$
This post has been edited 1 time. Last edited by math_pi_rate, Mar 30, 2020, 7:52 AM
Reason: Fixed some small holes in proof
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AlastorMoody
2125 posts
#9 • 4 Y
Y by SenatorPauline, A-Thought-Of-God, FAA2533, Mango247
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Durga01
256 posts
#10 • 3 Y
Y by amar_04, swynca, Mango247
$p \geq 7$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Severus
742 posts
#11
Y by
I don't think I used the fact that $p\nmid x-1$.

Using $\frac{1}{k}\equiv (-1)^{k-1}\frac{1}{p}\binom{p}{k}\pmod p$, we get that $$(p-1)!\sum_{k=1}^{p-1}(-1)^{k-1}\frac{x^k}{k}\equiv (p-1)!\sum_{k=1}^{p-1}\frac{1}{p}\binom{p}{k}x^k\equiv \sum_{k=1}^{p-1}\binom{p-1}{k}x^k\equiv (x+1)^{p-1}-1\pmod p.$$Now since $x^3\equiv 1\pmod p$, so $x\not\equiv -1\pmod p$, since $p>2$. So $\gcd(x+1,p)=1$. Then by FLT, $(x+1)^{p-1}-1\equiv 0\pmod p$, and we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
fukano_2
492 posts
#12
Y by
redacted
This post has been edited 8 times. Last edited by fukano_2, Oct 27, 2021, 10:31 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
TETris5
31 posts
#13
Y by
Sorry for reviving.
Does anyone know if $p^3|((a+b)^p - a^p - b^p)$ is satisfied, then it implies that $p|(a^2 + ab + b^2)$ is satisfied also?
Thank you!
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Vlad-3-14
262 posts
#14
Y by
It is not necessarily true. Take $a\equiv -1\pmod{p^3}$ and $b\equiv 1\pmod{p^3}$. Then $p^3$ clearly divides $(a+b)^p-a^p-b^p$ but $a^2+ab+b^2\equiv1\pmod{p}$. However, what is the proof for this:
Quote:
Now it is a well-known problem that when $p|(a^2 + ab + b^2)$ then $p^3|((a+b)^p - a^p - b^p)$ for $p \ge 5$

I suspect it has to do with Hensel's lemma

EDIT:

@dinoboy only used the fact fact that if $p|(a^2 + ab + b^2)$ then $p^2|((a+b)^p - a^p - b^p)$, which can be proven rather easy with some tricks involving Wilson's theorem, but for $p^3$ it is quite hard.

As an observation, to prove that if $p|(a^2 + ab + b^2)$ then $p^3|((a+b)^p - a^p - b^p)$, it is enough to prove that if $p|k^2+k+1$, then $p^3|(k+1)^p-k^p-1$
This post has been edited 1 time. Last edited by Vlad-3-14, Dec 3, 2020, 4:31 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
srijonrick
168 posts
#16 • 2 Y
Y by A-Thought-Of-God, guptaamitu1
Vlad-3-14 wrote:
However, what is the proof for this:
Quote:
Now it is a well-known problem that when $p|(a^2 + ab + b^2)$ then $p^3|((a+b)^p - a^p - b^p)$ for $p \ge 5$
You can find some proofs here and here.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Vlad-3-14
262 posts
#17
Y by
Thank you @above.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
GeronimoStilton
1521 posts
#18
Y by
We work in $\mathbb{F}_p$ so as to discard the $(p-1)!$ term. Remark that $p\ne 3$. Additionally remark that the condition implies there is an element of order $3$ in $\mathbb{Z}_p^{\times}$, $x$, so $6\mid p-1$. By the harmonic mod $p$ trick, the sum is
\[\tfrac 1p \sum_{k=1}^{p-1}x^k\binom{p}{k} = \tfrac 1p((1+x)^p-1-x^p).\]To show $(1+x)^p-1-x^p$ is divisible by $p^2$, we show it is divisible by $(x^2+x+1)^2$. Let $\omega=e^{2i\pi/3}$. Compute that
\[(1+\omega)^p-1-\omega^p=(1+\omega)-1-\omega=0,\]so $x-\omega\mid (1+x)^p-1-x^p$. Compute that
\[p(1+\omega)^{p-1}-p\omega^{p-1}=p-p=0,\]so $(x-\omega)^2\mid (1+x)^p-1-x^p$. This implies the desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Sprites
478 posts
#19
Y by
The sum computes in $[\mathbb{F}_p]$ to $\sum_{i=1}^{p-1} \frac{(-1)^{i+1}x^i}{i} \equiv \sum_{i=0}^{p} \dbinom{p}{i} x^i \equiv {(x+1)^p-x^p-1 \over p} \pmod p$
Now we will show that $p^2|(x+1)^p-x^p-1$
Denote $X$ to be the inverse of $x$ modulo $p$.
Since $p|X^{3p}-1$ and so $p^2|(X^p-1)(X^{2p}+X^p+1)$ or $p^2|X^{2p}+X^p+1$
Since $X+1 \equiv -X^2 \pmod p$,we must have $(X+1)^p \equiv X^p+1 \pmod p$, implying the result.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
DottedCaculator
7301 posts
#20 • 1 Y
Y by megarnie
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathnerd2007
122 posts
#21
Y by
Quite a nice problem you know!Though a bit wrong(p=3 doesn't work)
Firstly (and obviously) note that by Wilson's,
$p|(p-1)!+1$
So we'll show that p divides $[ x - \frac {x^2}{2} + \frac {x^3}{3} - \cdots - \frac {x^{p - 1}}{p - 1}$
Using $\frac{1}{k}\equiv (-1)^{k-1}\frac{1}{p}\binom{p}{k}\pmod p$
We'll show that $p$ divides $\frac{1}{p} \sum_{i=1}^{p-1} x^i \binom{p}{i}$
So we'll show that $p^2$ divides $\left( (x+1)^p-x^p-1 \right)$ (by binomial theorem)
Since $x+1=pk-x^2$ for some k ,expanding we just need to show that $p|x^{2p} + x^p +1$
We know that $p \mid x^3 - 1$ and by the well known lemma $a\equiv b\pmod{m^n}$
implies $a^m\equiv b^m\pmod{m^{n+1}}$ we get that $p^2|x^{3p} -1$
Now all we need to do is to show that ($x^p -1$,p)=1 .Now assume to the contrary that this is true and p>3 .Notice that either p-1 or p+1 is a multiple of 3.Note that $p \mid x^3 - 1$ Now just use powers over congruences and subtract the 2 results.We get a contradiction.Hence $p|x^{2p} + x^p +1$
Thus we have proved the result
This post has been edited 1 time. Last edited by Mathnerd2007, Nov 25, 2021, 4:59 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Tintarn
9022 posts
#22
Y by
I'm quite surprised to see that all the solutions so far depend on the "explicit" evaluation of the sum by the "harmonic mod p trick".
There is an alternative "functional equation" route which I find very natural:
Let $f(z)=z+\frac{z^2}{2}+\dots+\frac{z^{p-1}}{p-1}$ where we think of $f$ as a map from $\mathbb{F}_p \to \mathbb{F}_p$.
We want to prove $f(-x)=0$ whenever $x$ has order $3$.
As explained here (this is the 2011-N7 thread) one readily checks that we have the "functional equations"
\[f(z+1)=f(-z)\]and
\[f(z^2)=(1+z)f(z)+(1-z)f(-z).\]From there one can finish quickly: Note that $x^2+x+1=0$ and hence $f(-x^2)=f(x+1)=f(-x)$ from the first functional equation.
Applying the second one first with $z=x^2$ and then again with $z=x$ we get
\[f(x)=(1+x^2)f(x^2)+(1-x^2)f(-x^2)=-xf(x^2)+(1-x^2)f(-x)=-x((1+x)f(x)+(1-x)f(-x))+(1-x^2)f(-x)=f(x)+(1-x)f(-x)\]and hence $(1-x)f(-x)=0$ and hence $f(-x)=0$ as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
4999 posts
#23
Y by
We use the following "trick": for $k \not \equiv 0 \pmod{p}$, we have
$$\frac{1}{k} \equiv (-1)^{p-1}\cdot \frac{1}{p}\binom{p}{k} \pmod{p}.$$Applying this, it suffices to show that
\begin{align*}
\sum_{k=1}^{p-1} \binom{p}{k}x^k &\equiv 0 \pmod{p^2}\\
\sum_{k=0}^p \binom{p}{k}x^k &\equiv x^p+1 \pmod{p^2}\\
(x+1)^p \equiv x^p+1 \pmod{p^2}.
\end{align*}From $p \mid x^3-1$ but $p \nmid x-1$, we get $p \mid x^2+x+1$, so by Exponent Lifting
$$\nu_p((x+1)^p+x^{2p})=1+\nu_p(x^2+x+1) \geq 2 \implies (x+1)^p \equiv -x^{2p} \pmod{p^2},$$so it suffices to prove that $p^2 \mid x^{2p}+x^p+1=\tfrac{x^{3p}-1}{x^p-1}$. Since $x^p-1 \equiv x-1 \not \equiv 0 \pmod{p}$, it follows that we only have to show $p^2 \mid x^{3p}-1$. This is again by Exponent Lifting—we have
$$\nu_p(x^{3p}-1)=1+\nu_p(x^3-1)\geq 2,$$which yields the desired result. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
coolmath_2018
2807 posts
#24 • 1 Y
Y by peter_infty
Can someone check this because none of the solutions above are matching this one. Thanks.

We will refer to this as the modfrac relation: $$\frac{1}{k} \equiv (-1)^{p-1}\cdot \frac{1}{p}\binom{p}{k} \pmod{p}.$$It suffices to show \begin{align*}\frac{(p-1)!}{p} \left[\binom{p}{1}x + \binom{p}{2}x^2 + \binom{p}{3}x^3 + \cdots + \binom{p}{p-1}x^{p-1}\right] \equiv 0 \pmod{p} \\ x - x^2 + x^3 + \cdots - x^{p-1} \equiv 0 \pmod{p}\end{align*}by the modfrac relation. So we know \begin{align*}x + x^3 + \cdots + x^{p-2} \equiv x^2 + x^4 + \cdots + x^{p-1} \pmod{p} \\ (x-1)(x)(1 + x^2 + \cdots + x^{p-3}) \equiv 0 \pmod{p} \\ (1 + x^2 + \cdots + x^{p-3}) \equiv 0 \pmod{p} \\ \frac{1(1 - (x^2)^{(p-1)/2})}{1-x^2} \equiv 0 \pmod{p} \end{align*}the second to last line coming from the fact that $x^3 - 1 \equiv 0 \pmod{p}$ and $x \not \equiv 0 \pmod{p}$ which is why we can divide by $x$ and $x-1$ and the last line coming from the geometric formula. Hence by Euler totient function we know that \[\frac{1(1 - (x^2)^{(p-1)/2})}{1-x^2} \equiv \frac{1(1 - (x^{p-1}))}{1-x^2} \equiv 0 \pmod{p}\]as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4170 posts
#25
Y by
Discard the $(p-1)!$ term, and allow fractions mod $p$.

We will use the well known identity that $$\frac{1}{k}\equiv (-1)^{k+1}{p \choose k}\pmod p.$$Then, we have $$\sum_{n=1}^{p-1}\frac{x^n}{n}(-1)^{n-1}\equiv\sum_{n=1}^{p-1}x^n\frac{1}{p}{p \choose k}\pmod p.$$Thus, ti remains to show that $$\sum_{n=1}^{p-1}x^n\frac{1}{p}{p \choose k}\equiv 0\pmod p,$$which is also $$\sum_{n=1}^{p-1}x^n{p \choose k}\equiv 0\pmod {p^2}.$$By binomial theorem, the LHS is $(x+1)^p-1-x^p$, so it suffices to show that $$(x+1)^p\equiv x^p+1\pmod p.$$
This is easily verifiable by testing all possible cases for $p=3$. Assume $p>3$ from now on.

Note that since $p\mid x^3-1$ but $p$ does not divide $ x-1$, we have $p\mid x^2+x+1.$ Thus, $x+1\equiv -x^2\pmod p$, so it suffices to show that $$-x^{2p}\equiv x^p+1\pmod {p^2}$$or $$x^{2p}+x^p+1\equiv 0\pmod{p^2}.$$Since the order of $x$ mod $p$ is 3, $x^p-1$ is not divisible by $p$ since we are assuming $p\neq 3$. Thus, it suffices to show that $$x^{3p}-1\equiv 0\pmod {p^2}.$$Rewrite as $$(x^3)^p-1^p\equiv 0\pmod {p^2}.$$This is just LTE: $$v_p((x^3)^p-1^p)=v_p(x^3-1)+v_p(p)\geq1+1=2,$$so we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MagicalToaster53
159 posts
#26
Y by
Lemma: We have that for a prime $p$ and $1 \leq k \leq p$ that $1/k \equiv (-1)^{k - 1}/p \binom{p}{k} \pmod p$.
Multiplying the conclusion by a factor of $p$, one concludes that it suffices to show that the sum $\sum_{k = 1}^{p - 1} \binom{p}{k}x^k = (1 + x)^p - (1 + x^p)$ is precisely $0$ modulo $p^2$.
Now using the common fact that if for any arbitrary integers $a, b$ we have that $a \equiv b \pmod{p^n}$, then $a^p \equiv b^p \pmod{p^{n + 1}}$, we have that as $x + 1 \equiv -x^2 \pmod p \implies (1 + x)^p \equiv -x^{2p} \pmod{p^2}$, so at present it suffices to show $x^{2p} + x^p + 1 \equiv 0 \pmod{p^2}$.

Using now the problem condition, we have that $p \mid x^3 - 1$, and in particular, we obtain $p^2 \mid x^{3p} - 1$, and so it once more and finally suffices to show $p^2 \nmid x^p - 1$. However this is trivial, as $v_p(x^p - 1) = v_p(p) + v_p(x - 1) = 1$, so that $p^2 \nmid x^p - 1$, as desired. $\blacksquare$
This post has been edited 1 time. Last edited by MagicalToaster53, Jun 17, 2023, 12:58 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cj13609517288
1855 posts
#28
Y by
Used the 10% hint on ARCH.

Use the harmonic modulo $p$ trick, so that now we want to prove that $p^2$ divides
\[
\sum_{k=1}^{p-1} \binom pk x^k=(x+1)^p-x^p-1.
\]Since $x$ is a primitive cube root of unity, $p$ must be $1$ mod $3$. Now use LTE to see that
\[
\nu_p\left((x+1)^p-(x+1-(x^2+x+1))^p\right)=\nu_p(x^2+x+1)+\nu_p(p)\ge 2,
\]where $p\nmid x+1$ because $p>3$.
Therefore, we want to prove that $p^2$ divides
\[
-x^{2p}-x^p-1.
\]Noting that $p\nmid x^p-1$, it suffices to prove that $p^2$ divides $x^{3p}-1$. However, this is a direct application of LTE as $x^{3p}-1=(x^3)^p-1$, so we win. $\blacksquare$
This post has been edited 1 time. Last edited by cj13609517288, Dec 21, 2023, 3:59 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
kamatadu
465 posts
#29
Y by
By using Wilson's Theorem, note that it suffices to prove that,
\[ \sum_{i=1}^{p-1} \dfrac{(-1)^ix^i}{i} \equiv 0 \pmod{p}. \]
We know that $\dfrac{(-1)^{k-1}p}{k} \equiv \dbinom{p}{k} \pmod{p^2}$.

Now note that proving $\displaystyle\sum_{i=1}^{p-1} \dfrac{(-1)^ix^i}{i} \equiv 0 \pmod{p}$ is equivalent to proving $\displaystyle\sum_{i=1}^{p-1} \dfrac{p(-1)^ix^i}{i} \equiv 0 \pmod{p^2}$.

Now, we have,
\begin{align*}
    \sum_{i=1}^{p-1} \dfrac{p(-1)^ix^i}{i} &= - \sum_{i=1}^{p-1} \dfrac{(-1)^{i-1}p}{i}\cdot x^i \\
    &\equiv -\sum_{i=1}^{p-1} \binom{p}{i}x^i \\
    &=  - \left(\sum_{i=0}^{p} \binom{p}{i}x^i - 1 - x^p \right) \\
    &= x^p + 1 - \sum_{i=0}^{p} \binom{p}{i}x^i\\
    &\equiv x^p + 1 - (1+x)^p\\
    &\equiv x^p + 1 +x^{2p}\\
    &= \dfrac{x^{3p} - 1}{x^p-1} \pmod{p^2}
.\end{align*}
Firstly note that $x^p -1 \equiv x - 1 \not\equiv 0 \pmod{p}$. Now note that if we can show that $\nu_{p}\left(\dfrac{x^{3p} - 1}{x^p-1}\right) \ge 2$, then we are done. By LTE, $\nu_{p}\left(\dfrac{x^{3p} - 1}{x^p-1}\right) = \nu_{p}(x^{3p} -1) - \nu_{p}(x^p - 1) = (\nu_{p}(x^3 - 1) + \nu_{p}(p)) - 0 \ge 2$ and we are done. :yoda:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AlanLG
241 posts
#31
Y by
$\textcolor{blue}{Lemma.}$
$$\frac{1}{k}\equiv \frac{(-1)^{k-1}}{p}\binom{p}{k}\pmod {p^2}$$
By the lemma and Wilson´s Theorem it suffices to prove
$$\binom{p}{1}x^1+\binom{p}{2}x^2+\cdots \binom{p}{p-1}x^{p-1}\equiv 0\pmod {p^2}$$Which is equivalent to
$$(x+1)^p\equiv x^p+1\pmod{p^2}$$
then it suffices to show $p^2\mid f(x)=(x+1)^p-x^p-1$, we are going to prove that $f(x)$ has $\zeta_3$ as a double root, with this we finish as any polynomial that has $\zeta_p$ as a root is divisible by $x^{p-1}+\cdots+x+1$; as $\operatorname{Ord}_p(x)=3$ then $6\mid p-1$; note that
$$f(\zeta_3)=(1+\zeta_3)^p-\zeta_3^p-1=1+\zeta_3-\zeta_3-1=0 \hspace{0.5cm}\text{and}\hspace{0.5cm} f^{\prime}(\zeta_3)=p(1+\zeta_3)^{p-1}-p\zeta_3^{p-1}=p\cdot 1-p\cdot 1=0$$(we used the fact that $1+\zeta_3$ is a 6-th rooth of the unity) And we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathhotspot
70 posts
#32
Y by
can't we use p adic analysis here/?/???
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathandski
704 posts
#33
Y by
Subjective Rating (MOHs) $       $
Attachments:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Aiden-1089
277 posts
#34
Y by
Since $x^3 \equiv 1$ (mod $p$) and $x \not\equiv 1$ (mod $p$), we get that $ord_p(x)=3$, so $3 \mid p-1$. Since $p$ is odd, this implies that $6 \mid p-1$. Now,
$x - \frac {x^2}{2} + \frac {x^3}{3} - \cdots - \frac {x^{p - 1}}{p - 1} $
$= \sum_{i=0}^{\frac{p-1}{6}-1} \left( \frac{x^{6i+1}}{6i+1}-\frac{x^{6i+2}}{6i+2}+\frac{x^{6i+3}}{6i+3}-\frac{x^{6i+4}}{6i+4}+\frac{x^{6i+5}}{6i+5}-\frac{x^{6i+6}}{6i+6} \right) \equiv \sum_{i=0}^{\frac{p-1}{6}-1} \left( \frac{x}{6i+1}+\frac{x+1}{6i+2}+\frac{1}{6i+3}-\frac{x}{6i+4}-\frac{x+1}{6i+5}-\frac{1}{6i+6} \right) $
$= x\sum_{i=0}^{\frac{p-1}{6}-1} \left( \frac{1}{6i+1}+\frac{1}{6i+2}-\frac{1}{6i+4}-\frac{1}{6i+5} \right) + \sum_{i=0}^{\frac{p-1}{6}-1} \left( \frac{1}{6i+2}+\frac{1}{6i+3}-\frac{1}{6i+5}-\frac{1}{6i+6} \right) $
$\equiv \frac{x}{p}\sum_{i=0}^{\frac{p-1}{6}-1} \left( \binom{p}{6i+1}-\binom{p}{6i+2}+\binom{p}{6i+4}-\binom{p}{6i+5} \right) + \frac{1}{p} \sum_{i=0}^{\frac{p-1}{6}-1} \left( -\binom{p}{6i+2}+\binom{p}{6i+3}-\binom{p}{6i+5}+\binom{p}{6i+6} \right) $
$= \frac{x}{p} \left( \sum_{i=0}^{\frac{p-1}{3}-1}  \binom{p}{3i+1} - \sum_{i=0}^{\frac{p-1}{3}-1}  \binom{p}{3i+2} \right) + \frac{1}{p} \left( \sum_{i=1}^{\frac{p-1}{3}}  \binom{p}{3i} - \sum_{i=0}^{\frac{p-1}{3}-1}  \binom{p}{3i+2} \right) = \frac{x}{p} \left( \frac{2^p-2}{3} - \frac{2^p-2}{3} \right) + \frac{1}{p} \left( \frac{2^p-2}{3} - \frac{2^p-2}{3} \right) =0 $ (mod $p$).
This post has been edited 2 times. Last edited by Aiden-1089, Sep 6, 2024, 3:07 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Maximilian113
480 posts
#35
Y by
Recall the well-known identity $$\frac{1}{k} \equiv (-1)^{k-1} \cdot \frac{1}{p} \binom{p}{k} \pmod p.$$It thus suffices to show that $$\sum_{k=1}^{p-1} \binom{p}{k} x^k \equiv 0 \pmod {p^2}.$$By the Binomial Theorem, this reduces to $$(x+1)^p \equiv x^p+1 \pmod{p^2}.$$Now, notice that by LTE $v_p((x+1)^p+(x^2)^p) \geq 2,$ so $(x+1)^p \equiv -(x^2)^p \pmod{p^2}.$ Hence, it suffices to show that $$x^{2p} + x^p+1 \equiv 0 \pmod{p^2}.$$Clearly, $x^p-1 \not \equiv 0 \pmod p.$ Meanwhile, by LTE, $$v_p(x^{3p}-1) = v_p(x^3-1)+v_p(p) \geq 2,$$and thus the desired result follows. QED
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
smileapple
1007 posts
#36
Y by
It suffices to show that \[\sum_{n=1}^{p-1}\frac{p(-1)^{n-1}x^n}n\equiv0\pmod{p^2}.\]Using the identity $\frac1n\equiv\frac{(-1)^{n-1}}p\binom{p}n\pmod{p}$ for all $1\le n\le p-1$, it follows that \[\sum_{n=1}^{p-1}\frac{p(-1)^{n-1}x^n}n\equiv\sum_{n=1}^{p-1}\binom{p}nx^n\equiv(x+1)^p-x^p-1\pmod{p^2}.\]
We are given that $p\mid x^2+x+1$ and thus that $6\mid p-1$, so now it suffices to show that $(x^2+x+1)^2$ divides the polynomial $P(x)=(x+1)^p-x^p-1$. But this follows from the fact that $P(\omega)=P'(\omega)=0$, where $\omega=\frac{-1+\sqrt3i}2.$ $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Zany9998
2 posts
#37
Y by
First of all we note that since $ \mathbb{Z}/p\mathbb{Z}$ is a field therefore we can deal with rational numbers just fine. Hence our initial condition is equivalent to
\[
		\left( x - \frac{x^2}{2} + \frac{x^3}{3} - \dots - \frac{x^{p-1}}{p-1} \right)  \equiv 0 \mod p
		\]which is equivalent to
\[
		\sum_{i=1}^{p-1} \dfrac{(-1)^i x^ i }{i} \equiv 0 \mod p
		\]Let $P(z)$ be the polynomial $\sum_{i=1}^{p-1} \dfrac{(-1)^i z^ i }{i}$.
Since $p|(x^3 -1 )$ but $p\nmid x-1 $ this implies $p|(x^2+x+1)$ . Now note that $x^{3n+c} \equiv  x^c  \mod p $.
Note that order of x with respect to p is 3, hence $3|p-1$. As $p$ is an odd prime,we get $6|p-1$. Hence $p=6m+1$ for some natural $m$.
Hence
\[
		P(x) \equiv \left( \left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i+3} }{3i+3}  \right)  + \left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i+1} }{3i+1} \right) x + \left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i+2} }{3i+2} \right) x^2   \right)  \mod p
		\]Let $A=\left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i+3} }{3i+3}  \right) , B = \left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i+1} }{3i+1} \right)   , C =  \left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i-2} }{3i+2} \right) $ .

We will prove that $A \equiv B \equiv C \mod p$. which will prove $P(x) \equiv 0 \mod p$ which will prove our original proposition . We will divide our proof into 2 parts , first we prove $A \equiv B \mod p$ , in second part we will prove $A \equiv C \mod p$.

Proof that $A \equiv B \mod p$ $\to$

Note that as $1/a \equiv -1/(p-a) \mod p$, we get
\[
		\left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i+3} }{(3i+3)}  \right) \equiv \left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i+2} }{6m+1 -(3i+3)}  \right) \mod p
		\]which implies
\[
		A \equiv \left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{6m-2-3i} }{6m-2-3i}  \right) \mod p
		\]as we know $\sum_{i=a}^{i=b} f(i) = \sum_{i=a}^{i=b} f(a+b-i)$, we get
\[
		A \equiv \left(  \sum_{i=0}^{i=2m-1} \dfrac{(-1)^{3i+1} }{3i+1}  \right) \equiv B \mod p
		\]Proof that $A \equiv C \mod p$ $\to$

We will prove that $3A \equiv A+B+C \mod p$, which will automatically prove $A\equiv C \mod p$. First of all note that $A+B+C \equiv \sum_{i=1}^{6m}(\frac{(-1)^i}{i}) \mod p$. As
\( \sum_{i=1}^{6m}(\frac{1}{i}) \equiv 0 \mod p \) (as each inverse is mapped bijectively to a non - zero element, therefore it is just sum of all non zero elements, sum of whose is 0).
We get $\sum_{i=1}^{6m}(\frac{(-1)^i}{i}) \equiv 2\sum_{i=1}^{3m}(\frac{1}{2i}) \mod p$ which implies
\[
		 A+B+C \equiv \sum_{i=1}^{3m}\frac{1}{i} \mod p
		 \]Let $D= \sum_{i=1}^{m} \left( \frac{1}{2i-1} + \frac{1}{4m+2i}\right) $. We claim that $D \equiv 0 \mod p$. To prove that , first notice (using $1/a \equiv -1/(p-a) \mod p$ and $\\ \sum_{i=a}^{i=b} f(i) = \sum_{i=a}^{i=b} f(a+b-i)$ respectively),

$\sum_{i=1}^{m} \left( \frac{1}{4m+2i}\right) \equiv \sum_{i=1}^{m} \left( \frac{-1}{6m+1 - (4m+2i)}\right) \equiv \sum_{i=1}^{m} \left( \frac{-1}{6m+1 - (4m+2(m+1-i))}\right) \mod p $, this implies
$ \sum_{i=1}^{m} \left( \frac{1}{4m+2i}\right) \equiv  \sum_{i=1}^{m} \left( \frac{-1}{2i-1}\right) \mod p $.
Hence $D \equiv 0 \mod p$.

Now note that $3A \equiv \left(  \sum_{i=0}^{i=2m-1} \dfrac{3*(-1)^{3i+3} }{3i+3}\right) \equiv \sum_{i=1}^{i=2m} \dfrac{(-1)^i }{i}  \mod p$ .
Now
$\sum_{i=1}^{i=2m} \dfrac{(-1)^i }{i}  \equiv 2D+\sum_{i=1}^{i=2m} \dfrac{(-1)^i }{i} \mod p $. This implies

$\sum_{i=1}^{i=2m} \dfrac{(-1)^i }{i}  \equiv \sum_{i=1}^{m} \left( \frac{2}{2i-1} + \frac{1}{2m+i}\right)+\sum_{i=1}^{i=2m} \dfrac{(-1)^i }{i} \equiv \sum_{i=1}^{3m}\frac{1}{i} \mod p $,

Hence $3A \equiv A+B+C \mod p$ , as $A \equiv B \mod p$, we get $A \equiv C \mod p$. Since $A \equiv B \equiv C \mod p$, we have $P(x) \equiv A(1+x+x^2) \mod p$ ,hence $P(x) \equiv 0 \mod p$
which proves our original proposition
Z K Y
N Quick Reply
G
H
=
a