Stay ahead of learning milestones! Enroll in a class over the summer!

G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
Apr 2, 2025
Spring is in full swing and summer is right around the corner, what are your plans? At AoPS Online our schedule has new classes starting now through July, so be sure to keep your skills sharp and be prepared for the Fall school year! Check out the schedule of upcoming classes below.

WOOT early bird pricing is in effect, don’t miss out! If you took MathWOOT Level 2 last year, no worries, it is all new problems this year! Our Worldwide Online Olympiad Training program is for high school level competitors. AoPS designed these courses to help our top students get the deep focus they need to succeed in their specific competition goals. Check out the details at this link for all our WOOT programs in math, computer science, chemistry, and physics.

Looking for summer camps in math and language arts? Be sure to check out the video-based summer camps offered at the Virtual Campus that are 2- to 4-weeks in duration. 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 events:
[list][*]April 3rd (Webinar), 4pm PT/7:00pm ET, Learning with AoPS: Perspectives from a Parent, Math Camp Instructor, and University Professor
[*]April 8th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS State Discussion
April 9th (Webinar), 4:00pm PT/7:00pm ET, Learn about Video-based Summer Camps at the Virtual Campus
[*]April 10th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MathILy and MathILy-Er Math Jam: Multibackwards Numbers
[*]April 22nd (Webinar), 4:00pm PT/7:00pm ET, Competitive Programming at AoPS (USACO).[/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, 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Apr 2, 2025
0 replies
k i Peer-to-Peer Programs Forum
jwelsh   157
N Dec 11, 2023 by cw357
Many of our AoPS Community members share their knowledge with their peers in a variety of ways, ranging from creating mock contests to creating real contests to writing handouts to hosting sessions as part of our partnership with schoolhouse.world.

To facilitate students in these efforts, we have created a new Peer-to-Peer Programs forum. With the creation of this forum, we are starting a new process for those of you who want to advertise your efforts. These advertisements and ensuing discussions have been cluttering up some of the forums that were meant for other purposes, so we’re gathering these topics in one place. This also allows students to find new peer-to-peer learning opportunities without having to poke around all the other forums.

To announce your program, or to invite others to work with you on it, here’s what to do:

1) Post a new topic in the Peer-to-Peer Programs forum. This will be the discussion thread for your program.

2) Post a single brief post in this thread that links the discussion thread of your program in the Peer-to-Peer Programs forum.

Please note that we’ll move or delete any future advertisement posts that are outside the Peer-to-Peer Programs forum, as well as any posts in this topic that are not brief announcements of new opportunities. In particular, this topic should not be used to discuss specific programs; those discussions should occur in topics in the Peer-to-Peer Programs forum.

Your post in this thread should have what you're sharing (class, session, tutoring, handout, math or coding game/other program) and a link to the thread in the Peer-to-Peer Programs forum, which should have more information (like where to find what you're sharing).
157 replies
jwelsh
Mar 15, 2021
cw357
Dec 11, 2023
k i C&P posting recs by mods
v_Enhance   0
Jun 12, 2020
The purpose of this post is to lay out a few suggestions about what kind of posts work well for the C&P forum. Except in a few cases these are mostly meant to be "suggestions based on historical trends" rather than firm hard rules; we may eventually replace this with an actual list of firm rules but that requires admin approval :) That said, if you post something in the "discouraged" category, you should not be totally surprised if it gets locked; they are discouraged exactly because past experience shows they tend to go badly.
-----------------------------
1. Program discussion: Allowed
If you have questions about specific camps or programs (e.g. which classes are good at X camp?), these questions fit well here. Many camps/programs have specific sub-forums too but we understand a lot of them are not active.
-----------------------------
2. Results discussion: Allowed
You can make threads about e.g. how you did on contests (including AMC), though on AMC day when there is a lot of discussion. Moderators and administrators may do a lot of thread-merging / forum-wrangling to keep things in one place.
-----------------------------
3. Reposting solutions or questions to past AMC/AIME/USAMO problems: Allowed
This forum contains a post for nearly every problem from AMC8, AMC10, AMC12, AIME, USAJMO, USAMO (and these links give you an index of all these posts). It is always permitted to post a full solution to any problem in its own thread (linked above), regardless of how old the problem is, and even if this solution is similar to one that has already been posted. We encourage this type of posting because it is helpful for the user to explain their solution in full to an audience, and for future users who want to see multiple approaches to a problem or even just the frequency distribution of common approaches. We do ask for some explanation; if you just post "the answer is (B); ez" then you are not adding anything useful.

You are also encouraged to post questions about a specific problem in the specific thread for that problem, or about previous user's solutions. It's almost always better to use the existing thread than to start a new one, to keep all the discussion in one place easily searchable for future visitors.
-----------------------------
4. Advice posts: Allowed, but read below first
You can use this forum to ask for advice about how to prepare for math competitions in general. But you should be aware that this question has been asked many many times. Before making a post, you are encouraged to look at the following:
[list]
[*] Stop looking for the right training: A generic post about advice that keeps getting stickied :)
[*] There is an enormous list of links on the Wiki of books / problems / etc for all levels.
[/list]
When you do post, we really encourage you to be as specific as possible in your question. Tell us about your background, what you've tried already, etc.

Actually, the absolute best way to get a helpful response is to take a few examples of problems that you tried to solve but couldn't, and explain what you tried on them / why you couldn't solve them. Here is a great example of a specific question.
-----------------------------
5. Publicity: use P2P forum instead
See https://artofproblemsolving.com/community/c5h2489297_peertopeer_programs_forum.
Some exceptions have been allowed in the past, but these require approval from administrators. (I am not totally sure what the criteria is. I am not an administrator.)
-----------------------------
6. Mock contests: use Mock Contests forum instead
Mock contests should be posted in the dedicated forum instead:
https://artofproblemsolving.com/community/c594864_aops_mock_contests
-----------------------------
7. AMC procedural questions: suggest to contact the AMC HQ instead
If you have a question like "how do I submit a change of venue form for the AIME" or "why is my name not on the qualifiers list even though I have a 300 index", you would be better off calling or emailing the AMC program to ask, they are the ones who can help you :)
-----------------------------
8. Discussion of random math problems: suggest to use MSM/HSM/HSO instead
If you are discussing a specific math problem that isn't from the AMC/AIME/USAMO, it's better to post these in Middle School Math, High School Math, High School Olympiads instead.
-----------------------------
9. Politics: suggest to use Round Table instead
There are important conversations to be had about things like gender diversity in math contests, etc., for sure. However, from experience we think that C&P is historically not a good place to have these conversations, as they go off the rails very quickly. We encourage you to use the Round Table instead, where it is much more clear that all posts need to be serious.
-----------------------------
10. MAA complaints: discouraged
We don't want to pretend that the MAA is perfect or that we agree with everything they do. However, we chose to discourage this sort of behavior because in practice most of the comments we see are not useful and some are frankly offensive.
[list] [*] If you just want to blow off steam, do it on your blog instead.
[*] When you have criticism, it should be reasoned, well-thought and constructive. What we mean by this is, for example, when the AOIME was announced, there was great outrage about potential cheating. Well, do you really think that this is something the organizers didn't think about too? Simply posting that "people will cheat and steal my USAMOO qualification, the MAA are idiots!" is not helpful as it is not bringing any new information to the table.
[*] Even if you do have reasoned, well-thought, constructive criticism, we think it is actually better to email it the MAA instead, rather than post it here. Experience shows that even polite, well-meaning suggestions posted in C&P are often derailed by less mature users who insist on complaining about everything.
[/list]
-----------------------------
11. Memes and joke posts: discouraged
It's fine to make jokes or lighthearted posts every so often. But it should be done with discretion. Ideally, jokes should be done within a longer post that has other content. For example, in my response to one user's question about olympiad combinatorics, I used a silly picture of Sogiita Gunha, but it was done within a context of a much longer post where it was meant to actually make a point.

On the other hand, there are many threads which consist largely of posts whose only content is an attached meme with the word "MAA" in it. When done in excess like this, the jokes reflect poorly on the community, so we explicitly discourage them.
-----------------------------
12. Questions that no one can answer: discouraged
Examples of this: "will MIT ask for AOIME scores?", "what will the AIME 2021 cutoffs be (asked in 2020)", etc. Basically, if you ask a question on this forum, it's better if the question is something that a user can plausibly answer :)
-----------------------------
13. Blind speculation: discouraged
Along these lines, if you do see a question that you don't have an answer to, we discourage "blindly guessing" as it leads to spreading of baseless rumors. For example, if you see some user posting "why are there fewer qualifiers than usual this year?", you should not reply "the MAA must have been worried about online cheating so they took fewer people!!". Was sich überhaupt sagen lässt, lässt sich klar sagen; und wovon man nicht reden kann, darüber muss man schweigen.
-----------------------------
14. Discussion of cheating: strongly discouraged
If you have evidence or reasonable suspicion of cheating, please report this to your Competition Manager or to the AMC HQ; these forums cannot help you.
Otherwise, please avoid public discussion of cheating. That is: no discussion of methods of cheating, no speculation about how cheating affects cutoffs, and so on --- it is not helpful to anyone, and it creates a sour atmosphere. A longer explanation is given in Seriously, please stop discussing how to cheat.
-----------------------------
15. Cutoff jokes: never allowed
Whenever the cutoffs for any major contest are released, it is very obvious when they are official. In the past, this has been achieved by the numbers being posted on the official AMC website (here) or through a post from the AMCDirector account.

You must never post fake cutoffs, even as a joke. You should also refrain from posting cutoffs that you've heard of via email, etc., because it is better to wait for the obvious official announcement. A longer explanation is given in A Treatise on Cutoff Trolling.
-----------------------------
16. Meanness: never allowed
Being mean is worse than being immature and unproductive. If another user does something which you think is inappropriate, use the Report button to bring the post to moderator attention, or if you really must reply, do so in a way that is tactful and constructive rather than inflammatory.
-----------------------------

Finally, we remind you all to sit back and enjoy the problems. :D

-----------------------------
(EDIT 2024-09-13: AoPS has asked to me to add the following item.)

Advertising paid program or service: never allowed

Per the AoPS Terms of Service (rule 5h), general advertisements are not allowed.

While we do allow advertisements of official contests (at the MAA and MATHCOUNTS level) and those run by college students with at least one successful year, any and all advertisements of a paid service or program is not allowed and will be deleted.
0 replies
v_Enhance
Jun 12, 2020
0 replies
k i Stop looking for the "right" training
v_Enhance   50
N Oct 16, 2017 by blawho12
Source: Contest advice
EDIT 2019-02-01: https://blog.evanchen.cc/2019/01/31/math-contest-platitudes-v3/ is the updated version of this.

EDIT 2021-06-09: see also https://web.evanchen.cc/faq-contest.html.

Original 2013 post
50 replies
v_Enhance
Feb 15, 2013
blawho12
Oct 16, 2017
Grid of Quadratics: Root-Enabled Arrangement
mojyla222   1
N 10 minutes ago by YaoAOPS
Source: IDMC 2025 P6
Is it possible to place all monic quadratic polynomials with natural coefficients in the cells of an infinite grid on the plane, such that each polynomial is placed in exactly one cell, and for every finite rectangular subgrid with an area greater than one, the sum of the polynomials within that rectangle has a real root?


Proposed by Mojtaba Zare
1 reply
mojyla222
Today at 5:09 AM
YaoAOPS
10 minutes ago
Incenter and concurrency
jenishmalla   7
N 16 minutes ago by brute12
Source: 2025 Nepal ptst p3 of 4
Let the incircle of $\triangle ABC$ touch sides $BC$, $CA$, and $AB$ at points $D$, $E$, and $F$, respectively. Let $D'$ be the diametrically opposite point of $D$ with respect to the incircle. Let lines $AD'$ and $AD$ intersect the incircle again at $X$ and $Y$, respectively. Prove that the lines $DX$, $D'Y$, and $EF$ are concurrent, i.e., the lines intersect at the same point.

(Kritesh Dhakal, Nepal)
7 replies
jenishmalla
Mar 15, 2025
brute12
16 minutes ago
Dear Sqing: So Many Inequalities...
hashtagmath   32
N 23 minutes ago by aiops
I have noticed thousands upon thousands of inequalities that you have posted to HSO and was wondering where you get the inspiration, imagination, and even the validation that such inequalities are true? Also, what do you find particularly appealing and important about specifically inequalities rather than other branches of mathematics? Thank you :)
32 replies
hashtagmath
Oct 30, 2024
aiops
23 minutes ago
Squares on height in right triangle
Miquel-point   1
N 25 minutes ago by LiamChen
Source: Romanian NMO 2025 7.4
Consider the right-angled triangle $ABC$ with $\angle A$ right and $AD\perp BC$, $D\in BC$. On the ray $[AD$ we take two points $E$ and $H$ so that $AE=AC$ and $AH=AB$. Consider the squares $AEFG$ and $AHJI$ containing inside $C$ and $B$, respectively. If $K=EG\cap AC$ and $L=IH\cap AB$, $N=IL\cap GK$ and $M=IB\cap GC$, prove that $LK\parallel BC$ and that $A$, $N$ and $M$ are collinear.
1 reply
Miquel-point
Yesterday at 8:20 PM
LiamChen
25 minutes ago
2025 USA IMO
john0512   68
N 4 hours ago by NicoN9
Congratulations to all of you!!!!!!!

Alexander Wang
Hannah Fox
Karn Chutinan
Andrew Lin
Calvin Wang
Tiger Zhang

Good luck in Australia!
68 replies
john0512
Yesterday at 1:40 AM
NicoN9
4 hours ago
Inequality with a^2+b^2+c^2+abc=4
cn2_71828182846   71
N 6 hours ago by Novmath
Source: USAMO 2001 #3
Let $a, b, c \geq 0$ and satisfy \[ a^2+b^2+c^2 +abc = 4 . \] Show that \[ 0 \le ab + bc + ca - abc \leq 2. \]
71 replies
cn2_71828182846
Jun 27, 2004
Novmath
6 hours ago
AIME I 2025 Problem 6
PaperMath   38
N Today at 7:53 AM by NicoN9
Source: 2025 AIME 1 #6
An isosceles trapezoid has an inscribed circle tangent to each of its four sides. The radius of the circle is $3$, and the area of the trapezoid is $72$. Let the parallel sides of the trapezoid have lengths $r$ and $s$, with $r \neq s$. Find $r^2+s^2$
38 replies
+1 w
PaperMath
Feb 7, 2025
NicoN9
Today at 7:53 AM
PROMYS Europe
Taxicab-1211729   1
N Today at 7:14 AM by Taxicab-1211729
Is anyone attending Promys Europe this summer?
1 reply
Taxicab-1211729
Yesterday at 7:10 AM
Taxicab-1211729
Today at 7:14 AM
do NOT double count (0,0)
bobthegod78   40
N Today at 7:02 AM by NicoN9
Source: 2025 AIME I P4
Find the number of ordered pairs $(x,y)$, where both $x$ and $y$ are integers between $-100$ and $100$ inclusive, such that $12x^2-xy-6y^2=0$.
40 replies
bobthegod78
Feb 7, 2025
NicoN9
Today at 7:02 AM
Stressed spelled backwards
centslordm   25
N Today at 6:50 AM by NicoN9
Source: AIME 2025 #3
The 9 members of a baseball team went to an ice-cream parlor after their game. Each player had a singlescoop cone of chocolate, vanilla, or strawberry ice cream. At least one player chose each flavor, and the number of players who chose chocolate was greater than the number of players who chose vanilla, which was greater than the number of players who chose strawberry. Let $N$ be the number of different assignments of flavors to players that meet these conditions. Find the remainder when $N$ is divided by $1000.$
25 replies
centslordm
Feb 7, 2025
NicoN9
Today at 6:50 AM
Heptagon
StressedPineapple   22
N Today at 6:41 AM by NicoN9
Source: 2025 AIME I P2
In $\triangle ABC$ points $D$ and $E$ lie on $\overline{AB}$ so that $AD < AE < AB$, while points $F$ and $G$ lie on $\overline{AC}$ so that $AF < AG < AC$. Suppose $AD = 4$, $DE = 16$, $EB = 8$, $AF = 13$, $FG = 52$, and $GC = 26$. Let $M$ be the reflection of $D$ through $F$, and let $N$ be the reflection of $G$ through $E$. The area of quadrilateral $DEGF$ is $288$. Find the area of heptagon $AFNBCEM$, as shown in the figure below.

IMAGE
22 replies
StressedPineapple
Feb 7, 2025
NicoN9
Today at 6:41 AM
basic nt
zhoujef000   39
N Today at 6:25 AM by NicoN9
Source: 2025 AIME I #1
Find the sum of all integer bases $b>9$ for which $17_b$ is a divisor of $97_b.$
39 replies
zhoujef000
Feb 7, 2025
NicoN9
Today at 6:25 AM
USA Canada math camp
Bread10   53
N Today at 4:39 AM by FructosePear
How difficult is it to get into USA Canada math camp? What should be expected from an accepted applicant in terms of the qualifying quiz, essays and other awards or math context?
53 replies
Bread10
Mar 2, 2025
FructosePear
Today at 4:39 AM
Tennessee Math Tournament (TMT) Online 2025
TennesseeMathTournament   74
N Today at 12:14 AM by Inaaya
Hello everyone! We are excited to announce a new competition, the Tennessee Math Tournament, created by the Tennessee Math Coalition! Anyone can participate in the virtual competition for free.

The testing window is from March 22nd to April 12th, 2025. Virtual competitors may participate in the competition at any time during that window.

The virtual competition consists of three rounds: Individual, Bullet, and Team. The Individual Round is 60 minutes long and consists of 30 questions (AMC 10 level). The Bullet Round is 20 minutes long and consists of 80 questions (Mathcounts Chapter level). The Team Round is 30 minutes long and consists of 16 questions (AMC 12 level). Virtual competitors may compete in teams of four, or choose to not participate in the team round.

To register and see more information, click here!

If you have any questions, please email connect@tnmathcoalition.org or reply to this thread!

Thank you to our lead sponsor, Jane Street!

IMAGE
74 replies
TennesseeMathTournament
Mar 9, 2025
Inaaya
Today at 12:14 AM
Sum of whose elements is divisible by p
nntrkien   42
N Apr 2, 2025 by cubres
Source: IMO 1995, Problem 6, Day 2, IMO Shortlist 1995, N6
Let $ p$ be an odd prime number. How many $ p$-element subsets $ A$ of $ \{1,2,\dots,2p\}$ are there, the sum of whose elements is divisible by $ p$?
42 replies
nntrkien
Aug 8, 2004
cubres
Apr 2, 2025
Sum of whose elements is divisible by p
G H J
Source: IMO 1995, Problem 6, Day 2, IMO Shortlist 1995, N6
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
nntrkien
61 posts
#1 • 5 Y
Y by Davi-8191, Adventure10, Mango247, cubres, and 1 other user
Let $ p$ be an odd prime number. How many $ p$-element subsets $ A$ of $ \{1,2,\dots,2p\}$ are there, the sum of whose elements is divisible by $ p$?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
iura
481 posts
#2 • 6 Y
Y by Adventure10, ken3k06, v4913, Mango247, cubres, and 1 other user
This is problem 6 form IMO 1995.There are two different solutions to it:
The first is purely combinatorial: Tahe $ A = \{0..p - 1\}, B = \{p..2p - 1\}$.
For a set $ S$ different from $ A$ and $ B$ denote $ C = S \bigcap A$ ,$ D = S \bigcap B$.
Then the sets $ (C + x) \bigcap D$ form a group of $ p$ sets where all the residues appear. (The set $ A + x = \{(a + x) mod p| a \in A\}$)
So we can couunt easily.
The second uses multisection formula counting the coeff $ x^{pk} y^p$ at the polynomial
$ (1 + y)(1 + xy)\cdots (1 + x^{2p - 1}y)$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ZetaX
7579 posts
#3 • 5 Y
Y by Adventure10, Mango247, balllightning37, cubres, and 1 other user
Define $X: =\{ 1,2,...,p\},Y: =\{p+1,p+2,...,2p\}$.
See $X$ and $Y$ as a representant system for $\mathbb{Z}/ p \mathbb{Z}$, since not more is necessary (so all identities concerning $X$ or $Y$ must be seen $\mod p$).
For a subset $A \subset X$ and $z \in \mathbb{Z}/ p \mathbb{Z}$ define $A+z: =\{ a+z \in X| a \in A \}$ and similar for a subset $B \subset Y$.
Call $A \subset X$ trivial iff $A=\emptyset$ or $A=X$, similar for $B \subset Y$ again.
Now there are only $4$ subsets $P \subset (X \cup Y)$ such that both $P \cap X$ and $P \cap Y$ are trivial, so call these subsets trival from now on too.
Then define for a nontrivial subset $P \subset (X \cup Y)$ a 'translation':
if $P \cap X$ is nontrivial define $P+z : = ((P\cap X) +z) \cup (P \cap Y)$ and $P+z : = (P \cap X) \cup ((P\cap Y) +z)$ otherwise.
Now it's easy to see that when $z$ goes through all possible residue classes, that also the sum of the elements of $P+z$ goes through all of them, so there is exactly one sum that is divisible by $p$.
So the 'translation' divides the nontrivial subsets into equivalence classes of $p$ sets each, all sets of the same class having same number of elements.

Since there are exactly $\binom{2p}{p}$ subsets of the desired order $p$ and $2$ of them are trivial, we get that there are $\frac{\binom{2p}{p}-2}{p}+2$ such subsets.

(note that this technique trivially generalises to other types of subsets and all sets of type $\{1,2,...,kp\}$)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pluricomplex
390 posts
#4 • 3 Y
Y by Adventure10, Mango247, cubres
Thanks for nice work ZetaX (is it true ? :D )!
It's a very famous problem ! It seems that there's another way to count this by using polynomial (or useing generator function) . Do you know who creat that nice solution? It's just my wondering about the exactly author of that nice solution which i saw on The Mathematics and Youth Magazine (Vietnam Magazine) in 1996!
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Bluesea
59 posts
#5 • 3 Y
Y by Adventure10, Mango247, cubres
can you write the second solution in a slightly way iura
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
iura
481 posts
#6 • 11 Y
Y by duanby, Davi-8191, huricane, HolyMath, Scrutiny, Adventure10, cubres, and 4 other users
Consider the polynomial $f(x,y)=(1+xy)(1+x^2y)\ldots(1+x^{2p-1}y)$, the $k$-th factor refering to whether $k$ is present in the set or not.

Then the monomial $x^ky^l$ will refer to the set having $l$ elements and sum of elements $k$, so we need to compute the sum of coefficients of $x^{kp}y^p$ of $f$ to find the answer.

To do this, we need to compute the sum of coefficients $x^{pk}y^{pl}$ and substract 2, since there are two terms for $l\neq 1$:$1, x^{p(2p-1)}y^{2p}$.

To compute the sum of coefficients of $x^{pk}y^{pl}$ we use Multisection formula that says us that it equals

$\frac{1}{p^2}\sum_{i,j}f(w^i,w^j)$($w$ is $p$th root of unity).

Now if $w^i$ is not $1$, $f(w^i,w^j)=\prod(1+w^{ik}w^j)=\prod (1+w^k)^2$ (every $w^m$ will be written twice as $w^{ki}w^j$). This equals $\prod (-1-w^k)^2=g(-1)^2=((-1)^p-1)^2=4$ ($g(x)=x^p-1$ is the polynomial with roots $w^i$). Since there are $p-1$ choices for $w^i$, $p$ choices for $w^j$ we get $4p(p-1)$.

Finally, if $w^i=1$, $f(1,w^j)=(1+w^j)^{2p}$. To evaluate $\sum_{j=0}^{p-1} (1+w^j)^{2p}$, note that it equals $p$ times the coefficients of $x^p$ in the polynomial $(1+x)^{2p}$ by the same multisection formula, so it equals $p\binom{2p}{p}$.

So our total sum is $\frac 1{p^2} (4p(p-1)+p\binom{2p}{p}) =\frac{\binom{2p}{p}-2}p+4$.
Substracting 2 we get the desired answer.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Bluesea
59 posts
#7 • 3 Y
Y by Adventure10, Mango247, cubres
iura wrote:
.


To compute the sum of coefficients of $x^{pk}y^{pl}$ we use Multisection formula that says us that it equals

$\frac{1}{p^2}\sum_{i,j}f(w^i,w^j)$($w$ is $p$th root of unity).

.
how can you prove that?What is miultisection formula?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
iura
481 posts
#8 • 7 Y
Y by pavel kozlov, Adventure10, guptaamitu1, Mango247, cubres, and 2 other users
If $w$ is a $n$th root of unity then $\sum_{i=0}^{n-1} w^k=0$ if $w\neq 1$ and $\sum_{i=0}^{n-1} w^k=n$ if $w=1$. By using this result, we can prove the Multisection Formula (which holds also for polynomials of more variables) :

$f(x)=\sum a_ix^i$, then $\sum_{i\equiv k\pmod m} a_ix^i=\frac 1n (\sum_{i=0}^{n-1} f(w^ix) w^{-ik})$. Particularly

$\sum_{i \equiv k\pmod m} a_i=\frac 1n(\sum_{i=0}^{n-1}f(w^i)w^{-ik})$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Bluesea
59 posts
#9 • 3 Y
Y by Adventure10, Mango247, cubres
thank,i understand it now
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathmanman
1444 posts
#10 • 9 Y
Y by siddigss, Polynom_Efendi, Supercali, Illuzion, Imayormaynotknowcalculus, Adventure10, cubres, and 2 other users
Another (wonderful) solution :

We let $w$ be the p-th root of unity.
We thus have :
\[ \prod_{k=1}^{2p} (x - w^k) = (x^p - 1)^2 = x^{2p} - 2x^p + 1. \]
We now define the quantity :
\[ t(w) = \sum_{1 \leq j_1 < j_2 < \ldots < j_p \leq 2p} w^{j_1}w^{j_2} \ldots w^{j_p}. \]
So we have $t(w) = 2$. Besides, if we write $t(w) = \sum a_jw^j$, then $a_j$ represents the number of sub-sets ${j_1, j_2, \ldots, j_p}$ of ${1, 2, \ldots, 2p}$ such that $j_1 + j_2 + \ldots + j_p \equiv j \pmod p$, and we can write :
\[ (a_0 - 2) + a_1w + \ldots + a_{p-1}w^{p-1} = 0. \]
Since the minimal polynomial of $w$ on $\mathbb{Q}[X]$ is $1 + x + \ldots + x^{p-1}$, it follows that :
\[ a_0 - 2 = a_1 = a_2 = \ldots = a_{p-1}. \]
Besides, $a_0 + a_1 + \ldots + a_{p-1} = \binom {2p}{p}$, we conclude immediately that :
\[ a_0 = \frac 1p \left\{\binom {2p}{p} - 2 \right \} + 2. \]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bilarev
200 posts
#11 • 5 Y
Y by Polynom_Efendi, Imayormaynotknowcalculus, Adventure10, Assassino9931, cubres
mathmanman wrote:
Another (wonderful) solution
mathmanman is this the solution of Nikolai Nikolov from Bulgaria for which he get a special prize?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathmanman
1444 posts
#12 • 5 Y
Y by Polynom_Efendi, Imayormaynotknowcalculus, Adventure10, Mango247, cubres
Yes, exactly. :)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bilarev
200 posts
#13 • 3 Y
Y by Adventure10, Mango247, cubres
iura wrote:
$\frac 1{p^2} (4p(p-1)+p\binom{2p}{p}) =\frac{\binom{2p}{p}-2}p+4$.
This is not true...$\frac 1{p^2} (4p(p-1)+p\binom{2p}{p}) =\frac{\binom{2p}{p}-4}p+4$. ;)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bilarev
200 posts
#14 • 4 Y
Y by Adventure10, Adventure10, Mango247, cubres
iura wrote:
Consider the polynomial $f(x,y)=(1+xy)(1+x^2y)\ldots(1+x^{2p-1}y)$, the $k$-th factor refering to whether $k$ is present in the set or not.
I think that we have to consider the polynomial $f(x,y)=(1+xy)(1+x^2y)\ldots(1+x^{2p}y)$...am I right?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
me@home
2349 posts
#15 • 3 Y
Y by Adventure10, Mango247, cubres
Sorry to bump this....

but when I solve it I keep getting $\left\lceil \frac{{2p \choose p}}{p}\right\rceil$, is this the same answer?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ZetaX
7579 posts
#16 • 3 Y
Y by Adventure10, Mango247, cubres
That's $1$ to small.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
robinson123
217 posts
#17 • 2 Y
Y by Adventure10, cubres
mathmanman wrote:
Another (wonderful) solution :

We let $w$ be the p-th root of unity.
We thus have :
\[ \prod_{k=1}^{2p} (x - w^k) = (x^p - 1)^2 = x^{2p} - 2x^p + 1. \]
We now define the quantity :
\[ t(w) = \sum_{1 \leq j_1 < j_2 < \ldots < j_p \leq 2p} w^{j_1}w^{j_2} \ldots w^{j_p}. \]
So we have $t(w) = 2$. Besides, if we write $t(w) = \sum a_jw^j$, then $a_j$ represents the number of sub-sets ${j_1, j_2, \ldots, j_p}$ of ${1, 2, \ldots, 2p}$ such that $j_1 + j_2 + \ldots + j_p \equiv j \pmod p$, and we can write :
\[ (a_0 - 2) + a_1w + \ldots + a_{p-1}w^{p-1} = 0. \]
Since the minimal polynomial of $w$ on $\mathbb{Q}[X]$ is $1 + x + \ldots + x^{p-1}$, it follows that :
\[ a_0 - 2 = a_1 = a_2 = \ldots = a_{p-1}. \]
Besides, $a_0 + a_1 + \ldots + a_{p-1} = \binom {2p}{p}$, we conclude immediately that :
\[ a_0 = \frac 1p \left\{\binom {2p}{p} - 2 \right \} + 2. \]

I wonder that whether we can use this wonderful idea to solve the generation of this problem? I mean we replace $ 2p $ with $ n>p $?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mihaith
133 posts
#18 • 4 Y
Y by Adventure10, Mango247, VIATON, cubres
Yes, we can. If $\{ 1,2,...,2n \}$ is the initial set, then the number of subsets with $n$ elements such that each sum of these subsets' elements is divisible by $n$ is
$$\frac{(-1)^n}{n} \cdot \sum_{d|n} (-1)^d \varphi \bigg( \frac{n}{d} \bigg ) \binom {2d}{d} $$where $"\varphi"$ is the Euler totient function.
$$\odot$$
This post has been edited 6 times. Last edited by mihaith, May 1, 2016, 2:32 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
62861
3564 posts
#19 • 10 Y
Y by baopbc, huricane, ValidName, pad, hakN, Adventure10, Mango247, VIATON, Chikara, cubres
different solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SidVicious
584 posts
#20 • 4 Y
Y by thedragon01, Adventure10, Mango247, cubres
mihaith wrote:
Yes, we can. If $\{ 1,2,...,2n \}$ is the initial set, then the number of subsets with $n$ elements such that each sum of these subsets' elements is divisible by $n$ is
$$\frac{(-1)^n}{n} \cdot \sum_{d|n} (-1)^d \varphi \bigg( \frac{n}{d} \bigg ) \binom {2d}{d} $$where $"\varphi"$ is the Euler totient function.
$$\odot$$

Solution for generalization: Consider the generating function $f(x)=\prod_{i=1}^{2n}(1-x^iy)$ where $y>1.$ Clearly, it suffices to find sum of coefficients in the terms of the form $x^{kn}y^{n}.$ So let $\omega$ be n-th primitive root of unity. By roots of unity filter it is sufficient to find the sum of coefficients in front of $y^{n}$ in $$P=\frac{\sum_{i=0}^{n-1}f(\omega^{i})}{n}$$Now, $f(w^{i})=\prod_{j=1}^{2n}(1-\omega^{ij}y)=(\prod_{j=1}^{n}(1-\omega^{ij}y))^2.$ Now if we denote $\epsilon=\omega^{i},$ then $\epsilon$ is $\frac{n}{gcd(n,i)}$-th primitive root of unity. Hence $$f(w^{i})=(\prod_{j=0}^{\frac{n}{gcd(n,i)}-1}(1-\epsilon^{j}y))^2=(1-y^{\frac{n}{gcd(n,i)}})^{2gcd(n,i)}...(*)$$Now it is clear that sequence $(\frac{n}{gcd(n,j)})_{1 \le j \le n}$ passes through all divisors of $n$ and only through them. In the spirit of this, we have:
Lemma: For any divisor $d$ of $n$ the following has $\varphi(d)$ solutions in $j: d=\frac{n}{gcd(n,j)}$
Proof: It is equivalent with $gcd(n,j)=\frac{n}{d}$ i.e $gcd(d,\frac{jd}{n})=1$ which, since $\frac{jd}{n} < d$ has $\varphi(d)$ solutions.
So let $d=gcd(n,j)$ in $(*)$ then: $f(w^{i})=(1-y^\frac{n}{d})^{2d}.$ Coefficient in front of $y^{n}$ is thus $(-1)^d\binom{2d}{d}.$ This holds for any divisor $d$ of $n$ and it appears for $\varphi(d)$ times, from Lemma. Hence, the answer is $$\frac{\sum_{d|n} (-1)^d \varphi \bigg( \frac{n}{d} \bigg ) \binom {2d}{d}}{n} \blacksquare$$
This post has been edited 2 times. Last edited by SidVicious, Apr 8, 2017, 7:21 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
nmd27082001
486 posts
#21 • 2 Y
Y by Adventure10, cubres
Nice problem
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
unicomyy
17 posts
#22 • 3 Y
Y by Adventure10, Mango247, cubres
how to get the formula in *
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mastermind.hk16
143 posts
#23 • 2 Y
Y by Adventure10, cubres
My solution is similar to CantonMathGuy's.

Let $A = \{ 1,2, \dots, p \}$ and $B = \{ p+1, p+2, \dots ,2p \}$. As usual $\sigma(S)$ denotes the sum of elements of set $S$.

Claim: The number of $k$-element sets $S_k \subset A$, $k<p$, such that $\sigma(S_k) \equiv \ell \mod p$, for a fixed $\ell$ is $\frac{1}{p} \binom{p}{k}$.
Fix $k<p$. We will establish the desired bijection. Suppose $\sigma(S_k) \equiv \ell \mod p$. Then to each element of $S_k$ add a fixed constant $i$ so that $\sigma(S_k +i) \equiv \ell +ik \mod p$. Here addition is defined in modulo $p$. Anyway,we can choose $i$ so that $\ell +ik$ is any desired residue mod $p$. There are $\binom{p}{k}$ subsets in total. By our bijection between all residues we get $\frac{1}{p} \binom{p}{k}$ subsets with $\sigma(S_k) \equiv \ell \mod p$.

Now we can directly count the number of $p$-element subsets with sum divisible by $p$.
If we choose no elements from $A$, then we choose all of $B$. If we choose all of $A$, then choose nothing from $B$.
Choose $1 \leq i \leq p-1$ elements from $A$. There are $\binom{p}{i}$ ways to do this. Then choose $p-i$ elements from $B$ with a fixed sum mod $p$. There are $\frac{1}{p} \binom{p}{p-i}$ ways to do so.

So the number of ways is $$2 + \sum _{i=1} ^{p-1} \frac{1}{p} \binom{p}{i} \binom{p}{p-i} = \boxed{2 + \frac{\binom{2p}{p}-2}{p}}$$The last equality follows from the identity $\binom{2p}{p} = \sum_{i=0}^{p} \binom{p}{i} \binom{p}{p-i}$ which can be proved by double counting the number of ways to choose $p$ elements from a $2p$-element set. 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.
BOBTHEGR8
272 posts
#24 • 2 Y
Y by Adventure10, cubres
iura wrote:
. To evaluate $\sum_{j=0}^{p-1} (1+w^j)^{2p}$, note that it equals $p$ times the coefficients of $x^p$ in the polynomial $(1+x)^{2p}$ by the same multisection formula, so it equals $p\binom{2p}{p}$.
No, it equals $p\binom{2p}{p}+2p$ , as you forgot to consider the first and last terms.
But anyways you got the final answer correct ,so maybe it was a typo.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
djmathman
7938 posts
#25 • 1 Y
Y by cubres
Of course, we can determine the number of such subsets for any fixed size of subset (not just those with $p$ elements).

As in other solutions, let
\[
f(x,y) = (1+xy)(1+x^2y)\cdots(1+x^{2p}y),
\]and let $\zeta$ be a primitive $p^{\text{th}}$ root of unity. We will consider this as a generating function in $x$ first, run the roots of unity computation, and read the result as a generating function in $y$. Indeed, observe that $f(1,y) = (1+y)^{2p}$ while
\begin{align*}
f(\zeta^k,y) &= y^{2p}\Big((-y^{-1} - 1)(-y^{-1} - \zeta)\cdots (-y^{-1}-\zeta^{p-1})\Big)^2 \\&\hspace{2in}= y^{2p}(-(y^{-1})^p-1)^2 = (y^p + 1)^2.
\end{align*}Therefore the sum of all coefficients of $x$ associated to powers of $p$ is
\[
\frac{1}{p}\sum_{k=0}^{p-1}f(\zeta^k,y) = \frac{(p-1)(y^p + 1)^2 + (y+1)^{2p}}p.
\]From this, we can read off the answer as the coefficient of $y^p$ in the above expression, or $\boxed{2 + \tfrac{\binom{2p}p - 2}p}$.

In general, the number of subsets of size $k$ whose sum of elements is divisible by $p$ equals $\tfrac{1}{p}\textstyle\binom{2p}k$ when $k$ is not divisible by $p$ and equals $1$ when either $k=0$ or $k=2p$ (as we would expect). Additionally, the total number of subsets over all sizes is $4 + \tfrac{4^p-4}{p}$, found by setting $y = 1$ above.
This post has been edited 2 times. Last edited by djmathman, Feb 8, 2021, 3:57 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Grizzy
920 posts
#26 • 2 Y
Y by Mango247, cubres
Let $f(x, y)$ be

\[(1+xy)(1+x^2y)\cdots (1+x^{2p}y).\]
Then we desire the sum of the coefficients of terms of the form $x^{pk}y^p$, where $k$ is a positive integer.

To get this value, we apply the roots of unity filter twice. Let $\omega = e^{\tfrac{2\pi i}{p}}$. Note that the sum of the coefficients of $y^0, y^p, y^{2p}$ is

\[\frac{\sum_{k=0}^{p-1} f(x, \omega^k)}{p}.\]
Then the coefficients of $y^0$ and $y^{2p}$ are clearly $1$ and $x^{p(2p+1)}$, so the coeffient of $y^p$ is

\[\frac{\sum_{k=0}^{p-1} f(x, \omega^k)}{p} - x^{p(2p+1)} - 1.\]
To find the sum of the coefficients of $x$ raised to a power of a multiple of $p$, we once again apply the roots of unity filter. We desire the value of

\begin{align*}
\frac{\sum_{m=0}^{p-1} \left(\frac{\sum_{k=0}^{p-1} f(\omega^m, \omega^k)}{p} - (\omega^m)^{p(2p+1)} - 1\right)}{p} & = \frac{ \frac{\sum_{m=0}^{p-1} \sum_{k=0}^{p-1} f(\omega^m, \omega^k)}{p} - p(\omega^m)^{p(2p+1)} - p}{p}\\
& = \frac{\frac{\sum_{m=0}^{p-1} \sum_{k=0}^{p-1} f(\omega^m, \omega^k)}{p} - p - p}{p}\\
& = \frac{\sum_{m=0}^{p-1} \sum_{k=0}^{p-1} (1 + \omega^m\omega^k)(1 + \omega^{2m}\omega^k)\cdots(1 + \omega^{2pm}\omega^k) - 2p^2}{p^2}.
\end{align*}
It's easy to see that the two sets

\[\{m+k, 2m+k, \cdots, pm+k\}\]
and

\[\{(p+1)m+k, (p+2)m+k, \cdots, 2pm+k\}\]
are equal to the set $\{0, 1, \cdots, p-1\}$ of residues modulo $p$ when $m$ is not equal to $0$. When $m=0$, this set is just the number $k$ repeated $p$ times. Therefore,

\begin{align*}
&\text{ }\sum_{m=0}^{p-1} \sum_{k=0}^{p-1} (1 + \omega^m\omega^k)(1 + \omega^{2m}\omega^k)\cdots(1 + \omega^{2pm}\omega^k)\\ = &\text{ }\sum_{k=0}^{p-1} (1+\omega^k)^{2p} +  p(p-1) \cdot \left((1 + 1)(1 + \omega)\cdots(1 + \omega^{p-1})\right)^2.
\end{align*}
Then we note that, by expanding using the binomial theorem and summing, we get that

\[\sum_{k=0}^{p-1} (1+\omega^k)^{2p} = p\cdot\binom{p}{0} + p\binom{2p}{p} + p\binom{p}{p} \omega^{kp} = p\left(\binom{2p}{p} + 2\right).\]
Moreover, since the polynomial

\[Q(x) = x^p-1\]
factors as

\[(x-1)(x-\omega)(x-\omega^2)\cdots (x-\omega^{p-1}),\]
we get that

\[(1 + 1)(1 + \omega)\cdots(1 + \omega^{p-1}) = (-1)^pQ(-1) = 2\]
so that

\[p(p-1) \cdot \left((1 + 1)(1 + \omega)\cdots(1 + \omega^{p-1})\right)^2 = 4p(p-1).\]
Therefore, we have

\[\sum_{m=0}^{p-1} \sum_{k=0}^{p-1} (1 + \omega^m\omega^k)(1 + \omega^{2m}\omega^k)\cdots(1 + \omega^{2pm}\omega^k) = p\left(\binom{2p}{p} + 2\right) + 4p(p-1)\]
so our answer is

\begin{align*}
\frac{\sum_{m=0}^{p-1} \sum_{k=0}^{p-1} (1 + \omega^m\omega^k)(1 + \omega^{2m}\omega^k)\cdots(1 + \omega^{2pm}\omega^k) - 2p^2}{p^2} & = \frac{p\left(\binom{2p}{p} + 2\right) + 4p(p-1) - 2p^2}{p^2}\\
& = \boxed{\frac{1}{p}\left(\binom{2p}{p} - 2\right) + 2}
\end{align*}
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
#27 • 2 Y
Y by kamatadu, cubres
The answer is $\frac{1}{p}\left(\binom{2p}{p}-2\right)+2$. We will instead find the number of subsets $A$ such that $p$ divides $|A|$ and the sum of the elements of $A$ is also divisible by $p$. Note that this is just the answer plus two (for the empty set and $A=\{1,\ldots,2p\}$).
Consider the generating function
$$F(x,y)=(1+x^1y)(1+x^2y)\ldots (1+x^{2p}y),$$so the coefficient of $x^ay^b$ represents the number of subsets with sum $a$ and $b$ elements. Then by a roots of unity filter we wish to find
$$\frac{1}{p^2}\sum_{i=0}^{p-1}\sum_{j=0}^{p-1}F(z^i,z^j),$$where $z$ is a primitive $p$th root of unity.
Note that if $p \nmid i$, then
$$F(z^i,z^j)=(1+z^{1i+j})\ldots(1+z^{2pi+j})=(1+z^0)^2(1+z^1)^2\ldots(1+z^{p-1})^2.$$Since $(x-z^0)\ldots(x-z^{p-1})=x^p-1$ and $p$ is odd, the last product on the above line is equal to $(1^p+1)^2=4$. Thus we can write
$$\frac{1}{p^2}\sum_{i=0}^{p-1}\sum_{j=0}^{p-1}F(z^i,z^j)=\frac{1}{p^2}\left(4p(p-1)+\sum_{j=0}^{p-1}F(1,z^j)\right)=\frac{1}{p^2}\left(4p(p-1)+\sum_{j=0}^{p-1}(1+z^j)^{2p}\right).$$To find the value of the inner summation, consider the sum of the $x^{kp}$ coefficients of $(1+x)^{2p}$, which by another roots of unity filter is simply $\frac{1}{p}\sum_{j=0}^{p-1}(1+z^j)^{2p}$.
On the other hand by direct computation this quantity is equal to $\binom{2p}{p}+2$, so it follows that
$$\frac{1}{p^2}\left(4p(p-1)+\sum_{j=0}^{p-1}(1+z^j)^{2p}\right)=\frac{1}{p^2}\left(4p(p-1)+p\left(\binom{2p}{p}+2\right)\right)=\frac{1}{p}\left(4p-4+\binom{2p}{p}+2\right)=\frac{1}{p}\left(\binom{2p}{p}-2\right)+4.$$Subtracting $2$ yields the desired answer. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
th1nq3r
146 posts
#28 • 1 Y
Y by cubres
This problem took me so long.

The idea is to partition $\{1, 2, \dots, 2p\} = \{1, 2, \dots, p\} \cup \{p + 1, p + 2, \dots, 2p\} = A \cup B$.

$\bold{Lemma}:$ $\binom{2p}{p} = \sum_{k = 0}^{p} \binom{p}{k} \binom{p}{p - k} = 2 + \sum_{k = 1}^{p - 1} \binom{p}{k} \binom{p}{p - k}$.
Proof

Consider the set $A_{\ell} = \{a_1 + \ell, a_2 + \ell, \dots, a_k + \ell\}$ for $k \neq p$ integers $a_1, a_2, \dots, a_k \in A$. Then we make the trivial but important observation that we have that the sequence $A_0, A_1, \dots A_{p - 1}$ form a complete set of residues modulo $p$. Hence if we were to count say, the number of subsets of $k$ elements for which they are $0 \pmod p$, there would be $\frac{1}{p} \binom{p}{k}$ such subsets. (For every $p$ subsets, there is only but one with sum divisible by $p$).

Consider then the set $B_{\ell'} = \{b_1 + \ell', b_2 + \ell', \dots, b_k + \ell'\}$ for $k \neq p$ integers $b_1, b_2, \dots, b_k \in B$. Similarly, this sequence of sets forms a complete set of residues modulo $p$.

Now if the set $A_i \equiv x \pmod p$, then we may find a suitable $B_j$ so that $B_j \equiv p - x \pmod p$, as both of the sequences $A_i$ and $B_j$ form a complete residue class modulo $p$. Thus there are $p \left (\frac{1}{p} \binom{p}{k} \frac{1}{p} \binom{p}{p - k} \right) = \frac{1}{p} \binom{p}{k} \binom{p}{p - k}$ ways to choose these sets. Summing over all $k$ gives us $\frac{1}{p} \left(\binom{2p}{p} - 2 \right)$.

Now we also have the original sets $A$ and $B$. (Both of these sets have the property pertaining to them that the sum of their elements is divisible by $p$ and contain $p$ elements). Hence the total number of such $p$ element subsets becomes $\boxed{2 + \frac{1}{p} \left(\binom{2p}{p} - 2 \right)}$. $\blacksquare$
This post has been edited 1 time. Last edited by th1nq3r, Jul 23, 2022, 7:11 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8857 posts
#29 • 1 Y
Y by cubres
Here's a somewhat shorter solution.

Consider the generating function $$F(k) = \prod_{i=1}^{2p} (1+k^i X)$$for which the coefficient of the $X^a k^b$ term denotes the number of $a$-element subsets with sum $B$. It suffices to find the coefficient of the $X^p$ term in this expansion for $a$ a multiple of $p$, which is given via roots of unity filter by $$\sum_{\omega^p = 1} f(\omega) = f(1) + \sum_{\omega^p =1, \omega \neq 1} f(\omega).$$Notice that $f(1) ={2p \choose p}$, and $f(\omega)$ for any arbitrary $p$th root of unity (necessarily primitive) denotes the coefficient of $X^p$ in $$\prod_{i=1}^{2p}(1+\omega^i X) = (-1)^{2p} \prod_{i=1}^{2p} (-1-\omega^i X) = (-1-X^p)^2 = (1+X^p)^2,$$which is just 2.

Thus, the answer is $$\frac{{2p \choose p} + 2(p-1)}p = \frac{{2p \choose p} - 2}p + 2$$subsets.
This post has been edited 1 time. Last edited by HamstPan38825, Jul 26, 2022, 12:36 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bluelinfish
1448 posts
#31 • 1 Y
Y by cubres
Consider the generating function \[ F(x,y) = \prod_{i=0}^{2p}(1+x^iy).\]It suffices to find the sum of coefficients of all terms where the power of $x$ is a multiple of $p$ and the power of $y$ is equal to $p$. Let $\omega = e^{\frac{2\pi i}{p}}.$ Using roots of unity filter, the sum of coefficients of all terms where the power of $x$ is a multiple of $P$ is \[ \frac1p\sum_{i=0}^{p-1} F(\omega^i, y). \]The term when $y=0$ is equal to $(1+y)^{2p}$, for which the $y^p$ coefficient is $\binom{2p}p$. All other terms in this summation are equivalent to \[ \left(\prod_{i=0}^{p-1}(1+\omega^iy)\right)^2.\]The inside product is equivalent to evaluating the function with roots $\omega^iy$ (namely $x^p+y^p$) at $1$, hence the entire term is equal to $(1+y^p)^2$, with a $y^p$ coefficient of $2$. Since there are $p-1$ such terms, the total contribution is $2(p-1)$.

Our desired answer is the sum of the $y^p$ coefficients in the filter summation, which is equal to \[ \frac1p\left(\binom{2p}p+2(p-1)\right).\]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
KevinYang2.71
413 posts
#32 • 6 Y
Y by brainfertilzer, LostDreams, megarnie, channing421, deduck, cubres
Consider
\[
\prod_{k=1}^{2p}(1+y^kx)=\cdots+f(y)x^p+\cdots.\tag{1}
\]Let $a_i$ denote the number of $p$-element subsets of $\{1,2,\ldots,2p\}$ which has the sum of elements equal to $i$. It follows that
\[
\sum_{n=0}^\infty a_ny^n=f(y).
\]We also have
\[
\sum_{p\mid n}a_n=\frac{f(1)+f(\omega)+f(\omega^2)+\cdots+f(\omega^{p-1})}{p}
\]where $\omega=e^\frac{2\pi i}{k}$. Plugging $y=1$ into (1) gives $(1+x)^{2p}=\cdots+f(1)x^p+\cdots$. By the binomial theorem, the coefficient of the $x^p$ term of $(1+x)^{2p}$ is $\binom{2p}{p}$. Now, for $1\leq j\leq p-1$, we have
\begin{align*}
\cdots+f(\omega^j)x^p+\cdots&=\prod_{k=1}^{2p}(1+\omega^{jk}x)\\
&=\prod_{k=1}^{2p}(1+\omega^kx)\\
&=\left(\prod_{k=1}^{p}(1+\omega^kx)\right)^2\\
&=(x^p+1)^2\\
&=x^{2p}+2x^p+1
\end{align*}so $f(\omega^j)=2$. Thus we have
\[
\sum_{p\mid n}a_n=\frac{2(p-1)+\binom{2p}{p}}{p}.\text{ }\square
\]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
huashiliao2020
1292 posts
#33 • 1 Y
Y by cubres
Ha! The answer confirmation's so simple I knew there had to be a combinatorial way! So I'm not going to post some rouf solution.

By intuition we feel like our answer would be close to 1/p(2pCp) since it's around that expected value 1 in p subsets to be divisible by p; but since there are TWO elements same mod p, it kind of messes things up, while one distinct of each would help greatly. So we partition the sets into $\{1, 2, \dots, 2p\} = \{1, 2, \dots, p\} \cup \{p + 1, p + 2, \dots, 2p\} = M\cup N$; now, consider $M_k=\{m_1+k,m_2+k,...,m_m+k\}\forall k\ne p,m_1,m_2,...,m_m\in M$; do the similar thing for N. There are $p \left (\frac{1}{p} \binom{p}{k} \frac{1}{p} \binom{p}{p - k} \right) = \frac{1}{p} \binom{p}{k} \binom{p}{p - k}$ ways to choose some $N_i\equiv p-M_j\pmod p$; in particular, summing over all possible k simplifies to $\frac{1}{p} \left(\binom{2p}{p} - 2 \right)$; but since we also need to add set M and N, there are $2 + \frac{1}{p} \left(\binom{2p}{p} - 2 \right)$ many ways as our final answer. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
sixoneeight
1138 posts
#34 • 1 Y
Y by cubres
Goofy gen func rouf

Consider a generating function $$F(x,y) = (1+xy)(1+x^2y)(1+x^3y)\dots (1+x^{2p}y)$$This generating function describes the subsets, where the exponent of $x$ is the sum of the elements and the exponent of $y$ is the size. Therefore, we want the sum of the coefficients of $x^{kp}y^p$ for positive integers $k$.


We now apply a Roots of Unity Filter. The generating function containing only the terms $x^{kp}$ can be obtained by taking
\[
\frac{1}{p}\sum_{k=0}^{p-1}F(e^{\frac{ik\pi}{p}}x,y)
\]and we want the sum of the terms with exponent $y^p$ when evaluated at $x=1$. We write
\[
    (1+xy)(1+x^2y)\dots (1+x^{2p}y) =
    y^{2p}\left(-\frac1y-x\right)\left(-\frac1y-x^2\right)\left(-\frac1y-x^3\right)\dots \left(-\frac1y-x^{2p}\right)
\]Let $P_x(t)$ be a monic polynomial in $t$ with roots $x^i$ for $i=1,2,\dots 2p$. When $x\neq 1$ is a $p^\text{th}$ root of unity, $P_x(t) = (t^p-1)^2$ Then, we find that $$F(x,y) = y^{2p}P_x\left(-\frac1y\right)$$Plugging in $x=1$, we calculate that
\begin{align*}
[y^p]\frac{1}{p}\sum_{k=0}^{p-1}F(e^{\frac{ik\pi}{p}},y) &= [y^p]\frac{y^{2p}}{p}P_{e^\frac{ik\pi}{p}}\left(-\frac1y\right)\\
&= [y^p]\frac{y^{2p}}{p}\left((p-1)\left(\frac{-1}{y^p}-1\right)^2+\left(1+\frac{1}{y}\right)^{2p}\right)\\
&= [y^p]\frac{1}{p}\left((p-1)(y^p+1)^2 + (y+1)^{2p}\right)\\
&= \boxed{\frac{1}{p}\left(2(p-1)+\binom{2p}{p}\right)}
\end{align*}
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Spectator
657 posts
#35 • 4 Y
Y by OronSH, KevinYang2.71, KnowingAnt, cubres
Let $A(x,y)$ be the generating function
\[A(x,y) = (1+yx)(1+yx^2)\cdots(1+yx^{2p})\]We apply the roots of unity filter on $x$ to get
\[\frac{A(1,y)+A(w,y)+\cdots+A(w^{p-1},y)}{p} = \frac{(1+y)^{2p}+(p-1)(1+yw)\cdots(1+yw^{2p})}{p}\]We call this function on $y$, $B(y)$. Note that
\[(1+w)(1+w^2)\cdots(1+w^{p}) = 2\]Then, we apply the roots of unity filter on $y$ to get
\begin{align*}
    \frac{B(1)+B(w)+B(w^2)+\cdots B(w^{p-1})}{p} &= \frac{p+p\binom{2p}{p}+p+2^{2}(p-1)(p)}{p^2}
\end{align*}But, we need to subtract $2$ because it counts the empty set and the set with size $2p$. This gives us
\[\boxed{\frac{\binom{2p}{p}+2p-2}{p}}\]
This post has been edited 1 time. Last edited by Spectator, Nov 11, 2023, 3:50 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
GrantStar
816 posts
#36 • 1 Y
Y by cubres
Let $F(x,y)=\prod_{i=1}^{2p}(1+yx^i)$ be the gen func representing sums of subsets and their number of elements. Note that the answer is equal to \[\frac{1}{p^2}\left(\sum_{k=1}^p \sum_{k=1}^p F\left(e^{2\pi ij/p},e^{2\pi i k/p}\right)\right)-2\]by roots of unity filter, with the $-2$ coming from the empty set and $\{1,2,\dots,2p\}$ being included in this count. We thus compute this!!!
  • First, if $j=1,2,\dots,p-1$, then the sequence $j,2j,\dots, 2pj$ contains each residue modulo $p$ twice. Thus $j+k,2j+k,\dots, 2pj+k$ contains each residue twice. herefore, \[\sum_{k=1}^{p}F\left(e^{2\pi ij/p},e^{2\pi i k/p}\right)=p\prod_{k=1}^p \left(1+e^{2\pi i k/p}\right)^2=4p\]As \[\prod_{k=1}^p \left(1+e^{2\pi i k/p}\right)^2=\prod_{k=1}^p \left(-1-e^{2\pi i k/p}\right)^2=P(-1)^2=4\]in $P(x)=x^p-1$.
  • If $j=p$, then \[\sum_{k=1}^{p}F\left(1,e^{2\pi i k/p}\right)=p\sum_{k=1}^{p}F\left(1+e^{2\pi i k/p}\right)^{2p}\]By roots of unity filter on $(1+x)^{2p}$, we get that the above sum is $p\left(2+\binom{2p}{p}\right).$
Thus the total sum ignoring the division by $p^2$ and subtraction is \[p\left(2+\binom{2p}{p}\right)+4p(p-1)=p\binom{2p}{p}+4p^2-2p\]implying a final answer of \[\frac{p\binom{2p}{p}+4p^2-2p}{p^2}-2=\frac{\binom{2p}{p}-2}{p}+2.\]

Remark: N6 is crazy lol
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
blueprimes
328 posts
#37 • 1 Y
Y by cubres
We will create a generating function $f(x, y)$, where the coefficient $c_{i, j}$ of $x^i y^j$ represents the number of subsets $A \subseteq \{1, 2, \dots, 2p \}$ where the sum of the elements of $A$ is $i$, while $|A| = j$. By considering how many numbers we extract from each individual residue class, it is not hard to find that
$$f(x, y) = \prod_{n = 0}^{p - 1} (1 + 2x^ny + x^{2n}y^2) = \prod_{n = 0}^{p - 1} (1 + x^ny)^2.$$We will use a double roots of unity filter to add all coefficients $c_{i, j}$ where $p \mid i, j$, then subtract $2$ to account for the cases when $j = 0, 2p$. Let $\omega = e^{2 \pi i / p}$. We want to evaluate $\frac{1}{p^2} \sum_{r = 0}^{p - 1} \sum_{s = 0}^{p - 1} f(\omega^r, \omega^s)$. When $r \ne 0$, $f(\omega^r, \omega^s) = \left[\prod_{n = 0}^{p - 1} (1 + \omega^n) \right]^2 = 2^2 = 4$. All cases belonging to the latter yield a total of $4p(p - 1)$. On the other hand, when $r = 0$, we have $\sum_{s = 0}^{p - 1} f(1, \omega^s) = \sum_{s = 0}^{p - 1} (1 + \omega^s)^{2p}$. Using the binomial theorem, only the terms when the exponent of $\omega$ is divisible by $p$ are left behind, and we obtain $p \left[\binom{2p}{p} + 2 \right]$. Our final answer is
$$\frac{4p(p - 1) + p \left[\binom{2p}{p} + 2 \right]}{p^2} - 2 = \frac{\binom{2p}{p} - 2}{p} + 2.$$
This post has been edited 1 time. Last edited by blueprimes, Apr 29, 2024, 1:24 AM
Reason: omega definition
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
KnowingAnt
149 posts
#38 • 1 Y
Y by cubres
I think you only need one filter! We want to find the sum of the coefficients of $x^0y^p,x^py^p,x^{2p}y^p,\dots$ in
\[(1 + xy)(1 + x^2y)\dots(1 + x^{2p}y)\text{.}\]First fix $y$. Now let $\omega$ be a primitive $p$-th root of unity, we want the coefficient of $y^p$ in
\[\frac{P(1) + P(\omega) + \dots + P(\omega^{p - 1})}{p} = \frac{(1 + y)^{2p} + (p - 1)(1 + y^p)^2}{p}\]so the answer is
\[\frac1p\left(\binom{2p}{p} - 2\right) + 2\text{.}\]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathandski
738 posts
#39 • 1 Y
Y by cubres
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.
Maximilian113
549 posts
#40 • 1 Y
Y by cubres
niceee :-D
Let $A(x, y) = (1+xy)(1+x^2y)(\cdots)(1+x^{2p}y).$ Clearly, we want the sum of the coefficients of the terms with $x$ of degree divisible by $p$ and $y$ having degree $p.$ Let $z=e^{2\pi i/p}.$ Then by Roots of Unity Filter we have $$\frac{1}{p} \sum^{p-1}_{k=0}A(z^k, y).$$However, for $k = 1, 2, \cdots, p-1,$ clearly the set $\{1, z, z^2, \cdots z^{p-1}\}$ is a permutation of $\{ z^k, z^{2k}, \cdots z^{pk} \},$ so $$A(z^k, y) = \left( \prod_{k=0}^{p-1} (1+z^ky) \right)^2 = \left( y^{2p} \prod_{k=0}^{p-1} (\frac{1}{y}+z^k) \right)^2 = y^{2p} \cdot \left( -\frac{1}{y^p}-1 \right)^2 = (y^p+1)^2.$$Hence, our sum equals $$\frac{1}{p} \left((p-1)(y^p+1)^2+(y+1)^{2p} \right).$$Now, we simply extract the coefficient of $y^p$ from here, and this is just $$\boxed{\frac{2p-2+\binom{2p}{p}}{p}}.$$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
golue3120
56 posts
#41 • 1 Y
Y by cubres
Here's the other genfunc solution.

Let $\textstyle\binom{n}{k}_q$ be the $q$-binomial coefficient and $\textstyle [n]_q=1+q+\dots+q^{n-1}=\frac{1-q^n}{1-q}$. Then it is well-known that
\[\sum_{\substack{S\subseteq\{1,2,\dots,2p\}\\|S|=p}}q^{\sum S}=q^{p(2p+1)}\binom{2p}{p}_q.\]
Let $\omega$ be a primitive $p$th root of unity. Then we have
\[\binom{2p}{p}_q=\frac{[2p]_q[2p-1]_q\dots[p+1]_q}{[p]_q[p-1]_q\dots[1]_q}=(1+q^p)\frac{[2p-1]_q\dots[p+1]_q}{[p-1]_q\dots[1]_q}.\]As we let $q\rightarrow\omega$, then the product cancels out, so we have $\textstyle\binom{2p}{p}_\omega=1+\omega^p=2$.

Hence by roots of unity filter, the desired result is $\textstyle\frac{1}{p}\sum_{i=0}^{n-1}\binom{n}{k}_{\omega^i}=\frac{\binom{2p}{p}-2}{p}+2$, since $\omega^0=1$ and all other powers are primitive $p$th roots of unity.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
smileapple
1010 posts
#42 • 1 Y
Y by cubres
Define \[P(x,y)=\prod_{n=1}^{2p}(x+y^n).\]Note that if a subset $S\subseteq\{1,2,\dots,2p\}$ has $m$ elements that sum to $s$, the set $S$ will show up in the expansion of $P$ as $x^{2p-m}y^s$.

Now let $\zeta=e^{2\pi i/n}$. By roots of unity filter it suffices to find the coefficient $c_p$ of $x^p$ in the expansion of $Q(x)=\frac1p\sum_{n=0}^{p-1}P(x,\zeta^n)$. But note that $P(x,\zeta^n)$ is equal to $(x+1)^{2p}$ if $n=0$ and is equal to $(x^p+1)^2$ otherwise. Thus \[Q(x)=\frac{(x+1)^{2p}+(p-1)(x^p+1)^2}p,\]from which extracting $c_p$ yields \[c_p=\boxed{\frac{\binom{2p}p+2(p-1)}p},\]which is our answer. $\blacksquare$

Edit: 999th post?
This post has been edited 1 time. Last edited by smileapple, Feb 21, 2025, 1:35 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
eg4334
631 posts
#43 • 1 Y
Y by cubres
Lol what. Just take the generating function $(x+y)(x+y^2) \dots (x+y^{2p})$ where $x$ counts the number of elements we dont use and $y$ counts the exponent. We want $y$ to be a multiple of $p$, and $x$ to be $p$. To extract the first condition, take ROUF with a primitive $p$th root $\omega$. We get $\frac{(x+1)^{2p} + (p-1)((x+\omega)(x+\omega^2)\dots (x+\omega^p))^2}{p} = \frac{(x+1)^{2p} + (p-1)(x^p+1)^2}{p}$. Its obvious by binomial expansion that the answer from here is $\boxed{\frac{\binom{2p}{p} + 2(p-1)}{p}}$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cubres
114 posts
#44
Y by
Yapping
Storage - grinding IMO problems
Z K Y
N Quick Reply
G
H
=
a