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

G
Topic
First Poster
Last Poster
k a My Retirement & New Leadership at AoPS
rrusczyk   1571
N Mar 26, 2025 by SmartGroot
I write today to announce my retirement as CEO from Art of Problem Solving. When I founded AoPS 22 years ago, I never imagined that we would reach so many students and families, or that we would find so many channels through which we discover, inspire, and train the great problem solvers of the next generation. I am very proud of all we have accomplished and I’m thankful for the many supporters who provided inspiration and encouragement along the way. I'm particularly grateful to all of the wonderful members of the AoPS Community!

I’m delighted to introduce our new leaders - Ben Kornell and Andrew Sutherland. Ben has extensive experience in education and edtech prior to joining AoPS as my successor as CEO, including starting like I did as a classroom teacher. He has a deep understanding of the value of our work because he’s an AoPS parent! Meanwhile, Andrew and I have common roots as founders of education companies; he launched Quizlet at age 15! His journey from founder to MIT to technology and product leader as our Chief Product Officer traces a pathway many of our students will follow in the years to come.

Thank you again for your support for Art of Problem Solving and we look forward to working with millions more wonderful problem solvers in the years to come.

And special thanks to all of the amazing AoPS team members who have helped build AoPS. We’ve come a long way from here:IMAGE
1571 replies
rrusczyk
Mar 24, 2025
SmartGroot
Mar 26, 2025
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
1 viewing
jlacosta
Mar 2, 2025
0 replies
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

Find instructions and a list of contests to add here: https://artofproblemsolving.com/community/c40244h1064480_contests_to_add
1 reply
dcouchman
Sep 9, 2019
v_Enhance
Apr 5, 2023
k i Zero tolerance
ZetaX   49
N May 4, 2019 by NoDealsHere
Source: Use your common sense! (enough is enough)
Some users don't want to learn, some other simply ignore advises.
But please follow the following guideline:


To make it short: ALWAYS USE YOUR COMMON SENSE IF POSTING!
If you don't have common sense, don't post.


More specifically:

For new threads:


a) Good, meaningful title:
The title has to say what the problem is about in best way possible.
If that title occured already, it's definitely bad. And contest names aren't good either.
That's in fact a requirement for being able to search old problems.

Examples:
Bad titles:
- "Hard"/"Medium"/"Easy" (if you find it so cool how hard/easy it is, tell it in the post and use a title that tells us the problem)
- "Number Theory" (hey guy, guess why this forum's named that way¿ and is it the only such problem on earth¿)
- "Fibonacci" (there are millions of Fibonacci problems out there, all posted and named the same...)
- "Chinese TST 2003" (does this say anything about the problem¿)
Good titles:
- "On divisors of a³+2b³+4c³-6abc"
- "Number of solutions to x²+y²=6z²"
- "Fibonacci numbers are never squares"


b) Use search function:
Before posting a "new" problem spend at least two, better five, minutes to look if this problem was posted before. If it was, don't repost it. If you have anything important to say on topic, post it in one of the older threads.
If the thread is locked cause of this, use search function.

Update (by Amir Hossein). The best way to search for two keywords in AoPS is to input
[code]+"first keyword" +"second keyword"[/code]
so that any post containing both strings "first word" and "second form".


c) Good problem statement:
Some recent really bad post was:
[quote]$lim_{n\to 1}^{+\infty}\frac{1}{n}-lnn$[/quote]
It contains no question and no answer.
If you do this, too, you are on the best way to get your thread deleted. Write everything clearly, define where your variables come from (and define the "natural" numbers if used). Additionally read your post at least twice before submitting. After you sent it, read it again and use the Edit-Button if necessary to correct errors.


For answers to already existing threads:


d) Of any interest and with content:
Don't post things that are more trivial than completely obvious. For example, if the question is to solve $x^{3}+y^{3}=z^{3}$, do not answer with "$x=y=z=0$ is a solution" only. Either you post any kind of proof or at least something unexpected (like "$x=1337, y=481, z=42$ is the smallest solution). Someone that does not see that $x=y=z=0$ is a solution of the above without your post is completely wrong here, this is an IMO-level forum.
Similar, posting "I have solved this problem" but not posting anything else is not welcome; it even looks that you just want to show off what a genius you are.

e) Well written and checked answers:
Like c) for new threads, check your solutions at least twice for mistakes. And after sending, read it again and use the Edit-Button if necessary to correct errors.



To repeat it: ALWAYS USE YOUR COMMON SENSE IF POSTING!


Everything definitely out of range of common sense will be locked or deleted (exept for new users having less than about 42 posts, they are newbies and need/get some time to learn).

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
Guess the leader's binary string!
cjquines0   78
N a few seconds ago by de-Kirschbaum
Source: 2016 IMO Shortlist C1
The leader of an IMO team chooses positive integers $n$ and $k$ with $n > k$, and announces them to the deputy leader and a contestant. The leader then secretly tells the deputy leader an $n$-digit binary string, and the deputy leader writes down all $n$-digit binary strings which differ from the leader’s in exactly $k$ positions. (For example, if $n = 3$ and $k = 1$, and if the leader chooses $101$, the deputy leader would write down $001, 111$ and $100$.) The contestant is allowed to look at the strings written by the deputy leader and guess the leader’s string. What is the minimum number of guesses (in terms of $n$ and $k$) needed to guarantee the correct answer?
78 replies
cjquines0
Jul 19, 2017
de-Kirschbaum
a few seconds ago
Monkeys have bananas
nAalniaOMliO   5
N 2 minutes ago by jkim0656
Source: Belarusian National Olympiad 2025
Ten monkeys have 60 bananas. Each monkey has at least one banana and any two monkeys have different amounts of bananas.
Prove that any six monkeys can distribute their bananas between others such that all 4 remaining monkeys have the same amount of bananas.
5 replies
nAalniaOMliO
Friday at 8:20 PM
jkim0656
2 minutes ago
Fixed point config on external similar isosceles triangles
Assassino9931   1
N 3 minutes ago by E50
Source: Bulgaria Spring Mathematical Competition 2025 10.2
Let $AB$ be an acute scalene triangle. A point \( D \) varies on its side \( BC \). The points \( P \) and \( Q \) are the midpoints of the arcs \( \widehat{AB} \) and \( \widehat{AC} \) (not containing \( D \)) of the circumcircles of triangles \( ABD \) and \( ACD \), respectively. Prove that the circumcircle of triangle \( PQD \) passes through a fixed point, independent of the choice of \( D \) on \( BC \).
1 reply
Assassino9931
5 hours ago
E50
3 minutes ago
Problem 2
Functional_equation   15
N 4 minutes ago by basilis
Source: Azerbaijan third round 2020
$a,b,c$ are positive integer.
Solve the equation:
$ 2^{a!}+2^{b!}=c^3 $
15 replies
1 viewing
Functional_equation
Jun 6, 2020
basilis
4 minutes ago
VERY HARD MATH PROBLEM!
slimshadyyy.3.60   14
N 7 minutes ago by GreekIdiot
Let a ≥b ≥c ≥0 be real numbers such that a^2 +b^2 +c^2 +abc = 4. Prove that
a+b+c+(√a−√c)^2 ≥3.
14 replies
slimshadyyy.3.60
Yesterday at 10:49 PM
GreekIdiot
7 minutes ago
Intersection of a cevian with the incircle
djb86   24
N 10 minutes ago by Ilikeminecraft
Source: South African MO 2005 Q4
The inscribed circle of triangle $ABC$ touches the sides $BC$, $CA$ and $AB$ at $D$, $E$ and $F$ respectively. Let $Q$ denote the other point of intersection of $AD$ and the inscribed circle. Prove that $EQ$ extended passes through the midpoint of $AF$ if and only if $AC = BC$.
24 replies
djb86
May 27, 2012
Ilikeminecraft
10 minutes ago
Polynomials and their shift with all real roots and in common
Assassino9931   2
N 17 minutes ago by AshAuktober
Source: Bulgaria Spring Mathematical Competition 2025 11.4
We call two non-constant polynomials friendly if each of them has only real roots, and every root of one polynomial is also a root of the other. For two friendly polynomials \( P(x), Q(x) \) and a constant \( C \in \mathbb{R}, C \neq 0 \), it is given that \( P(x) + C \) and \( Q(x) + C \) are also friendly polynomials. Prove that \( P(x) \equiv Q(x) \).
2 replies
Assassino9931
4 hours ago
AshAuktober
17 minutes ago
Impossible to search, classic graph problem
AshAuktober   0
20 minutes ago
Source: Classic
Prove that any graph $G=(V,E)$ with $|V|=|E|-1$ has at least two cycles in it.
0 replies
AshAuktober
20 minutes ago
0 replies
Functional equation
Dadgarnia   11
N 21 minutes ago by jasperE3
Source: Iranian TST 2018, second exam day 1, problem 1
Find all functions $f:\mathbb{R}\rightarrow \mathbb{R}$ that satisfy the following conditions:
a. $x+f(y+f(x))=y+f(x+f(y)) \quad \forall x,y \in \mathbb{R}$
b. The set $I=\left\{\frac{f(x)-f(y)}{x-y}\mid x,y\in \mathbb{R},x\neq y \right\}$ is an interval.

Proposed by Navid Safaei
11 replies
Dadgarnia
Apr 15, 2018
jasperE3
21 minutes ago
Geo challenge on finding simple ways to solve it
Assassino9931   2
N 23 minutes ago by Assassino9931
Source: Bulgaria Spring Mathematical Competition 2025 9.2
Let $ABC$ be an acute scalene triangle inscribed in a circle \( \Gamma \). The angle bisector of \( \angle BAC \) intersects \( BC \) at \( L \) and \( \Gamma \) at \( S \). The point \( M \) is the midpoint of \( AL \). Let \( AD \) be the altitude in \( \triangle ABC \), and the circumcircle of \( \triangle DSL \) intersects \( \Gamma \) again at \( P \). Let \( N \) be the midpoint of \( BC \), and let \( K \) be the reflection of \( D \) with respect to \( N \). Prove that the triangles \( \triangle MPS \) and \( \triangle ADK \) are similar.
2 replies
Assassino9931
5 hours ago
Assassino9931
23 minutes ago
Easy problem
Hip1zzzil   2
N 24 minutes ago by aidan0626
$(C,M,S)$ is a pair of real numbers such that

$2C+M+S-2C^{2}-2CM-2MS-2SC=0$
$C+2M+S-3M^{2}-3CM-3MS-3SC=0$
$C+M+2S-4S^{2}-4CM-4MS-4SC=0$

Find $2C+3M+4S$.
2 replies
Hip1zzzil
4 hours ago
aidan0626
24 minutes ago
Train yourself on folklore NT FE ideas
Assassino9931   2
N 36 minutes ago by bo18
Source: Bulgaria Spring Mathematical Competition 2025 9.4
Determine all functions $f: \mathbb{Z}_{>0} \to \mathbb{Z}_{>0}$ such that $f(a) + 2ab + 2f(b)$ divides $f(a)^2 + 4f(b)^2$ for any positive integers $a$ and $b$.
2 replies
1 viewing
Assassino9931
5 hours ago
bo18
36 minutes ago
When is this well known sequence periodic?
Assassino9931   2
N 42 minutes ago by Assassino9931
Source: Bulgaria Spring Mathematical Competition 2025 12.2
Determine all values of $a_0$ for which the sequence of real numbers with $a_{n+1}=3a_n - 4a_n^3$ for all $n\geq 0$ is periodic from the beginning.
2 replies
Assassino9931
4 hours ago
Assassino9931
42 minutes ago
Concurrence of angle bisectors
proglote   65
N an hour ago by smbellanki
Source: Brazil MO #5
Let $ABC$ be an acute triangle and $H$ is orthocenter. Let $D$ be the intersection of $BH$ and $AC$ and $E$ be the intersection of $CH$ and $AB$. The circumcircle of $ADE$ cuts the circumcircle of $ABC$ at $F \neq A$. Prove that the angle bisectors of $\angle BFC$ and $\angle BHC$ concur at a point on $BC.$
65 replies
proglote
Oct 20, 2011
smbellanki
an hour ago
IRAN national math olympiad(3rd round)-2010-NT exam-p6
goodar2006   4
N Mar 27, 2025 by john0512
$g$ and $n$ are natural numbers such that $gcd(g^2-g,n)=1$ and $A=\{g^i|i \in \mathbb N\}$ and $B=\{x\equiv (n)|x\in A\}$(by $x\equiv (n)$ we mean a number from the set $\{0,1,...,n-1\}$ which is congruent with $x$ modulo $n$). if for $0\le i\le g-1$
$a_i=|[\frac{ni}{g},\frac{n(i+1)}{g})\cap B|$
prove that $g-1|\sum_{i=0}^{g-1}ia_i$.( the symbol $|$ $|$ means the number of elements of the set)($\frac{100}{6}$ points)

the exam time was 4 hours
4 replies
goodar2006
Aug 9, 2010
john0512
Mar 27, 2025
IRAN national math olympiad(3rd round)-2010-NT exam-p6
G H J
G H BBookmark kLocked kLocked NReply
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
goodar2006
1347 posts
#1 • 2 Y
Y by Adventure10, Mango247
$g$ and $n$ are natural numbers such that $gcd(g^2-g,n)=1$ and $A=\{g^i|i \in \mathbb N\}$ and $B=\{x\equiv (n)|x\in A\}$(by $x\equiv (n)$ we mean a number from the set $\{0,1,...,n-1\}$ which is congruent with $x$ modulo $n$). if for $0\le i\le g-1$
$a_i=|[\frac{ni}{g},\frac{n(i+1)}{g})\cap B|$
prove that $g-1|\sum_{i=0}^{g-1}ia_i$.( the symbol $|$ $|$ means the number of elements of the set)($\frac{100}{6}$ points)

the exam time was 4 hours
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mmaht
204 posts
#2 • 2 Y
Y by Adventure10, Mango247
still no solution?! :)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6870 posts
#5 • 7 Y
Y by Mathematicsislovely, mijail, v4913, Mango247, Mango247, Mango247, Tastymooncake2
Solution from Twitch Solves ISL:

Let $e > 0$ denote the order of $g$ modulo $n$. Also, by $a \% n$ we mean the remainder when $a$ is divided by $n$.
The main observation is that an element $b \in B$ will fall in the $\left\lfloor \frac{g \cdot b}{n} \right\rfloor$'th interval, and contribute that amount to the sum given in the problem. This gives the first equality in the following calculation: \begin{align*} 	\sum i a_i 	&= \sum_{b \in B} 	\left\lfloor \frac{g \cdot b}{n} \right\rfloor \\ 	&= \sum_{k=0}^{e-1} 	\left\lfloor \frac{g \cdot (g^k \% n)}{n} \right\rfloor \\ 	&= \sum_{k=0}^{e-1}  	\frac{g \cdot (g^k \% n) - \left( g \cdot (g^k \% n) \right) \% n}{n} \ \end{align*}We may now take modulo $g-1$, noting that $g \equiv 1 \pmod{g-1}$ and $n$ is relatively prime to $g-1$, hence \begin{align*} 	\sum i a_i 	&= \sum_{k=0}^{e-1}  	\frac{(g^k \% n) - \left( g^{k+1} \% n \right)}{n} \pmod{g-1} \\ 	&= 0 \end{align*}as desired, with the sum telescoping.
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
#6
Y by
The idea is to do a kind of double counting: every residue $g^k \bmod n$ contributes a weight of $$w_k = \left \lfloor \frac{\left(g^k - n\left \lfloor \frac{g^k}n\right \rfloor\right)g}n \right \rfloor.$$(This corresponds to the contribution to the $ia_i$-term in the interval which $g^k$ is present.) Let $r$ be the order of $g$ modulo $n$. Hence the sum we are looking for is
\begin{align*}
S& = \sum_{k=1}^r \left \lfloor \frac{g^{k+1}}n \right \rfloor - g \left \lfloor \frac{g^k}n \right \rfloor\\
&= \frac 1n \sum_{k=1}^r (g^{k+1} - g^{k+1} \bmod n) - (g^{k+1} - g \cdot g^k \bmod n) \\
&\equiv \sum_{k=1}^r g^k \bmod n - g^{k+1} \bmod n \pmod {g-1} \\
&\equiv g^r \bmod n - g^1 \bmod n \\
&\equiv 1-g \equiv 0 \pmod {g-1}.
\end{align*}This finishes the proof.
This post has been edited 1 time. Last edited by HamstPan38825, Dec 28, 2023, 9:03 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4175 posts
#8
Y by
Let $r$ be the order of $g$ mod $n$. For the rest of the solution, we let $a\pmod{b}$ denote the remainder when $a$ is divided by $b$. We wish to find
$$\sum_{i=0}^{r-1} \lfloor (g^i\pmod{n})\cdot\frac{g}{n}\rfloor$$$$\sum_{i=0}^{r-1} \frac{g\cdot (g^i\pmod{n})-(g\cdot (g^i\pmod{n}))\pmod{n}}{n}$$$$\sum_{i=0}^{r-1} \frac{g\cdot (g^i\pmod{n})-g^{i+1}\pmod{n}}{n}.$$This becomes a telescoping sum:
$$\frac{g(g^0\pmod{n})+(g-1)(g^1\pmod{n}+g^2\pmod{n}+\dots+g^{r-1}\pmod n)-g^r\pmod{n}}{n}.$$Since $g(g^0\pmod n)-g^r\pmod n=g-1$, the numerator is divisible by $g-1$, and since $n$ is also relatively prime to $g-1$, we are done.
Z K Y
N Quick Reply
G
H
=
a