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
Algebra Functions
pear333   1
N 7 minutes ago by whwlqkd
Let $P(z)=z-1/z$. Prove that there does not exist a pair of rational numbers $x,y$ such that $P(x)+P(y)=4$.
1 reply
pear333
Today at 12:20 AM
whwlqkd
7 minutes ago
Polynomial equation with rational numbers
Miquel-point   2
N 11 minutes ago by Assassino9931
Source: Romanian TST 1979 day 2 P1
Determine the polynomial $P\in \mathbb{R}[x]$ for which there exists $n\in \mathbb{Z}_{>0}$ such that for all $x\in \mathbb{Q}$ we have: \[P\left(x+\frac1n\right)+P\left(x-\frac1n\right)=2P(x).\]
Dumitru Bușneag
2 replies
Miquel-point
Apr 15, 2023
Assassino9931
11 minutes ago
Area problem
MTA_2024   0
14 minutes ago
Let $\omega$ be a circle inscribed inside a rhombus $ABCD$. Let $P$ and $Q$ be variable points on $AB$ and $AD$ respectively, such as $PQ$ is always the tangent line to $\omega$.
Prove that for any position of $P$ and $Q$ the area of triangle $\triangle CPQ$ is the same.
0 replies
MTA_2024
14 minutes ago
0 replies
Geometry
srnjbr   0
27 minutes ago
In triangle ABC, D is the leg of the altitude from A. l is a variable line passing through D. E and F are points on l such that AEB=AFC=90. Find the locus of the midpoint of the line segment EF.
0 replies
srnjbr
27 minutes ago
0 replies
No more topics!
A function equation
YaWNeeT   8
N Yesterday at 4:00 AM by HamstPan38825
Source: 2017 Taiwan TST 2nd round day 2 P4
Find all integer $c\in\{0,1,...,2016\}$ such that the number of $f:\mathbb{Z}\rightarrow\{0,1,...,2016\}$ which satisfy the following condition is minimal:
(1) $f$ has periodic $2017$
(2) $f(f(x)+f(y)+1)-f(f(x)+f(y))\equiv c\pmod{2017}$

Proposed by William Chao
8 replies
YaWNeeT
Apr 15, 2017
HamstPan38825
Yesterday at 4:00 AM
A function equation
G H J
Source: 2017 Taiwan TST 2nd round day 2 P4
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaWNeeT
64 posts
#1 • 5 Y
Y by v_Enhance, ThE-dArK-lOrD, crazyeyemoody907, Adventure10, Mango247
Find all integer $c\in\{0,1,...,2016\}$ such that the number of $f:\mathbb{Z}\rightarrow\{0,1,...,2016\}$ which satisfy the following condition is minimal:
(1) $f$ has periodic $2017$
(2) $f(f(x)+f(y)+1)-f(f(x)+f(y))\equiv c\pmod{2017}$

Proposed by William Chao
This post has been edited 4 times. Last edited by YaWNeeT, Apr 13, 2018, 1:18 PM
Reason: meow
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
USJL
528 posts
#2 • 1 Y
Y by Adventure10
Answer
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6857 posts
#3 • 3 Y
Y by v4913, crazyeyemoody907, Adventure10
問一下, "2nd round day 2" 是指獨立研究第二天,還是模擬競賽第二天?

I think this problem was proposed by GSJL.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaWNeeT
64 posts
#4 • 3 Y
Y by v_Enhance, Adventure10, Mango247
模擬競賽,以前AoPS上的Taiwan TST好像都是用Quiz代表獨研,Day代表模競,所以我才寫Day 2 XDD
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaWNeeT
64 posts
#5 • 2 Y
Y by v_Enhance, Adventure10
solution
This post has been edited 1 time. Last edited by YaWNeeT, Apr 19, 2017, 2:20 AM
Reason: my poor English
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pad
1671 posts
#6 • 5 Y
Y by hellomath010118, Nuterrow, crazyeyemoody907, chystudent1-_-, Lcz
The answer is $c=1,2016,1008,1009$. Work entirely in $\mathbb{F}_{2017}$. Let $P(x,y)$ denote the FE.
Claim: For $c=1$ and $c=2016$, we must have $f(z)=cz+C$ for some constant $C$.

Proof: Suppose $c=1$. Then $P(x,0)$ gives $f(f(x)+f(0)+1) = f(f(x)+f(0))+1$. Adding $f(0)$ to both sides and letting $g(x)=f(x)+f(0)$ makes this $g(g(x)+1) = g(g(x))+1$, i.e. \[ y \in \text{Im}(g) \implies g(y+1)=g(y)+1. \](For $c=2016$, this is analogously $g(y+1)=g(y)-1$, and the following argument is very similar with this adjustment.)

Now, consider a graph $G$ with vertices $0,1,\ldots,2016$ and draw an arrow $z\to z+1$ iff $z\in \text{Im}(g)$. Consider the maximal consecutive subsequence in the set $\text{Im}(g)$ and call it $a,a+1,\ldots,b$; this is a maximal path of $G$. Note that $g(a),g(a+1),\ldots,g(b) \in \text{Im}(g)$, and \[ g(a+1)=g(a)+1, \ g(a+2)=g(a+1)+1, \ \ldots, \  g(b+1)=g(b)+1.\]Hence $g(a),\ldots,g(b+1)$ is also a path in $G$. But it is longer, contradicting maximality. Therefore, $G$ has no paths.

Since the image is nonempty, $G\not = \emptyset$, hence it has a cycle. If $k$ is the length of the cycle, we need $g(a+k)=g(a)$, i.e. $g(a)+k=g(a)$, so we must have $k=2017$. Therefore, $G=C_{2017}$. But this means $g$ is surjective, since it hits every element; hence $\text{Im}(g) = \{0,1,\ldots,2016\}$. Therefore, $g(y+1)=g(y)+1$ for all $y$, which means $g(y)=y+C$ for some constant $C$, as claimed. $\blacksquare$

Claim: For $c=1008$ and $c=1009$, we must have $f(z)=cz+C$ for some constant $C$.

Proof: WLOG $c=1009$ (the case $c=1008$ is very similar). Using the same setup as the previous claim, consider instead the maximal path for $g(2z)$, operating $g$ twice changes the $+1009$ to a $+1$. $\blacksquare$

A corollary of the claim is that there are exactly 2017 such functions for $c= \pm 1, \pm 1008$. Using this information, we can eliminate all the bad $c$.
Claim: For a fixed $c\not \in \{1,2016,1008,1009\}$, there are more than 2017 functions that work.

Proof: Note that $P(x,y)$ rewrites as \[ f(z+1) = f(z) + c, \ \  \forall z \in \text{Im}(f) + \text{Im}(f). \]If $c=0$, take $\text{Im}(f)=\{0,1\}$ and $f(0)=f(1)=1$ and all others 0. Else, take $\text{Im}(f)=\{0,c\}$, so that $\text{Im}(f) + \text{Im}(f)=\{0,c,2c\}$. So we must have $f(1)=f(0)+c$, $f(c+1)=f(c)+c$, and $f(2c+1)=f(2c)+c$. Hence \[ f(1)=f(c+1)=f(2c+1)=c, \qquad f(0)=f(c)=f(2c)=0\]since the narrow image of $f$ forces this. This works since $\{0,1,c,c+1,2c,2c+1\}$ are pairwise distinct by our assumption about $c$. Now, there are $2^{2011}>2017$ options for all the other values of $f$; these all work since the only restrictions were on the determined 6 values of $f$. $\blacksquare$

Remarks
This post has been edited 1 time. Last edited by pad, Sep 1, 2020, 1:16 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
i3435
1349 posts
#7
Y by
Initially I thought ans was only $c=1$, oops. Work $\bmod 2017$. The answer is $c=1,-1,\frac{1}{2},-\frac{1}{2}$. Let $P(x,y)$ be the FE.

The FE always has the solution $f(x)=cx+d$ for any $d$, so there are at least 2017 solutions. For $c\neq 1,-1,\frac{1}{2},-\frac{1}{2}$, we can show that there exists an additional solution. If $c=0$, then the solution $f(x)=0$ if $x\neq 69$ and $f(x)=1$ if $x=69$ works. If $c\neq 0$, then let $f(0)=f(c)=f(2c)=0$ and let the other outputs of $f$ be $c$.

This above construction hinges on the fact that $0,c,2c,1,c+1,2c+1$ are all distinct. I give an outline that if $c=1,-1,\frac{1}{2},-\frac{1}{2}$, the FE only has the linear solutions.

Suppose $k$ is the largest integer such that $f(a),f(a+1),\dots ,f(a+k)$ is an arithmetic sequence with common difference $c$ for these $c$. Then by considering $P(f(a+k),f(a+k)),P(f(a+k),f(a+k-1)),P(f(a+k-1),f(a+k-1)),\dots , P(f(a),f(a))$, if $k\neq 2017$ then $k$ is not maximal. However if $k$ is $2017$, then the function is linear, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1484 posts
#8
Y by
We claim that the values of $c$ are $1$, $1008$, $1009$, and $2016$.

Define $c \cdot g(x) = f(x)$ such

\[
	g(c \cdot (g(x) + g(y)) + 1) \equiv g(c \cdot (g(x) + g(y))) + 1 \pmod{2017}
\]
It remains to find the number of functions of the form $g$.

Let $I$ be the image, and define
\[
	S = \{c(i_1 + i_2) \mid i_1, i_2 \in I\}
\]Then, for $s \in S$,
\[
	f(s + 1) \equiv f(s) + 1 \pmod{2017}
\]
Claim: If $c = 1, 1008, 1009, 2016$, then there are only $2017$ possible functions.

Proof: There exists a $k$ such $f(k + 1) \equiv f(k) + 1 \pmod{2017}$. Then, $I$ contains $f(k)$ and $f(k) + 1$ so $S$ contains $cf(k), cf(k) + c, 2f(k) + 2c$.

We can repeat this, as $n$ consecutive values in $I$ implies $n$ consecutive values in $S$, and $n$ consecutive values in $S$ implies $n+1$ consecutive values in $I$.

This forces $f(x + 1) = f(x) + 1$ which eventually leaves exactly $2017$ functions of the form $f(x) = x + c$.

We now construct a counter example for other $c$.

Let $I = \{0, 1\}$ so $S = \{0, c, 2c\}$, none of which are consecutive. Then set $f(0) = f(c) = f(2c) = 0$,
$f(1) = f(c + 1) = f(2c + 1) = 1$, and the remaining values can be set arbitrarily, which leaves a result larger than $2017$.
This post has been edited 1 time. Last edited by YaoAOPS, Apr 29, 2023, 8:07 PM
Reason: spacing
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8844 posts
#9
Y by
The answers are $c \in \{1, 1008, 1009, 2016\}$. In fact, we will prove the following assertion:

Claim: If $c \in \{1, 1008, 1009, 2016\}$, the only functions that work are the linear functions $f(n) \equiv cn + b \pmod {2017}$.

Proof: Let $S$ denote the range of $f$. For each nonnegative integer $k$, we let a chain of length $k$ denote a sequence $\{r, r+1, \dots, r+(k-1)\}$ of residues all in $S$. We will show that for every positive integer $k$, there is a chain of length $k$ in $S$, which will imply that $S = \mathbb F_{2017}$.

The proof goes by induction. For the base case, there clearly exists a chain of length one. For the inductive step, suppose that we have a chain of length $k-1$, say $\{r, r+1, \dots, r+(k-2)\}$. Then, let $n_i$ denote the residue such that $f(n_i) = r + i$ for each $0 \leq i \leq k-2$.

First, assume $c = \varepsilon \in \{-1, 1\}$. By the given condition,
\begin{align*}
f(2r+1) - f(2r) &= f(f(n_0) + f(n_0) + 1) - f(f(n_0) + f(n_0)) = \varepsilon \\
f(2r+2) - f(2r+1) &= f(f(n_0) + f(n_1) + 1) - f(f(n_0) + f(n_1)) = \varepsilon \\
\vdots &\phantom= \vdots \\
f(2r+2k-3) - f(2r+2k-4) &= f(f(n_{k-2}) + f(n_{k-2}) + 1) - f(f(n_{k-2}) + f(n_{k-2})) = \varepsilon.
\end{align*}So the sequence $\{f(2r), f(2r+1), \dots, f(2r+2k-3)\}$ is a chain of length $2k-2 \geq k-1$ for all $k \geq 2$.

Next, assume that $2c = \varepsilon \in \{-1, 1\}$, for the $c = \{1008, 1009\}$ case. Then, adding pairs of the equations above reads \[f(2r + 2i + 2) -f(2r + 2i) = 2c = \varepsilon\]for each $0 \leq i \leq k-3$. These $k-2$ equations yield that $\{f(2r), f(2r+2), \dots, f(2r+2k-4)\}$ is a chain of length $k-1$. Similarly, $\{f(2r+1), f(2r+3), \dots, f(2r+2k-3)\}$ is a chain of length $k-1$. In particular, $f(2r+1) = f(2r) + c$.

Applying the same process on both of these chains, we get a chain of length $k-1$ beginning at $f(2f(2r) + \varepsilon)$ given by $\{f(2f(2r) + 2i + \varepsilon)\}_{i=0}^{k-2}$ and a chain of length $k-1$ beginning at $f(2f(2r+1) - \varepsilon) = f(2f(2r) - \varepsilon)$ given by $\{f(2f(2r) + 2i - \varepsilon)\}_{i=0}^{k-2}$. Concatenating these chains yields a chain of length $k$, finally. $\blacksquare$

So now $S = \mathbb F_{2017}$, hence $S + S = \mathbb F_{2017}$, hence $f$ must be linear. $\blacksquare$

On the other hand, for any $c \not \in \{1, 1008, 1009, 2016\}$, the function $f$ defined by $f(2) = 1$, $f(3) = c+1$, $f(c+2) = 1$, $f(c+3) = c+1$, $f(2c+2) = 1$, $f(2c+3) = c+1$, and $f(n) = 1$ for $n$ not any of these values, noting that the inputs we designated are distinct, satisfies the condition, in addition to all classes of linear functions. Thus there are strictly more functions $f$ when $c \not \in \{1, 1008, 1009, 2016\}$, as needed.

Remark: This is really hard for problem 4. Seeing and proving the $c \in \{1008, 1009\}$ case is especially tricky; it's quite easy to miss and one doesn't see it until the end, and the inductive argument is a mess to write up.
Z K Y
N Quick Reply
G
H
=
a