---
title: Rainbow 3-Term Arithmetic Progressions
url: https://www.emergentmind.com/topics/rainbow-3-term-arithmetic-progressions
type: topic
---

# Rainbow 3-Term Arithmetic Progressions

A rainbow 3-term arithmetic progression (rainbow 3-AP) is a length-3 arithmetic progression in a finite set or group—typically the initial segment $[n]=\{1,2,\dots,n\}$ or a finite abelian group—where each element is assigned a distinct color under a specified coloring. Research on rainbow 3-term arithmetic progressions centers on the extremal colorings that guarantee the existence, absence, maximum number, or minimum forbidden structure of rainbow 3-APs, and the associated threshold parameters such as anti-van der Waerden numbers, rainbow numbers, and sub-Ramsey numbers.

## 1. Foundational Notions: Rainbow 3-APs and Extremal Parameters

A $k$-term arithmetic progression (k-AP) within $[n]$ is a set $\{a, a+d, a+2d, \dots, a+(k-1)d\}$ for $a\in \mathbb{N}$, $d\ge 1$, and $a+(k-1)d\le n$. For a finite abelian group $G$, a 3-AP is a triple $(x, x+d, x+2d)$.

Given a coloring $c : S \to \{1,2,\dots, r\}$ of a set $S$, a 3-AP is *rainbow* if $c(a)$, $c(a+d)$, and $c(a+2d)$ are all distinct.

Several extremal invariants govern the existence and quantitative behavior of rainbow 3-APs:
- **Anti-van der Waerden number** $aw(S, 3)$: The least $r$ such that every exact $r$-coloring of $S$ contains a rainbow 3-AP.
- **Rainbow number** $\mathrm{rb}(S, 3)$: The least $r$ such that every exact $r$-coloring of $S$ contains a rainbow solution to $x_1 + x_3 = 2x_2$.
- **Sub-Ramsey number** $f(n)$: The minimal $k$ such that there exists a coloring of $[n]$ with no rainbow 3-AP and each color appears on at most $k$ integers.
- **Rainbow-multiplicity**: The maximum (or proportion) of rainbow 3-APs attainable in a $r$-coloring of $S$.

These parameters are typically studied in the integer interval $[n]$, the cyclic group $\mathbb{Z}_n$, or more general finite abelian groups $G$.

## 2. Exact and Asymptotic Results for Anti-van der Waerden Numbers

For $[n]$, Butler et al. established tight asymptotic bounds $\lceil\log_3 n\rceil + 2 \le aw([n],3) \le \lceil\log_2 n\rceil + 1$ and conjectured that $aw([n],3) \le \lceil\log_3 n\rceil + C$ for some absolute constant $C$ [1404.7232]. This was resolved exactly by determining $aw([n],3)$ for all $n$:

For $7\cdot 3^{m-2}+1 < n \le 21\cdot 3^{m-2}$,
\[
aw([n],3) = \begin{cases}
m+2 & n=3^m \\
m+3 & n\ne 3^m
\end{cases}
\]
where $m$ is (uniquely) chosen such that $n$ lies in the above "window" [1604.08819]. Thus, $aw([n],3)$ behaves as a step function, with increments linked to the powers of 3, establishing that the minimal threshold differs from $\lceil \log_3 n\rceil$ by at most $3$. This exact value is critical for anti-Ramsey theory and has direct implications in coding theory and the study of pattern-forcing structures.

For the cyclic group $\mathbb{Z}_n$, the behavior diverges due to wrap-around. Jungić et al. showed $aw(\mathbb{Z}_{2^m},3)=3$ for all $m$, and $aw(\mathbb{Z}_n,3)$ can be computed from the $aw(\mathbb{Z}_p,3)$ over the prime factors $p$ of $n$ [1404.7232], specifically:
\[
aw(\mathbb{Z}_n,3) = 2 + f_2(n) + f_3(n) + 2f_4(n)
\]
where $f_2(n)$ is 1 if $n$ is even, $f_3(n)$ counts the (multi)set of odd $p$ with $aw(\mathbb{Z}_p,3)=3$, $f_4(n)$ counts those with $aw(\mathbb{Z}_p,3)=4$. This formula is also generalized to arbitrary finite abelian groups via the decomposition into 2-parts and odd-parts, with a further reduction for the unitary anti-van der Waerden number [1603.08153].

## 3. Rainbow-Free Colorings: Structure and Enumeration

A central theme is the classification and enumeration of rainbow-3-AP-free colorings. Hypergraph container methods have shown that for any fixed $r\ge 3$, the number of rainbow-3-AP-free $r$-colorings of $[n]$, denoted $g_{r,3}([n])$, satisfies
\[
g_{r,3}([n]) = \binom{r}{2}2^n + o(2^n)
\]
and almost all such colorings use only two colors [2203.12735, 2102.08995]. The extremal structure is thus dominated by the 2-colorings, and general container methods yield a sharp "almost all" dichotomy for large $n$.

For finite abelian groups, Montejano–Serra gave a full structural description: every rainbow-free 3-coloring is, up to translation, induced from a coloring on a proper subgroup $H$, with the color classes outside $H$ being unions of $H$-cosets satisfying strong symmetry conditions (invariance under inversion and doubling), settling a standing conjecture [1104.0194].

## 4. Maximum and Minimum Rainbow 3-APs and Related Extremal Phenomena

The maximization of rainbow 3-APs under 3-colorings was addressed quantitatively: for $[n]$, the modular coloring $f(x) = x \bmod 3$ attains the proportion
\[
rb_{[n]}(x+y=2z) \ge \frac{2}{3} + o(1)
\]
of all ordered solutions $(x, y, z)$ [2601.05442]. The same modular residue coloring is extremal in both $[n]$ and $\mathbb{Z}_n$ when $n$ is a multiple of 3. In contrast, random colorings yield only $2/9$ fraction rainbow 3-APs, so explicit colorings can achieve a much larger density.

On the minimization side, sub-Ramsey numbers for color class sizes yield $f(n) = (8/17)n + O(1)$, with an explicit, unique extremal coloring based on a 17-periodic residue structure that avoids all rainbow 3-APs [1605.06570].

## 5. Rainbow Coverage, Universal Sequences, and Partial Colorings

A complementary class of problems addresses the minimal length or structure needed to "cover" all color triples by rainbow 3-APs. The least $N=ac(n,3)$ such that every 3-subset of $[n]$ is realized as a rainbow 3-AP in some coloring $f:[N]\to[n]$, satisfies
\[
ac(n,3) = O(\log n \cdot n^{3/4})
\]
via probabilistic "first moment" analysis, though the trivial lower bound is $\Omega(n^{3/2})$, indicating a substantial gap [1802.03285].

Separately, allowing partial colorings of $A\subseteq [n]$ of size $|A| \ge n-n^{\alpha}$ for $\alpha<1$, Pach–Tomon showed that all 3-APs in $A$ can be made rainbow with as few as $n^{\beta}$ colors for any $\beta<1$ [1912.07470].

## 6. Open Problems and Future Directions

Key open questions persist in several directions:
- **Higher-term progression thresholds**: For $k\geq 4$, anti-van der Waerden numbers grow much faster, $aw([n],k)=n^{1-o(1)}$, and sharp constants or finer step-structure remain open [1404.7232].
- **Primes with extremal behavior**: Classification of primes $p$ for which $aw(\mathbb{Z}_p,3)=3$ is tied to deep questions in multiplicative combinatorics (orders of $2$ mod $p$ and Artin's conjecture) [1404.7232].
- **Generalizations to other settings**: Extensions include higher-dimensional grids, nonabelian groups, and other linear equations.
- **Structure and uniqueness of extremal colorings**: For both maximum multiplicity and minimum forbidden structures, the uniqueness and stability of explicit modular or pattern colorings is an area of active study.

The theory of rainbow 3-term arithmetic progressions links anti-Ramsey theory, additive combinatorics, and extremal coloring problems, and serves as a unifying model for pattern-avoidance and universality phenomena in finite discrete structures.

---

**References:**
- "Anti-van der Waerden numbers of 3-term arithmetic progressions" [1604.08819]
- "Rainbow arithmetic progressions" [1404.7232]
- "Rainbow Arithmetic Progressions in Finite Abelian Groups" [1603.08153]
- "Rainbow-free 3-colorings of Abelian Groups" [1104.0194]
- "Sub-Ramsey numbers for arithmetic progressions" [1605.06570]
- "Colorings with only rainbow arithmetic progressions" [1912.07470]
- "Integer colorings with no rainbow $k$-term arithmetic progression" [2203.12735]
- "Bounds on Arithmetic Rainbow Ramsey Multiplicities" [2601.05442]
- "On sequences covering all rainbow $k$-progressions" [1802.03285]
- "Rainbow Numbers of $\mathbb{Z}_n$ for $a_1x_1+a_2x_2+a_3x_3 =b$" [1905.06296]
- "Rainbow numbers for $x_1+x_2=kx_3$ in $\mathbb{Z}_n$" [1809.04576]
- "Integer colorings with no rainbow 3-term arithmetic progression" [2102.08995]

Source: https://www.emergentmind.com/topics/rainbow-3-term-arithmetic-progressions