# Generalised core partitions and Diophantine equations

Olivier Brunat, Nathan Chapelier-Laget, Thomas Gerber

► To cite this version:

Olivier Brunat, Nathan Chapelier-Laget, Thomas Gerber. Generalised core partitions and Diophantine equations. 2024. hal-04507916

HAL Id: hal-04507916

https://hal.science/hal-04507916v1

Preprint submitted on 17 Mar 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Generalised core partitions and Diophantine equations

Olivier Brunat*, Nathan Chapelier-Laget†, Thomas Gerber‡

## Abstract

We study generalised core partitions arising from affine Grassmannian elements in arbitrary Dynkin type. The corresponding notion of size is given by the atomic length in the sense of [CLG22]. In this paper, we first develop the theory for extended affine Weyl groups. In a series of applications, we give some remarkable parametrisations of the solutions of certain Diophantine equations resembling Pell's equation, by refining the results of [BN22] and [Alp14], and generalising them to further types.

## Contents

<table><tr><td>Introduction</td><td>1</td></tr><tr><td>1 Kac-Moody algebras, Weyl groups and other generalities</td><td>4</td></tr><tr><td>2 Extending the atomic length</td><td>11</td></tr><tr><td>3 Affine and extended affine Grassmannian</td><td>14</td></tr><tr><td>4 Extended atomic length in type A<sub>n</sub><sup>(1)</sup> and C<sub>n</sub><sup>(1)</sup></td><td>17</td></tr><tr><td>5 Type A<sub>n</sub><sup>(1)</sup>: core size and atomic length</td><td>22</td></tr><tr><td>6 Combinatorial models for generalised cores</td><td>25</td></tr><tr><td>7 Pell-type equations and group actions</td><td>29</td></tr><tr><td>8 Solution sets via generalised cores</td><td>33</td></tr></table>

## Introduction

### The ubiquity of core partitions

The study of core partitions, those integer partitions with no hooks of a given size, is a recurring theme in algebraic combinatorics. Over the years, it has provided striking links between different fields of mathematics such as

* representation theory, originally via the Nakayama conjecture [Bra47, dBR47] which paved the way to investigating block theory for symmetric groups [JK84] and related algebraic structures such as Hecke algebras [GP00, Fay06, GJ11], finite groups of Lie type [FS82, Ols86],

* enumerative combinatorics, for instance via the various generalisations and interpretations of the Rogers-Ramanujan identities [AE04, Gor61, And74, Bre79, GKS90, HS96a, Che13]; or via some famous enumeration results [GO96, And02, Han10, HO11, Joh18]

* number theory, via the study of certain modular forms arising from the generating series of core partitions [GO96, HS96b, HS99] and relationships with certain Diophantine equations [OS97, HN13, Alp14].

Recently, there has been some exciting developments in all of these directions, for instance with the study of blocks for cyclotomic Hecke algebras [JL21, CJ23]; generalisations of classical enumeration results [Fay19, STW23]; or the explicit parametrisation of the solutions of certain Pell-type equations [BN22], see also [MS23]. All of these results rely on a careful study of the combinatorics of cores, either in their classical definition or as a natural generalisation. In particular, the notion of (generalised) size of a (generalised) core plays an essential role.

<footnote>* Université Paris Diderot - Paris 7 75013 Paris, France. Email address: olivier.brunat@imj-prg.fr</footnote>

<footnote>† University of Sydney, Camperdown NSW 2050, Australia. Email address: nathan.chapelier@gmail.com</footnote>

<footnote>‡ Ruhr-Universität Bochum, Universitätstraße 150, 44801 Bochum, Germany. Email address: thomas.gerber@epfl.ch</footnote>
## The atomic length: a new approach to core partitions

In previous work, the last two authors have introduced a statistic, called the *atomic length*, defined on the Weyl group attached to a Kac-Moody algebra of given finite or affine type [CLG22]. This approach, representation-theoretic by nature, enables us to define "cores" and their corresponding "size" in great generality and in a very natural fashion. Moreover, it was shown that these notions recover previous constructions in the literature [GKS90, Las01, STW23] by specialising the parameters appropriately. For instance, one recovers the usual $(n+1)$-core partitions and their size by simply considering the type $A_n^{(1)}$ and the fundamental weight $\Lambda_0$.

In arbitrary type, specialising at $\Lambda_0$ gives the so-called *affine Grassmannian* elements, which we will therefore call "generalised cores" in what follows. This follows the philosophy of [STW23]. Actually, we will catch a glimpse of the relevance of the general $\Lambda$-atomic length by focusing, in type $C_2^{(1)}$, on the other fundamental case $\Lambda = \Lambda_1$.

In [CLG22], much of the study focused on Kac-Moody algebras of *finite* types. This culminated in an analogue of the famous Granville-Ono theorem [GO96] for all finite Dynkin types. The case of *affine* Kac-Moody algebras was initiated, but not extensively investigated.

The first main objective of this paper is to give a definition of the atomic length on the *extended affine Weyl group*, which we will call *extended atomic length* (this the subject of Section 2.3). Using both the decomposition of the extended affine Weyl group as the semidirect product of the finite Weyl group with the coweight lattice and as the semidirect product of the fundamental group with the affine Weyl group, we show that in types $A_n^{(1)}$ and $C_n^{(1)}$, which are thoroughly investigated in this paper, the atomic length admits the following remarkable property (see resp. Theorem 4.7 and Theorem 4.11).

> The fundamental group is the set of extended affine Grassmannian elements with $\Lambda_0$-atomic length equal to 0.

It would be very interesting to establish this property in other types too.

## Labelling solutions of Pell-type equations by generalised cores

The second goal of this paper is to demonstrate a striking application of this theory: in several Dynkin types of small rank, the generalised cores parametrise the solutions of certain Pell-type Diophantine equations, namely

* in type $A_2^{(1)}$, this was proved in [BN22], which we recall in Theorem 8.2,

* in type $C_2^{(1)}$, see Theorem 8.8,

* in type $C_2^{(1)}$ for a second, complementary equation, see Theorem 8.12,

* in type $D_3^{(2)}$, see Theorem 8.17,

* in type $D_4^{(3)}$, see Theorem 8.27.

These results, all in rank 2, rely on the same following mechanism.

**Step 1** Consider the Diophantine equation of the form

$$x^2 + dy^2 = k \qquad (1)$$

where $d \in \{1, 3\}$ and $k$ has a certain fixed residue class (these will depend on the Dynkin type).

**Step 2** Endow the solution set of (1) with a *free action* of an appropriate finite group $G$.

**Step 3** Find an explicit map $\varphi$ that sends (extended) affine Grassmannian elements to solutions of (1).

**Step 4** Show that Im $(\varphi)$ is a *complete set of representatives* of the $G$-orbits.

Let us focus more closely on Equation (1) in the case $d = 1$. First, considering the affine Grassmannian elements in type $C_2^{(1)}$ of atomic length equal to $N$ (which are naturally in bijection with the self-conjugate 4-cores of
size $N$), we obtain a description of the solutions of the Diophantine equation $x^2 + y^2 = 8N + 5$ by the above process (see Theorem 8.8). In particular, this gives a simple bijective proof of an identity due to Alpoge [Alp14, Theorem 7]. Moreover, in contrast with Alpoge's approach, that requires involved number-theoretic methods, our proofs are quite elementary once the machinery of the atomic length is properly established. Secondly, using the atomic length associated with the fundamental weight $\Lambda_1$ in type $C_2^{(1)}$, we obtain a description of the solutions of the Diophantine equation $x^2 + y^2 = 8N + 1$ in terms of extended Grassmannian elements (see Theorem 8.12). Combining these two results, we obtain the following.

For any odd $k$, the solutions of $x^2 + y^2 = k$ are in correspondence with the (extended) affine Grassmannian elements of type $C_2^{(1)}$.

Note that, by Lemma 7.1, this gives a way to describe the solutions of $x^2 + y^2 = k$ for any positive integer $k$, which is of independent interest.

In addition, we can use the combinatorial description of the affine Grassmannian elements in terms of integer partitions of [STW23] and [LW24] to obtain neat enumeration corollaries in further Dynkin types: Corollary 8.18, Corollary 8.28. For Corollary 8.13, we ask for a similar combinatorial model.

Moreover, in type $A_n^{(1)}$ of small rank, we shed some light on the crank phenomenons revealed in [BN22] by using the extended atomic length on the extended affine Weyl group (Theorem 8.6). This gives a completely natural refinement of the parametrisation of the solutions of the associated Diophantine equations by using more involved group actions. In type $A_3^{(1)}$, this culminates in the combination of Propositions 8.41, 8.43, 8.44 where the structure of the integral solutions of the equation $x^2+2y^2+3z^2 = 48N+10$ arising from affine Grassmannian elements is elucidated. In fact, we expect to recover all the integral solutions by using an adequate group action on these elements, see Conjecture 8.45. We also expect this to be a fruitful approach in other Dynkin types, at least in small ranks.

## Structure of the paper

In Section 1, we recall the starting point of our theory, namely the construction of Weyl groups associated to an affine Kac-Moody algebra (or equivalently, a generalised Cartan matrix of affine type). We take advantage of this section to explain in detail which conventions and constructions are necessary in our setting, by referring mainly to Carter's book [Car05]. We also recall the definition and structure of the extended affine Weyl group.

Section 2 is concerned with the general study of the *affine atomic length* [CLG22] and its *extended version*, which we introduce here. This statistic depends on a parameter $\Lambda$ which is a dominant weight, but we will mainly focus on the case $\Lambda = \Lambda_0$ (and sometimes on the fundamental weight $\Lambda = \Lambda_i$, $i \ge 1$.) We establish new results that will be reinvested in subsequent sections, as the extended atomic length will naturally appear in some of our main results. We show in Theorem 2.4 that the extended affine atomic length is compatible with the semidirect decomposition of the extended affine Weyl group.

We devote Section 3 to the definition and properties of (extended) *affine Grassmannian* elements. In particular, we give some explicit bijections which will provide us with different ways to think about (extended) affine Grassmannian elements.

With this combinatorial picture in the back of our mind, we proceed in Section 4 to the study of the extended affine atomic length in types $A_n^{(1)}$ and $C_n^{(1)}$. Using detailed computations, we give explicit formulas which will be useful in the last part of the paper, in particular in Theorem 4.7 and Theorem 4.11.

In Section 5, we take a breath and summarise well-known results on the combinatorics of $(n+1)$-cores using their interpretation in the context of Kac-Moody algebras of type $A_n^{(1)}$, following essentially Lascoux's approach [Las01]. Though short, this section is important as it legitimises the definition of the generalised cores as the affine Grassmannian elements in arbitrary affine type.

We quickly explain in Section 6 how combinatorial models for generalised cores can be constructed by reviewing the recent results of [STW23] and [LW24]. These constructions are reminiscent of the type $A_n^{(1)}$ combinatorics, but looking at certain self-conjugate core partitions instead.

In Section 7, we temporarily forget about generalised cores and focus solely on the Pell-type equations that will naturally arise in Section 8 in the rank 2 cases, namely

$$x^2 + y^2 = k \quad \text{and} \quad x^2 + 3y^2 = k,$$

where $k$ has a fixed congruence class modulo a certain integer (which depends on the type). We first focus on the first equation and explain how this can be reduced to the case where $k = 1 \mod 4$. Then, we observe that
the solutions sets of these Diophantine equations are endowed with certain finite group actions, which turn out to be free under favourable arithmetic conditions. This is similar to the philosophy of cranks [GKS90] used recently in [BN22].

Finally, Section 8, which is by far the longest part of the paper, contains the majority of the main results. There, using the universal approach given by the atomic length on (extended) affine Weyl groups, we are able to label the solutions of families of Pell-type Diophantine equations by affine Grassmannians elements (of appropriate Dynkin type). In these favourable cases, we are even able to use the combinatorial models of Section 6 to give elegant analogues of [BN22, Alp14]. This is achieved in type $A_2^{(1)}$ (Theorem 8.2), $C_2^{(1)}$ (for two different Diophantine equations, Theorem 8.8 and Theorem 8.12), $D_3^{(2)}$ (Theorem 8.17) and $D_4^{(3)}$ (Theorem 8.27). Moreover, we use the theory of the extended atomic length developed in the previous sections to establish new results in types $A_2^{(1)}$ and $A_3^{(1)}$ (Theorem 8.6, Corollary 8.39) and formulate a conjecture for solving the $A_3^{(1)}$ case (Conjecture 8.45). For completeness, we finish with general considerations in cases where the underlying finite type is $B_n$ or $C_n$ (there are 5 such families), where the action of the hyperoctahedral group in dimension $n$ is considered.

## Perspectives

One can expect to get analogous parametrisations for further Diophantine equations, by playing around with the other degrees of freedom, namely by

* investigating the *other* Dynkin types of small rank, as initiated in Section 8.7 and Section 8.8,

* considering *more general weights* $\Lambda$. Indeed, our first try (in type $C_2^{(1)}$ for $\Lambda = \Lambda_1$) was very successful, see Section 8.2,

* using the *extended* atomic length, which has already paid off in Sections 8.1, 8.2, 8.7.

In turn, in order to get the most complete picture, it would be interesting to obtain combinatorial models (using partitions/abaci) for (extended) affine Grassmannian elements in the favourable cases.

# 1 Kac-Moody algebras, Weyl groups and other generalities

Let $A = (a_{ij})_{0 \le i,j \le n}$ be a generalised (symmetrisable) Cartan matrix such that the corresponding Kac-Moody algebra $\mathfrak{g}$ is of affine type. In particular, the rank of $A$ is $n$. There is a classification of these matrices into different Dynkin types, which we recall in Figure 1, alongside other important data whose definition we will recall below. The types with a superscript "(1)" are called *untwisted* (as opposed to the other *twisted* types), and coincide with the classic geometrical construction of affine Weyl groups, see for instance [Bou68].

Let $\mathfrak{h}$ be a real vector space of dimension $n + 2$ with dual space $\mathfrak{h}^*$ and $\Delta = \{\alpha_0, \dots, \alpha_n\} \subseteq \mathfrak{h}^*$, $\Delta^\vee = \{\alpha_0^\vee, \dots, \alpha_n^\vee\} \subseteq \mathfrak{h}$ be a realisation of $\mathfrak{g}$ (see [Kac84] for details), so that $\langle \alpha_j, \alpha_i^\vee \rangle = a_{ij}$, where $\langle \cdot, \cdot \rangle$ denotes the natural pairing between $\mathfrak{h}^*$ and $\mathfrak{h}$. Moreover, to each type, one associates positive integers $a_0, \dots, a_n$ and $a_0^\vee, \dots, a_n^\vee$ (given by the unique integer vector with no common factor in the kernel of $A$ and $A^t$ respectively). Note that in untwisted types, $a_1, \dots, a_n$ are the coefficients of the highest root in the basis of the simple roots $\alpha_1, \dots, \alpha_n$ [Car05, Definitions p. 252 and p. 485]. In almost each situation $a_0 = 1$, except for $A_{2n}^{(2)}$ where $a_0 = 2$.

**Remark 1.1.** In Figure 1, we have used a renormalisation of Bourbaki's standard realisation of finite root systems and of the corresponding lattices [Bou68, Car05]. This ensures that the norm of elements in $M$ (computed by the formula of Remark 1.2) coincides with the Euclidean norm.

Write $V_0 = \bigoplus_{i=1}^n \mathbb{R}\alpha_i$ and $V = V_0 \oplus \mathbb{R}\alpha_0$ together with $V_0^* = \bigoplus_{i=1}^n \mathbb{R}\alpha_i^\vee$ and $V^* = V_0^* \oplus \mathbb{R}\alpha_0^\vee$. The space $V$ is equipped with a symmetric bilinear form $(\cdot, \cdot)$ determined by the formulas

$$ (\alpha_i | \alpha_j) = a_i^\vee a_i^{-1} a_{ij} \text{ for } i, j \neq 0, \quad (\delta | \alpha_i) = 0 \text{ for } i \neq 0 \quad \text{and} \quad (\delta | \delta) = 0. $$

**Remark 1.2.** Note that the formulas above completely determine the values of $(\alpha_i | \alpha_j)$. In particular, the squared norm of a simple root is given by $|\alpha_i|^2 = 2 \frac{a_i^\vee}{a_i}$.

We now introduce the following important elements. The *Coxeter number* is

$$ h = \sum_{i=0}^{n} a_i. $$
We set

$$ \delta = \sum_{i=0}^{n} a_i \alpha_i \in V \quad \text{and} \quad c = \sum_{i=0}^{n} a_i^{\vee} \alpha_i^{\vee} \in V^* $$

and we define

$$ \theta = \delta - a_0\alpha_0 = \sum_{i=1}^{n} a_i\alpha_i \in V_0. $$

Depending on the Dynkin type, $\theta$ is either the highest root or the highest short root of the underlying finite root system, see [Car05, Proposition 17.18] for details.

## 1.1 Weyl group associated to a Kac-Moody algebra

For $0 \le i \le n$, the reflections $s_i : \mathfrak{h}^* \to \mathfrak{h}^*$ given by the formula

$$ s_i(x) = x - \langle x, \alpha_i^{\vee} \rangle \alpha_i $$

generate a subgroup $W$ of $GL(\mathfrak{h}^*)$ called the *Weyl group* of $\mathfrak{g}$, more commonly called the affine Weyl group of $\mathfrak{g}$. The subgroup of $W$ generated by $s_1, \dots, s_n$ is called the *finite Weyl group* of $\mathfrak{g}$ and we denote it by $W_0$. In other words, $W_0$ is the Weyl group of the Cartan matrix $A_0$ obtained from $A$ by deleting the first row and the first column. The groups $W$ and $W_0$ are Coxeter groups with sets of generators respectively $S = \{s_0, s_1, \dots, s_n\}$ and $S_0 = \{s_1, \dots, s_n\}$. The group $W_0$ acts on $\Delta_0$ and we denote $\Phi = W_0(\Delta_0)$. The elements of $\Phi$ are called roots and each root $\beta$ decomposes uniquely as $\beta = \sum_{i=1}^n a_i \alpha_i$ with $a_i \in \mathbb{Z}$. The height of $\beta$ is the integer $\text{ht}(\beta) = \sum_{i=1}^n a_i$.

Let $\mathcal{O}_{W_0}$ be the $W_0$-orbit of the element $\frac{1}{a_0}\theta$. Following [Car05, Section 17.3, page 413]$^1$, we define now the lattice $M \subset V_0$ by

$$ M := \mathbb{Z}\mathcal{O}_{W_0}. \qquad (2) $$

In the setting of non-twisted affine Weyl groups $M$ is nothing but the coroot lattice.

For any element $x \in V_0$ we define the linear map $t_x \in \text{Hom}(\mathfrak{h}^*)$ (called the translation of $x$) by the formula

$$ t_x(v) := v + \langle v, c \rangle x - \left( (v | x) + \frac{1}{2} |x|^2 \langle v, c \rangle \right) \delta. \qquad (3) $$

Let $T(M)$ be the group of translations $t_q$ with $q \in M$. A convenient characterization of $W$ is given by

$$ W \simeq T(M) \rtimes W_0. $$

Therefore any element $w \in W$ decomposes uniquely as $w = t_q \overline{w}$ where $q \in M$ and $\overline{w} \in W_0$. In other words we have the following short split exact sequence

$$ 1 \longrightarrow T(M) \longrightarrow W \longrightarrow W_0 \longrightarrow 1. \qquad (4) $$

## 1.2 Alcoves

Consider the alcove geometry of $W$ in the sense in [Car05, Section 17.3]. Let us color the walls of all the alcoves as follows. First, color the walls of the fundamental alcove according to the hyperplanes defining it. Then, color the rest of the other alcove walls by successively reflecting the fundamental walls along all possible hyperplanes. It is clear that each alcove as a unique wall of color $i$, called an *i-wall*. The group $W$ acts regularly on the set of alcoves, giving therefore a bijection between $W$ and this set as follows

$$ w \mapsto \mathcal{A}_w, $$

where $\mathcal{A}_w := w\mathcal{A}_e$ and $\mathcal{A}_e$ is the fundamental alcove, see Figure 4. We have the following important property: for $w \in W$ and $0 \le i \le n$, $(ws_i)\mathcal{A}_e$ is the alcove obtained by reflecting the alcove $w\mathcal{A}_e$ along its *i*-wall. This leads us to define a right action on the set of alcoves (which is the geometrical interpretation of the right weak order) by setting

$$ \mathcal{A}_w s_i := \mathcal{A}_{ws_i} = (ws_i)\mathcal{A}_e. $$

We see that with this new action, we also have $\mathcal{A}_w = \mathcal{A}_e w$. Finally, we will need the *fundamental chamber* $C_0$, which is defined by

$$ C_0 = \{x \in V_0 \mid (x | \alpha_i) > 0 \forall i = 1, \dots, n\}. $$

<footnote n="1">¹ In [Car05], the notation used is $M^*$. We choose $M$ to simplify notation.</footnote>
<table><caption>Fig. 1: The different affine Kac-Moody types and associated important data. We have written $q = q_1\epsilon_1 + q_2\epsilon_2 + \dots$ for $q \in M$ in the penultimate column.</caption><thead><tr><th>Type</th><th>a<sub>0</sub>, a<sub>1</sub>, ..., a<sub>n</sub></th><th>a<sup>V</sup><sub>0</sub>, a<sup>V</sup><sub>1</sub>, ..., a<sup>V</sup><sub>n</sub></th><th>Weyl group</th><th>Simple roots realisation</th><th>Lattice M and its realisation</th><th>h</th></tr></thead><tbody><tr><td>A<sub>n</sub><sup>(1)</sup> n ≥ 1</td><td>1, 1, ..., 1</td><td>1, 1, ..., 1</td><td>A<sub>n</sub></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ n - 1</td><td>Zα<sub>1</sub> + ... + Zα<sub>n-1</sub> + Zα<sub>n</sub> =<br>{q ∈ Zε<sub>1</sub> + ... + Zε<sub>n+1</sub> | Σ<sub>1≤i≤n+1</sub> q<sub>i</sub> = 0}</td><td>n + 1</td></tr><tr><td>B<sub>n</sub><sup>(1)</sup> n ≥ 3</td><td>1, 1, 2, ..., 2, 2</td><td>1, 1, 2, ..., 2, 1</td><td>B<sub>n</sub></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ n - 1<br>α<sub>n</sub> = ε<sub>n</sub></td><td>Zα<sub>1</sub> + ... + Zα<sub>n-1</sub> + 2Zα<sub>n</sub> =<br>{q ∈ Zε<sub>1</sub> + ... + Zε<sub>n</sub> | Σ<sub>1≤i≤n</sub> q<sub>i</sub> even}</td><td>2n</td></tr><tr><td>C<sub>n</sub><sup>(1)</sup> n ≥ 2</td><td>1, 2, ..., 2, 1</td><td>1, 1, ..., 1, 1</td><td>C<sub>n</sub></td><td>α<sub>i</sub> = 1/√2 (ε<sub>i</sub> - ε<sub>i+1</sub>), 1 ≤ i ≤ n - 1<br>α<sub>n</sub> = √2ε<sub>n</sub></td><td>2Zα<sub>1</sub> + ... + 2Zα<sub>n-1</sub> + Zα<sub>n</sub> = √2Zε<sub>1</sub> + ... + √2Zε<sub>n</sub></td><td>2n</td></tr><tr><td>D<sub>n</sub><sup>(1)</sup> n ≥ 4</td><td>1, 1, 2, ..., 2, 1, 1</td><td>1, 1, 2, ..., 2, 1, 1</td><td>D<sub>n</sub></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ n - 1<br>α<sub>n</sub> = ε<sub>n-1</sub> + ε<sub>n</sub></td><td>Zα<sub>1</sub> + ... + Zα<sub>n-1</sub> + Zα<sub>n</sub> =<br>{q ∈ Zε<sub>1</sub> + ... + Zε<sub>n</sub> | Σ<sub>1≤i≤n</sub> q<sub>i</sub> even}</td><td>2n - 2</td></tr><tr><td>E<sub>n</sub><sup>(1)</sup> n = 6</td><td>1, 1, 2, 3, 2, 2, 1</td><td>1, 1, 2, 3, 2, 2, 1</td><td>E<sub>n</sub></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ n - 2<br>α<sub>n-1</sub> = ε<sub>n-2</sub> + ε<sub>n-1</sub></td><td>Zα<sub>1</sub> + ... + Zα<sub>n</sub> =<br>{q ∈ 1/2 Zε<sub>1</sub> + ... + 1/2 Zε<sub>8</sub> | q<sub>i</sub> - q<sub>j</sub> ∈ Z, 1 ≤ i, j ≤ 8,}<br>Σ<sub>1≤i≤n</sub> q<sub>i</sub> even, and q<sub>n</sub> = ... = q<sub>8</sub></td><td>12</td></tr><tr><td>n = 7</td><td>1, 1, 2, 3, 4, 2, 3, 2</td><td>1, 1, 2, 3, 4, 2, 3, 2</td><td></td><td>α<sub>n</sub> = -1/2 Σ<sub>1≤i≤8</sub> ε<sub>i</sub></td><td></td><td>18</td></tr><tr><td>n = 8</td><td>1, 2, 3, 4, 5, 6, 3, 4, 2</td><td>1, 2, 3, 4, 5, 6, 3, 4, 2</td><td></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ 2<br>α<sub>3</sub> = ε<sub>3</sub><br>α<sub>4</sub> = 1/2 (-ε<sub>1</sub> - ε<sub>2</sub> - ε<sub>3</sub> + ε<sub>4</sub>)</td><td>Zα<sub>1</sub> + Zα<sub>2</sub> + 2Zα<sub>3</sub> + 2Zα<sub>4</sub> =<br>{q ∈ Zε<sub>1</sub> + ... + Zε<sub>4</sub> | Σ<sub>1≤i≤4</sub> q<sub>i</sub> even}</td><td>30</td></tr><tr><td>F<sub>4</sub><sup>(1)</sup></td><td>1, 2, 3, 4, 2</td><td>1, 2, 3, 2, 1</td><td>F<sub>4</sub></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ 2<br>α<sub>3</sub> = ε<sub>3</sub><br>α<sub>4</sub> = 1/2 (-ε<sub>1</sub> - ε<sub>2</sub> - ε<sub>3</sub> + ε<sub>4</sub>)</td><td>Zα<sub>1</sub> + 3Zα<sub>2</sub> = {q ∈ Zε<sub>1</sub> + Zε<sub>2</sub> + Zε<sub>3</sub> | Σ<sub>1≤i≤3</sub> q<sub>i</sub> = 0}</td><td>12</td></tr><tr><td>G<sub>2</sub><sup>(1)</sup></td><td>1, 2, 3</td><td>1, 2, 1</td><td>G<sub>2</sub></td><td>α<sub>1</sub> = ε<sub>1</sub> - ε<sub>2</sub><br>α<sub>2</sub> = 1/3 (-2ε<sub>1</sub> + ε<sub>2</sub> + ε<sub>3</sub>)x</td><td></td><td>6</td></tr><tr><td>A<sub>2</sub><sup>(2)</sup></td><td>2, 1</td><td>1, 2</td><td>A<sub>1</sub></td><td>α<sub>1</sub> = √2(ε<sub>1</sub> - ε<sub>2</sub>)<br>α<sub>2</sub> = 1/3 (-2ε<sub>1</sub> + ε<sub>2</sub> + ε<sub>3</sub>)x</td><td>1/2 Zα<sub>1</sub> = {q ∈ √2 Zε<sub>1</sub> + √2 Zε<sub>2</sub> | q<sub>1</sub> + q<sub>2</sub> = 0}</td><td>3</td></tr><tr><td>A<sub>2n-1</sub><sup>(2)</sup> n ≥ 3</td><td>1, 1, 2, ..., 2, 1</td><td>1, 1, 2, ..., 2, 2</td><td>C<sub>n</sub></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ n - 1<br>α<sub>n</sub> = 2ε<sub>n</sub></td><td>Zα<sub>1</sub> + ... + Zα<sub>n-1</sub> + Zα<sub>n</sub> =<br>{q ∈ Zε<sub>1</sub> + ... + Zε<sub>n</sub> | Σ<sub>1≤i≤n</sub> q<sub>i</sub> even}</td><td>2n - 1</td></tr><tr><td>D<sub>n+1</sub><sup>(2)</sup> n ≥ 2</td><td>1, 1, ..., 1, 1</td><td>1, 2, ..., 2, 1</td><td>B<sub>n</sub></td><td>α<sub>i</sub> = √2(ε<sub>i</sub> - ε<sub>i+1</sub>), 1 ≤ i ≤ n - 1<br>α<sub>n</sub> = √2ε<sub>n</sub></td><td>Zα<sub>1</sub> + ... + Zα<sub>n-1</sub> + Zα<sub>n</sub> = √2Zε<sub>1</sub> + ... + √2Zε<sub>n</sub></td><td>n + 1</td></tr><tr><td>A<sub>2n</sub><sup>(2)</sup> n ≥ 2</td><td>2, 2, ..., 2, 1</td><td>1, 2, ..., 2, 2</td><td>C<sub>n</sub></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ n - 1<br>α<sub>n</sub> = 2ε<sub>n</sub></td><td>Zα<sub>1</sub> + ... + Zα<sub>n-1</sub> + 1/2 Zα<sub>n</sub> = Zε<sub>1</sub> + ... + Zε<sub>n</sub></td><td>2n + 1</td></tr><tr><td>E<sub>6</sub><sup>(2)</sup></td><td>1, 2, 3, 2, 1</td><td>1, 2, 3, 4, 2</td><td>F<sub>4</sub></td><td>α<sub>i</sub> = ε<sub>i</sub> - ε<sub>i+1</sub>, 1 ≤ i ≤ 2<br>α<sub>3</sub> = 2ε<sub>3</sub><br>α<sub>4</sub> = -ε<sub>1</sub> - ε<sub>2</sub> - ε<sub>3</sub> + ε<sub>4</sub></td><td>Zα<sub>1</sub> + Zα<sub>2</sub> + Zα<sub>3</sub> + Zα<sub>4</sub> =<br>{q ∈ Zε<sub>1</sub> + ... + Zε<sub>4</sub> | Σ<sub>1≤i≤4</sub> q<sub>i</sub> even}</td><td>9</td></tr><tr><td>D<sub>4</sub><sup>(3)</sup></td><td>1, 2, 1</td><td>1, 2, 3</td><td>G<sub>2</sub></td><td>α<sub>1</sub> = ε<sub>1</sub> - ε<sub>2</sub><br>α<sub>2</sub> = -2ε<sub>1</sub> + ε<sub>2</sub> + ε<sub>3</sub></td><td>Zα<sub>1</sub> + Zα<sub>2</sub> = {q ∈ Zε<sub>1</sub> + Zε<sub>2</sub> + Zε<sub>3</sub> | Σ<sub>1≤i≤3</sub> q<sub>i</sub> = 0}</td><td>4</td></tr></tbody></table>
<figure><img src="image_2.png" /><figcaption>Fig. 2: Alcoves in the fundamental chamber in type $A_2^{(1)}$. To shorten the notation, an element $s_{i_1}s_{i_2}\dots s_{i_n}$ is simply denoted by $i_1i_2\dots i_n$, for example $0121 = s_0s_1s_2s_1$.</figcaption></figure>

## 1.3 Weight, cowaight lattice and affine weight lattice

### 1.3.1 Finite setting

Before proceeding to the further study of W, let us briefly recall some classical constructions related to the (finite) Weyl group $W_0$. The set $\{\omega_1, \dots, \omega_n\}$ of fundamental weights is defined as the dual basis of $\Delta_0^{\vee}$, that is the elements $\omega_i \in V_0$ verify $\langle \omega_i, \alpha_j^{\vee} \rangle = \delta_{ij}$. Let $P_0$ be the weight lattice of $W_0$, that is

$$P_0 := \{x \in V_0 \mid \langle x, f \rangle \in \mathbb{Z} \text{ for any } f \in V_0^*\}.$$

Then $P_0$ decomposes as follows

$$P_0 = \bigoplus_{i=1}^{n} \mathbb{Z}\omega_i.$$

The set $P_0^+ = \bigoplus_{i=1}^n \mathbb{N}\omega_i$ is called the set of integral dominant weights associated to $P_0$.

The set $\{\omega_1^{\vee}, \dots, \omega_n^{\vee}\}$ of fundamental weights is defined as the dual basis of $\Delta_0$, that is the elements $\omega_i^{\vee} \in V_0^*$ verify

$$\langle \omega_i^{\vee}, \alpha_j \rangle = \delta_{ij}.$$

Let $P_0^{\vee}$ be the cowaight lattice of $W_0$, that is

$$P_0^{\vee} := \{f \in V_0^* \mid \langle x, f \rangle \in \mathbb{Z} \text{ for any } x \in V_0\}.$$

Then $P_0^{\vee}$ decomposes as follows

$$P_0^{\vee} = \bigoplus_{i=1}^{n} \mathbb{Z}\omega_i^{\vee}.$$

### 1.3.2 Affine setting

The set $\{\Lambda_0, \Lambda_1, \dots, \Lambda_n\}$ of affine fundamental weights is defined as the dual basis of $\Delta^{\vee}$, that is the elements $\Lambda_i \in V$ verify $\langle \Lambda_i, \alpha_j^{\vee} \rangle = \delta_{ij}$. Moreover, for $1 \le i \le n$ we have the following decomposition

$$\Lambda_i = \frac{a_i^{\vee}}{a_0^{\vee}} \Lambda_0 + \omega_i.$$

Similarly, the set of affine fundamental coweights $\{\Lambda_0^{\vee}, \Lambda_1^{\vee}, \dots, \Lambda_n^{\vee}\}$ is defined as the dual basis of $\Delta$. Finally we let $\rho^{\vee}$ be $\rho^{\vee} = \sum_{i=0}^{n} \Lambda_i^{\vee}$. The affine weight lattice is defined by

$$P = \bigoplus_{i=1}^{n} \mathbb{Z}\omega_i \oplus \mathbb{Z}\delta \oplus \mathbb{Z}\Lambda_0,$$
and the lattice of affine dominant weights is given by $P^+ = \bigoplus_{i=0}^n \mathbb{N}\Lambda_i \oplus \mathbb{Z}\delta$. Therefore, any dominant weight $\Lambda \in P^+$ writes $\Lambda = \sum_{i=0}^n m_i \Lambda_i + z\delta$ for some $m_i \in \mathbb{N}, z \in \mathbb{Z}$. Alternatively, any $\Lambda \in P^+$ decomposes as

$$ \Lambda = \lambda + \ell\Lambda_0 + z\delta. \qquad (5) $$

## 1.4 Extended affine Weyl group $\widehat{W}$

### 1.4.1 Definition of $F$ and $\widehat{W}$

The inner product $(|)$ on $V_0$ induces an isomorphism between $V_0$ and $V_0^*$, by sending $\alpha_i \mapsto \frac{2(\alpha_i|-)}{(\alpha_i|\alpha_i)} = \frac{a_i^\vee}{a_i} \alpha_i^\vee$ see [Kac84, Formula (6.2.3)]. Therefore one can identify the lattice $P_0^\vee$ with a lattice in $V_0$. We denote this new lattice by $L$. It turns out that $M \subset L$. In the non-twisted cases $L$ is precisely given by

$$ L = \{x \in V_0 \mid (x | \alpha_i) \in \mathbb{Z} \text{ for } i = 1, \dots, n\}. $$

The fundamental group associated to $W$, denoted $F$, is the group

$$ F := L/M. $$

The extended (affine) Weyl group associated to $W$ is defined by

$$ \widehat{W} := T(L) \rtimes W_0. \qquad (6) $$

In other words we have the following short split exact sequence

$$ 1 \longrightarrow T(L) \longrightarrow \widehat{W} \longrightarrow W \longrightarrow 1. \qquad (7) $$

### 1.4.2 Definition of $\Sigma$

It is also possible to give a more concrete description of $F$ in terms of the elements of $\widehat{W}$. For $w \in W$ let $A_w$ be the corresponding alcove. We denote

$$ \Sigma_w := \mathrm{Stab}_{\widehat{W}}(A_w) = \{f \in \widehat{W} \mid f(A_w) = A_w\}. $$

Notice that $\Sigma_w = w\Sigma_e w^{-1}$. In the rest of the paper we will write $\Sigma := \Sigma_e$. We also denote $\Delta_i = \{\alpha_j \in \Delta \text{ such that } j \neq i\}$. Let $W_i$ be the parabolic subgroup of $W_0$ generated by the $s_\alpha$ with $\alpha \in \Delta_i$. Let $\Phi_i = \Phi_i^+ \sqcup \Phi_i^-$ be the corresponding root system. There exists a unique element $w_{0,i} \in W_i$ such that $w_{0,i}(\Phi_i^+) = \Phi_i^-$. This element is the maximal element of the group $W_i$. Let $I = \{1, \dots, n\}$ and let us decompose the root $\theta$ as

$$ \theta = \sum_{i \in I} a_i \alpha_i. $$

Let $J$ be the subset of $I$ defined by $J := \{i \in I \mid a_i = 1\}$. For $j \in J$ we denote

$$ \sigma_j := t_{\omega_j^\vee} w_{0,j} w_0 \qquad (8) $$

Then we have (see [Bou68] Ch. VI, § 2, no 3, Prop. 6)

$$ \Sigma = \{\sigma_j \mid j \in J\} \cup \{e\}. \qquad (9) $$

Moreover each $j \in J$ defines a unique element in $\Sigma$. Notice that in [Bou68] the twisted cases are not considered but one can still extend the above result to the twisted cases. The elements of Coxeter-length 0 are exactly those in $\Sigma$, that is for any $w \in W$ and any $\sigma \in \Sigma$ one has $\ell(w) = \ell(\sigma w) = \ell(w\sigma)$. We define by $M_j$ the matrix in the canonical basis of $V_0$ associated to the element $w_{0,j}w_0$, so that $w_{0,j}w_0(q) = M_j(q)$ for any $q \in M$. Combining [Bou68, Ch. VI, § 2, no 3, Prop. 6] and [Bou68, Ch. VI, § 2, no 3, Corr.] with the conventions that $\omega_0^\vee = 0$ and $\sigma_0 = e$, the following map is an isomorphism of groups:

$$ \begin{array}{ccc} F & \longrightarrow & \Sigma \\ [\omega_j^\vee] & \longmapsto & \sigma_j. \end{array} \qquad (10) $$

The following proposition is well known and useful to compute reduced expressions in $\widehat{W}$

**Proposition 1.3.** For any $j \in J$ and any $i \in \{0\} \cup I$ we have $\sigma_j s_i \sigma_j^{-1} \in S$. In particular $\sigma_j$ defines a permutation of $\{0\} \cup I$ that we also denote $\sigma_j$, that is $\sigma_j s_i \sigma_j^{-1} = s_{\sigma_j(i)}$. It follows that $\Sigma$ and $F$ are isomorphic to a subgroup of the group of automorphisms of the affine Coxeter-Dynkin diagram of $W$.
### 1.4.3 $\Sigma$ in type $A_n^{(1)}$

The longest root $\theta$ in type $A_n^{(1)}$ is

$$ \theta = \sum_{i=1}^{n} \alpha_i. $$

Moreover it turns out that $\omega_j^\vee = \omega_j$ for any $j = 1, 2, \dots, n$, so with the convention $\sigma_0 = e$ one has

$$ \Sigma = \{\sigma_j \mid j = 0, 1, \dots, n\} = \{e, t_{\omega_j} w_{0,j} w_0 \mid j = 1, \dots, n\}. \quad (11) $$

where $w_{0,j}$ is the longest element of $W_j = \langle s_1, \dots, s_{j-1} \rangle \times \langle s_{j+1}, \dots, s_n \rangle$ and $w_0$ the longest element of $A_n$.

**Example 1.4.** Let us take $W = A_2^{(1)}$ with $I = \{1, 2\}$. Then $\Delta_1 = \{\alpha_2\}$, $\Delta_2 = \{\alpha_1\}$ and $W_1 = \langle s_2 \rangle$, $W_2 = \langle s_1 \rangle$. The highest root is $\alpha_0 = \alpha_1 + \alpha_2$ so $J = \{1, 2\}$. In type A one has $\omega_i^\vee = \omega_i$, therefore $\sigma_1 = t_{\omega_1} w_{0,1} w_0 = t_{\omega_1} \cdot s_2 \cdot s_2 s_1 s_2 = t_{\omega_1} s_1 s_2$ and $\sigma_2 = t_{\omega_2} w_{0,2} w_0 = t_{\omega_2} \cdot s_1 \cdot s_1 s_2 s_1 = t_{\omega_2} s_2 s_1$. Hence

$$ \Sigma = \{e, t_{\omega_1} s_1 s_2, t_{\omega_2} s_2 s_1\}. \quad (12) $$

An easy computation shows that $\sigma_1^2 = \sigma_2$ and $\sigma_2^2 = \sigma_1$ and $\sigma_1^3 = \sigma_2^3 = e$. Hence $\Sigma = \langle \sigma_1 \rangle \simeq \mathbb{Z}/3\mathbb{Z}$.

**Example 1.5.** We continue example 1.4 in order to illustrate Proposition 1.3. We have

$$ \sigma_1 s_0 \sigma_1^{-1} = t_{\omega_1} s_1 s_2 \cdot t_{13} s_{13} \cdot s_2 s_1 t_{-\omega_1} = t_{\omega_1} s_1 s_2 \cdot t_{13} s_1 s_2 s_1 \cdot s_2 s_1 t_{-\omega_1} = t_{\omega_1 - \alpha_1} s_1 t_{-\omega_1} = t_{\omega_1 - \alpha_1 - (\omega_1 - \alpha_1)} s_1 = s_1 $$

$$ \sigma_1 s_1 \sigma_1^{-1} = t_{\omega_1} s_1 s_2 \cdot s_1 \cdot s_2 s_1 t_{-\omega_1} = t_{\omega_1} s_2 t_{-\omega_1} = s_2 $$

$$ \sigma_1 s_2 \sigma_1^{-1} = t_{\omega_1} s_1 s_2 \cdot s_2 \cdot s_2 s_1 t_{-\omega_1} = t_{\omega_1} s_1 s_2 s_1 t_{-\omega_1} = t_{\omega_1 - s_1 s_2 s_1(\omega_1)} s_1 s_2 s_1 = t_{\alpha_1 + \alpha_2} s_1 s_2 s_1 = s_0. $$

Then the permutation associated to $\sigma_1$ is (012). The same kind of computations would show that the permutation associated to $\sigma_2$ is (021). Notice that we do not have all the automorphisms of the Dynkin diagram of $A_2^{(1)}$. Indeed $\mathrm{Aut}(A_2^{(1)}) = \{e, (12), (20), (01), (120), (021)\}$.

### 1.4.4 $\Sigma$ in type $C_n^{(1)}$

The longest root $\theta$ in type $C_n^{(1)}$ is

$$ \theta = \sum_{i=1}^{n-1} 2\alpha_i + \alpha_n. $$

Moreover it turns out that $\omega_n^\vee = \omega_n$ in this case, so

$$ \Sigma = \{e, \sigma_n\} = \{e, t_{\omega_n} w_{0,n} w_0\} \quad (13) $$

where $w_{0,n}$ is the longest element of $W_n = \langle s_1, s_2, \dots, s_{n-1} \rangle \simeq A_{n-1}$ and $w_0$ the longest element of $C_n$. It follows that $F = \{1, [\omega_n]\}$. The corresponding automorphism of the Dynkin diagram of $C_n^{(1)}$, that we also denote by $\sigma_n$, is the permutation of $I \cup \{0\}$ defined when $n+1$ is even by $\sigma_n(k) = n-k$ for $0 \le k \le \frac{n}{2}-1$ and when $n+1$ is odd it is defined by $\sigma_n(k) = n-k$ for $0 \le k \le \frac{n-1}{2}-1$ and $\sigma_n(\frac{n-1}{2}) = \frac{n-1}{2}$.

### 1.4.5 Another characterization of $\widehat{W}$

The group $F$ acts on $W$ by

$$ \begin{array}{ccc} F \times W & \to & W \\ ([\omega_j^\vee], w) & \mapsto & \sigma_j w \sigma_j^{-1}. \end{array} \quad (14) $$

Let $\varphi$ be the corresponding structural map, that is $\varphi: F \to \mathrm{Aut}(W)$ is defined by $\varphi([\omega_j^\vee])(w) = \sigma_j w \sigma_j^{-1}$. We may then define the outer semidirect product $W \times_{\varphi} F$. As $F \simeq \Sigma$ via the isomorphism (10) it is more convenient to think of $W \times_{\varphi} F$ as the inner semidirect product $W \times \Sigma$. Therefore we drop the the $\varphi$ in $W \times F$ and we write any element of this group by $wf$ where $w \in W$ and $f \in F$ (with in mind that if $f = [\omega_j^\vee]$ then $wf$ in the outer product means $w\sigma_j$ in the inner product). This decomposition is of course unique.
Let $w = s_{i_1}s_{i_1}...s_{i_p} \in W$. For $j \in J \sqcup \{0\}$ we define

$$ \pi_j(w) := \begin{cases} \prod_{k=1}^{p} \sigma_j^{-1} s_{i_k} \sigma_j = \prod_{k=1}^{p} s_{\sigma_j^{-1}(i_k)} & \text{if } j \neq 0 \\ w & \text{if } j = 0. \end{cases} \qquad (15) $$

We have then the following formula

$$ w\sigma_j = \sigma_j\pi_j(w). \qquad (16) $$

For an element $v = t_q\bar{v} \in W$ we denote $\mathfrak{r}(w) := q$. As $\pi_j(w) \in W$ one can decompose it as $\pi_j(w) = t_{\mathfrak{r}(\pi_j(w))}\overline{\pi_j(w)}$. For $j = 0$ we set $x_j(w) = \mathfrak{r}(w)$ and $\theta_j(w) = \bar{w}$, and for $j \in J$ (where $J$ is defined in Section 1.4.2)

$$ \left\{ \begin{array}{l} x_j(w) := w_{0,j}w_0(\mathfrak{r}(\pi_j(w))) \in M \\ \theta_j(w) := w_{0,j}w_0\overline{\pi_j(w)} \in W_0. \end{array} \right. \qquad (17) $$

The following map is a group isomorphism

$$ \begin{array}{rcl} \nabla : W \rtimes F & \to & T(P_0) \rtimes W_0 \\ w[\omega_j^>] & \mapsto & \sigma_j \pi_j(w) = t_{\omega_j^+ + x_j(w)} \theta_j(w). \end{array} \qquad (18) $$

Any element $g \in W \rtimes F$ can be expressed uniquely as $g = w\sigma$ for $w \in W$ and $\sigma \in F$, but it can also be expressed the other way around: $g = \sigma w'$ for a unique $w' \in W$ and the same $\sigma$ (with $w' = \pi_j(w)$ if $\sigma = [\omega_j^>]$. By expressing any element in $W \rtimes F$ as $\sigma w$ with $\sigma = [\omega_j^+]$, the expression of $\nabla$ becomes much more easier:

$$ \nabla(\sigma w) = \sigma_j w = t_{\omega_j^+ + w_{0,j}w_0(q)} w_{0,j}w_0\bar{w}. \qquad (19) $$

In particular $\nabla([\omega_j^>] = \sigma_j$ and for $w \in W$ one has $\nabla(w[0]) = w$ with again the convention $\omega_0 = 0$.

**Example 1.6.** We continue Examples 1.4 and 1.5. Let $w = s_1s_2s_0s_2s_1$. We know that $[\omega_1] \mapsto \sigma_1$ and $\sigma_1$ defines the automorphism $\sigma_1 = (012) \in \mathrm{Aut}(A_2^{(1)})$. First of all we have

$$ \pi_1(w) = s_{\sigma_1^{-1}(1)} s_{\sigma_1^{-1}(2)} s_{\sigma_1^{-1}(0)} s_{\sigma_1^{-1}(2)} s_{\sigma_1^{-1}(1)} = s_0 s_1 s_2 s_1 s_0 = t_{2\alpha_1+2\alpha_2} s_1 s_2 s_1 $$

and then

$$ w\sigma_1 = \sigma_1\pi_1(w) = t_{\omega_1}s_1s_2t_{2\alpha_1+2\alpha_2}s_1s_2s_1 = t_{\omega_1-2\alpha_1}s_2. $$

So we want to send $w[\omega_1] \mapsto t_{\omega_1-2\alpha_1}s_2$. But some easy verifications show that $x_1(w) = -2\alpha_1$ and $\theta_1(w) = s_2$.

<figure><img src="image_3.png" /><figcaption>Fig. 3: The sequences involved in the extended affine Weyl group $\widehat{W}$.</figcaption></figure>
## 1.5 Generalities on transverse sets

Let $(W, S)$ be a Coxeter system with length function $\ell$. Let $\Phi = \Phi^+ \sqcup \Phi^-$ be the root system of $W$ with simple system $\Delta$. Let $I, J \subset S$ and let $(W_I, S_I)$ and $(W_J, S_J)$ be the corresponding parabolic subgroups of $W$. Let $T$ be the set of reflections of $W$, that is $T = \{wsw^{-1} | s \in S, w \in W\}$.

The left-inversion set and right-inversion set of an element $w \in W$ are defined respectively by

$$N_L(w) = \{t \in T \mid \ell(tw) < \ell(w)\} \quad \text{and} \quad N_R(w) = \{t \in T \mid \ell(wt) < \ell(w)\}.$$

We denote by

$$^{J}W = \{w \in W \mid \ell(sw) > \ell(w) \ \forall s \in J\}$$

and

$$W^I = \{w \in W \mid \ell(\overline{ws}) > \ell(w) \ \forall s \in I\}.$$

The set $^{J}W$ is called the $J$-left transverse set of $W$ and $W^I$ is called the $I$-right transverse set of $W$. Let $T_I$ (resp. $T_J$) be the set of reflections of $W_I$ (resp. $W_J$) that is $T_I = T \cap W_I$ (resp. $T_I = T \cap W_J$). It is known (see [DH16, Section 2.5] for more details) that

$$^{J}W = \{w \in W \mid N_L(w) \cap T_J = \emptyset\} = \{w \in W \mid N_L(w) \cap S_J = \emptyset\}$$

and

$$W^I = \{w \in W \mid N_R(w) \cap T_I = \emptyset\} = \{w \in W \mid N_R(w) \cap S_I = \emptyset\}.$$

When $W$ is finite, a well known property of $^{J}W$ is the fact that it describes an interval in $W$ for $\leq_R$, in particular it has a unique element of maximal length, denoted $^{J}z := w_{0,J}w_0$ where $w_0$ is the element of maximal length in $W$ and $w_{0,J}$ in $W_J$.

Each element $w \in W$ has unique decomposition $w = w_J^{^{J}w}$ with $w_J \in W_J$, $^{J}w \in ^{J}W$ called the left $J$-decomposition of $w$, and has also a unique decomposition $w = w_I^{^{I}w_I}$ with $w_I \in W_I$, $^{I}w \in ^{I}W$ called the right $I$-decomposition of $w$. These decompositions satisfy $\ell(w) = \ell(w_J) + \ell(^{J}w) = \ell(w^I) + \ell(w_I)$. The element $^{J}w$ is the unique element of minimal length in $W_Jw$ and $^{I}w$ is the unique element of minimal length in $wW_I$. Therefore the following maps are natural bijections

$$ \begin{array}{ccc} W_J \xrightarrow{W} & ^{J}W & \\ [0.5ex] [w] & \mapsto & ^{J}w \end{array} \qquad (20) $$

$$ \begin{array}{ccc} W/W_I \to & W^I & \\ [0.5ex] [w] & \mapsto & w^I. \end{array} \qquad (21) $$

# 2 Extending the atomic length

In [CLG22], a new statistic on finite and affine Weyl groups, the *atomic length*, was introduced and studied. In this section we recall the general definition of this statistic and we extend it to the extended affine Weyl group. We then generalise some results obtained in [CLG22] (Lemma 2.3 and Proposition 2.6) and we give a new theorem that will be of importance in the following sections, namely Theorem 2.4. Finally, the quadratic formula established in Section 2.2 is one of the main characters of this paper, and we will investigate it significantly in Sections 7 and 8.

## 2.1 Atomic length on the Weyl group W

Let $W$ be an affine Weyl group of rank $n$ and let $\Lambda$ be a dominant weight. We set, for all $w \in W$,

$$ \mathcal{L}_{\Lambda}(w) = \langle \Lambda - w\Lambda, \rho^{\vee} \rangle. \qquad (22) $$

Recall that any $w \in W$ decomposes uniquely as $w = t_q \bar{w}$, where $q \in M, \bar{w} \in W_0$. Recall also that $\mathrm{ht}(q)$ is the height of $q$. The following result is Theorem 2.1.

**Theorem 2.1.** For all $w = t_q \bar{w} \in W$, we have

$$ \mathcal{L}_{\Lambda_0}(w) = \frac{h}{2} |q|^2 - \mathrm{ht}(q). \qquad (23) $$

In particular $\mathcal{L}_{\Lambda_0}(w) = \mathcal{L}_{\Lambda_0}(w^0) = \mathcal{L}_{\Lambda_0}(t_q)$.
Note that $\mathcal{L}_{\Lambda_0}(w)$ depends only on $q$. It turns out that this coincides with the formula established independently by Stucky, Thiel and Williams in their study of generalised cores [STW23].

We will also need a similar formula for $\mathcal{L}_{\Lambda_i}$. Recall that

$$ \Lambda_i = \frac{a_i^{\vee}}{a_0^{\vee}} \Lambda_0 + \omega_i $$

where $\omega_i$ is the $i$-th fundamental weight of the corresponding finite root system.

**Proposition 2.2.** For all $w = t_q \overline{w} \in W$, we have

$$ \mathcal{L}_{\Lambda_i}(w) = \frac{a_i^{\vee}}{a_0^{\vee}} \left( \frac{h}{2} |q|^2 - \mathrm{ht}(q) \right) + h(\overline{w}(\omega_i) | q) + \mathrm{ht}(\omega_i - \overline{w}(\omega_i)). $$

In particular, we have

$$ \mathcal{L}_{\Lambda_i}(t_q) = \frac{a_i^{\vee}}{a_0^{\vee}} \left( \frac{h}{2} |q|^2 - \mathrm{ht}(q) \right) + h(\omega_i | q). $$

*Proof.* We have

$$ \begin{aligned} \mathcal{L}_{\Lambda_i}(w) &= \langle \Lambda_i - w(\Lambda_i), \rho^{\vee} \rangle \\ &= \left\langle \frac{a_i^{\vee}}{a_0^{\vee}} \Lambda_0 + \omega_i - w \left( \frac{a_i^{\vee}}{a_0^{\vee}} \Lambda_0 + \omega_i \right), \rho^{\vee} \right\rangle \\ &= \frac{a_i^{\vee}}{a_0^{\vee}} \left( (\Lambda_0 - w(\Lambda_0), \rho^{\vee}) \right) + \langle \omega_i - w(\omega_i), \rho^{\vee} \rangle \\ &= \frac{a_i^{\vee}}{a_0^{\vee}} \mathcal{L}_{\Lambda_0}(w) + \langle \omega_i - [\overline{w}(\omega_i) - (\overline{w}(\omega_i) | q)]\delta, \rho^{\vee} \rangle \\ &= \frac{a_i^{\vee}}{a_0^{\vee}} \mathcal{L}_{\Lambda_0}(w) + h(\overline{w}(\omega_i) | q) + \mathrm{ht}(\omega_i - \overline{w}(\omega_i)) \end{aligned} $$

where the penultimate identity is obtained by applying Formula (3) to expand $w(\omega_i) = t_q(\overline{w}(\omega_i))$. We conclude using Theorem 2.1. $\square$

Writing $q = q_1\varepsilon_1 + q_2\varepsilon_2 + \dots$, we obtain in Theorem 2.1 Proposition 2.2 an expression of the atomic length as a degree two polynomial in the variables $q_i$.

## 2.2 Gaussian reduction and a quadratic Diophantine equation

We now observe the following key phenomenon. Write $q = (q_1, \dots, q_n)$. The right-hand side of (23) is the sum of a quadratic form and a linear form in the variables $q_1, \dots, q_n$ with integer coefficients. Therefore, we can perform a Gaussian reduction and obtain an equivalent identity of the form

$$ a \mathcal{L}_{\Lambda_0}(t_q) + b = \sum_{i=1}^{n} d_i x_i^2, \qquad (24) $$

where $a, b, d_i \in \mathbb{Z}$ and where the $x_i$'s are linearly independent linear forms in the variables $q_1, \dots, q_n$ with integer coefficients. This can be thought of as a quadratic Diophantine equation in the variables $x_1, \dots, x_n$. A more detailed expression of the right-hand side is given in Section 5.2 for the type $A_n^{(1)}$. In the following sections, we will denote

$$ \mathcal{U}(k) = \left\{ (x_1, \dots, x_n) \in \mathbb{Z}^n \mid \sum_{i=1}^{n} d_i x_i^2 = k \right\}. $$

## 2.3 Atomic length on the extended Weyl group $\widehat{W}$

Let $\Lambda$ be a dominant weight. (22) also makes sense for any element $g \in \mathrm{GL}(\mathfrak{h}^*)$:

$$ \mathcal{L}_{\Lambda}(g) = \langle \Lambda - g\Lambda, \rho^{\vee} \rangle. $$

We will be particularly interested in studying the atomic length on the extended Weyl group $\widehat{W} \subset \mathrm{GL}(\mathfrak{h}^*)$ and to give explicit formulas of $\mathcal{L}_{\Lambda}(t_{\omega_i^{\vee}})$. In the simply laced cases $\omega_i$
For an element $wf \in W \times F$ with $f = [\omega_j]$ we extend the $\lambda$-atomic length on $w\sigma$ by (where $\nabla$ is defined in (18))

$$ \mathcal{L}_{\Lambda}(wf) := \mathcal{L}_{\Lambda}(\nabla(wf)) = \mathcal{L}_{\Lambda}(\sigma_j \pi_j(w)) \quad (25) $$

and similarly

$$ \mathcal{L}_{\Lambda}(fw) := \mathcal{L}_{\Lambda}(\sigma_j w). \quad (26) $$

In the following sections, we will focus on the particular case $\Lambda = \Lambda_i$ and we will denote equivalently

$$ \mathcal{L} = \mathcal{L}_{\Lambda_0} \quad \text{and} \quad \mathcal{L}_i = \mathcal{L}_{\Lambda_i} \quad \text{for } 1 \le i \le n \quad \text{and} \quad \mathcal{L}(q) = \mathcal{L}(t_q) \quad \text{for } q \in M. $$

Usually we define the height of any element of the root lattice, but we can also define in the same way the height for any element of $L$. The only difference, for $y \in L$, is that $\mathrm{ht}(y) \in \mathbb{Q}$.
Let $\Lambda \in P^+$ that we decompose as follows

$$ \Lambda = \lambda + \ell \Lambda_0 + z \delta, \quad (27) $$

where $\lambda \in P_0^+$, $\ell$ is the level of $\Lambda$ and is also equal to $\langle \Lambda, c \rangle$. Recall that $h$ is the Coxeter number of $W$. For a vector $x = x_1\alpha_1 + \cdots + x_n\alpha_n$ we define, for $0 \le j \le n$, the rational number $\mathrm{ch}_j(x)$ as follows

$$ \mathrm{ch}_j(x) := \begin{cases} x_j \frac{a_i^{\vee}}{a_j} & \text{if } j \neq 0 \\ 0 & \text{if } j = 0. \end{cases} \quad (28) $$

For $x, y \in V$, $u \in W_0$ we define the following map

$$ \begin{array}{rcl} D_{\Lambda} : & W_0 \times V^2 & \longrightarrow \mathbb{R} \\ & (u, x, y) & \longmapsto h \cdot \ell (x \mid y) - \mathcal{L}_{\Lambda}(u). \end{array} $$

Write $b_i = a_i^{\vee}/a_0^{\vee}$. We see directly, with the convention $\omega_0 = 0$, that for any $0 \le i \le n$ one has

$$ \begin{align*} \mathcal{D}_{\Lambda_i}(u, x, y) &= h \cdot b_i(x \mid y) - \mathcal{L}_{\omega_i}(u) \\ &= h \cdot b_i(x \mid y) - (\langle \omega_i - u(\omega_i), \rho^{\vee} \rangle) \\ &= h \cdot b_i(x \mid y) - (\langle \omega_i, \rho^{\vee} \rangle - \langle u(\omega_i), \rho^{\vee} \rangle) \\ &= h \cdot b_i(x \mid y) + \mathrm{ht}(u(\omega_i)) - \mathrm{ht}(\omega_i). \end{align*} $$

In particular for $\Lambda_0$ we get

$$ \mathcal{D}_{\Lambda_0}(u, x, y) = h \cdot \frac{a_0^{\vee}}{a_0^{\vee}}(x \mid y) + \mathrm{ht}(u(\omega_0)) - \mathrm{ht}(\omega_0) = h \cdot (x \mid y) \quad (29) $$

The following Lemma is the extended version of [CLG22, Lemma 8.1].

**Lemma 2.3.** Let $x \in L$, $\bar{w} \in W_0$ and set $w = t_x \bar{w} \in \tilde{W}$. We have

$$ \mathcal{L}_{\Lambda}(w) = \mathcal{L}_{\Lambda}(\bar{w}) - \ell \mathrm{ht}(w) + h \left( (\lambda | \bar{w}^{-1}(w)) + \frac{1}{2} |x|^2 \ell \right). $$

*Proof.* The proof is exactly the same as that of [CLG22, Lemma 8.1]. The only difference is that $x \in L$ instead of $M$ but this does not affect the properties used. $\square$

The following result shows that up to a defect term $D_{\Lambda}(1, x, y)$, the $\Lambda$-atomic length $\mathcal{L}_{\Lambda}$ restricted to $M$ is a group morphism from $M$ to $\mathbb{Z}$. Notice that it is not a quasimorphism as $D_{\Lambda}(1, x, y)$ is not bounded.

**Theorem 2.4.** Let $x, y \in V$ and $u \in W_0$. We have

$$ \mathcal{L}_{\Lambda}(t_{x+y}u) = \mathcal{L}_{\Lambda}(t_x u) + \mathcal{L}_{\Lambda}(t_y u) + \mathcal{D}_{\Lambda}(u, x, y). $$

In particular for any $0 \le i \le n$ one has

$$ \mathcal{L}_{\Lambda_i}(t_x t_y) = \mathcal{L}_{\Lambda_i}(t_x) + \mathcal{L}_{\Lambda_i}(t_y) + h \cdot \frac{a_i^{\vee}}{a_0^{\vee}}(x \mid y). $$
**Proof.** This follows from the following computation, starting with Lemma 2.3.

$$
\begin{align*}
\mathcal{L}_{\Lambda}(t_{x+y}u) &= \mathcal{L}_{\Lambda}(u) - \ell \operatorname{ht}(x+y) + h\left((\lambda | \bar{w}^{-1}(x+y)) + \frac{1}{2} \ell |x+y|^2\right) \\
&= \mathcal{L}_{\Lambda}(u) - \ell \operatorname{ht}(x) - \ell \operatorname{ht}(y) + h\left((\lambda | \bar{w}^{-1}(x)) + (\lambda | \bar{w}^{-1}(y)) + \frac{1}{2} \ell |x|^2 + \ell (x | y) + \frac{1}{2} \ell |y|^2\right) \\
&= \mathcal{L}_{\Lambda}(t_x u) - \ell \operatorname{ht}(y) + h\left((\lambda | \bar{w}^{-1}(y)) + \frac{1}{2} \ell |y|^2\right) + h \ell (x | y) \\
&= \mathcal{L}_{\Lambda}(t_x u) + \left(\mathcal{L}_{\Lambda}(u) - \ell \operatorname{ht}(y) + h\left[(\lambda | \bar{w}^{-1}(y)) + \frac{1}{2} \ell |y|^2\right]\right) - \mathcal{L}_{\Lambda}(u) + h \ell (x | y) \\
&= \mathcal{L}_{\Lambda}(t_x u) + \mathcal{L}_{\Lambda}(t_y u) + h \ell (x | y) - \mathcal{L}_{\Lambda}(u) \\
&= \mathcal{L}_{\Lambda}(t_x u) + \mathcal{L}_{\Lambda}(t_y u) + \mathcal{D}_{\Lambda}(u, x, y).
\end{align*}
$$

The second equality is obtained from the first one by setting $u = 1$.

**Proposition 2.5.** Let $\Lambda \in P^+$ be a dominant weight of level $\ell$, and $x \in \mathfrak{h}^*$. We have

$$ \mathcal{L}_{\Lambda}(t_x) = h(\Lambda | x) + \frac{1}{2}|x|^2 \ell h - \ell \operatorname{ht}(x). $$

**Proof.** We have

$$
\begin{align*}
\mathcal{L}_{\Lambda}(t_x) &= \langle \Lambda - t_x(\Lambda), \rho^{\vee} \rangle \\
&= \langle \Lambda - \left( \Lambda + \langle \Lambda, c \rangle x - \left( (\Lambda | x) + \frac{1}{2}|x|^2 \langle \Lambda, c \rangle \right) \delta \right), \rho^{\vee} \rangle \\
&= \langle -\langle \Lambda, c \rangle x + \left( (\Lambda | x) + \frac{1}{2}|x|^2 \langle \Lambda, c \rangle \right) \delta, \rho^{\vee} \rangle \\
&= \langle -\ell x + \left( (\Lambda | x) + \frac{1}{2}|x|^2 \ell \right) \delta, \rho^{\vee} \rangle \\
&= -\ell \langle x, \rho^{\vee} \rangle + \left( (\Lambda | x) + \frac{1}{2}|x|^2 \ell \right) \langle \delta, \rho^{\vee} \rangle \\
&= -\ell \langle x, \rho^{\vee} \rangle + \left( (\Lambda | x) + \frac{1}{2}|x|^2 \ell \right) h \\
&= -\ell \operatorname{ht}(x) + \left( (\Lambda | x) + \frac{1}{2}|x|^2 \ell \right) h.
\end{align*}
$$

The following proposition is the extended version of Theorem 2.1.

**Proposition 2.6.** Let $w = t_x \bar{w} \in \widehat{W}$. We have

$$ \mathcal{L}_{\Lambda_0}(w) = \frac{h}{2}|x|^2 - \operatorname{ht}(x). $$

In particular $\mathcal{L}_{\Lambda_0}(w) = \mathcal{L}_{\Lambda_0}(t_x)$ for any $x \in L$. Moreover, writing $w = \sigma_j v$ with $\sigma_j \in \Sigma$ and $v \in W$, one has

$$ \mathcal{L}_{\Lambda_0}(\sigma_j v) = \mathcal{L}_{\Lambda_0}(\sigma_j v^0). $$

**Proof.** The first part is a straightforward consequence of Proposition 2.5. Let us prove now $\mathcal{L}_{\Lambda_0}(\sigma_j v) = \mathcal{L}_{\Lambda_0}(\sigma_j v^0)$. Write $v = v^0 v_0$ with $v_0 \in W_0$, $v^0 = t_q$ where $q \in M$. One has $\sigma_j v = \sigma_j t_q v_0 = t_{\omega_j} w_{0,j} w_0 t_q v_0 = t_{\omega_j + M_j(q)} w_{0,j} w_0 v_0$. Then by the first part of the statement one has $\mathcal{L}_{\Lambda_0}(\sigma_j v) = \mathcal{L}_{\Lambda_0}(t_{\omega_j + M_j(q)})$. Moreover we also have $\mathcal{L}_{\Lambda_0}(\sigma_j v^0) = \mathcal{L}_{\Lambda_0}(\sigma_j t_q) = \mathcal{L}_{\Lambda_0}(t_{\omega_j + M_j(q)} w_{0,j} w_0) = \mathcal{L}_{\Lambda_0}(t_{\omega_j + M_j(q)})$ (as the first point shows that the finite part on the right does not contribute). This ends the proof. $\square$

# 3 Affine and extended affine Grassmannian

In this section we recall the notion of *affine Grassmannian*, a well-studied subset of the affine Weyl group which turns out to be naturally in bijection with the $(n+1)$-cores in type $A_n^{(1)}$ (see Section 5). Therefore, for an arbitrary affine Weyl group, affine Grassmannian elements give a natural generalisation of cores, and we will therefore sometimes use the terminology "generalised cores". Moreover, in this section, we will introduce the notion of *extended affine Grassmannian*. This notion will be of particular interest in Section 8 in order to parametrise integral solutions of the Pell-type equations introduced in Section 2.2.
(2) We define $Q_{\Lambda_i, r}$ in a similar fashion, by replacing $\mathcal{L}_{\Lambda_0}$ by $\mathcal{L}_{\Lambda_i}$.

(3) In the rest of this paper, we will often abuse notation and write $\mathcal{L}_{\Lambda_i}(q)$, or even simpler $\mathcal{L}_i(q)$, instead of $\mathcal{L}_{\Lambda_i}(t_q) = Q_{\Lambda_i, r}(q)$.

The following set will be of importance in Section 8.

**Definition 3.4.** Let $N \in \mathbb{N}$. We define the set $\mathcal{B}(N)$ as follows

$$ \mathcal{B}(N) = \{w \in W^0 \mid \mathcal{L}_{\Lambda_0}(w) = N\}. \qquad (31) $$

<figure><img src="image_4.png" /><figcaption>Fig. 4: Affine Grassmannian elements of $A_2^{(1)}$. Each alcove $\mathcal{A}_w$ is filled with the decomposition $w^{-1} = t_x v$. To shorten the notation, an element $s_{i_1} s_{i_2} \dots s_{i_n}$ is simply denoted by $i_1 i_2 \dots i_n$, for example 121 = $s_1 s_2 s_1$.</figcaption></figure>

## 3.2 Extended affine Grassmannian

We define here a natural notion of extended affine Grassmannian. We would like to define it as $W^0 \times_{\Sigma} W$ but unfortunately $W^0$ does not enjoy a group structure. However one can extend the quotient $W/W_0$ to $\widehat{W}/W_0$. Therefore the (right) extended affine Grassmannian is defined by

$$ \widehat{W}/_{W_0}. \qquad (32) $$

Recall that any element in $W \times F$ can be expressed uniquely as $g = \sigma w$ for $w \in W$ and $\sigma \in \Sigma$. As $\Sigma$ is the set of elements $\sigma$ of length $\ell(\sigma) = 0$, the following map is a natural bijection

$$ \begin{gathered} (W \times \Sigma)/_{W_0} \longrightarrow \Sigma \times W/W_0 \qquad (33) \\ [\sigma w] \longmapsto (\sigma, [w]). \end{gathered} $$

Moreover we know by (21) that $W/W_0 \simeq W^0$. Thus from (33) one deduce the following bijections

$$ \begin{gathered} (W \times \Sigma)/_{W_0} \longrightarrow \Sigma \times W^0 \longrightarrow \Sigma W^0 \qquad (34) \\ [\sigma w] \longmapsto (\sigma, w^0) \longmapsto \sigma w^0. \end{gathered} $$

We have by definition (6) that $\widehat{W} = T(L) \times W_0$. It follows that the following map is a bijection

$$ \begin{gathered} \hat{f}_r : \widehat{W}/_{W_0} \longrightarrow L \qquad (35) \\ [t_x \overline{w}] \longmapsto x. \end{gathered} $$

For instance, for $\sigma_j w \in \widehat{W}$ with $w = t_q \overline{w}$ one has $\sigma_j w = t_{\omega_j + M_j(q)} w_{0,j} w_0 \overline{w}$ and then

$$ \hat{f}_r([\sigma_j w]) = \omega_j + M_j(q). \qquad (36) $$
**Definition 3.5.** We define $\hat{Q}_{\Lambda_0,r}$ (where “r” stands for “right”) by requiring that the following diagram commutes.

<figure><img src="image_5.png" /></figure>

The elements $\sigma w \in \Sigma W^0$ are called extended affine Grassmannian elements and will be of great interest in the rest of the paper. Finally, we give the analogue of Definition 3.4 for extended affine Grassmannian elements.

**Definition 3.6.** Let $N \in \mathbb{N}$. We define the extended version of $\mathcal{B}(N)$ by

$$ \hat{\mathcal{B}}(N) := \{w \in \Sigma W^0 \mid \mathcal{L}_{\Lambda_0}(w) = N\}. \qquad (37) $$

# 4 Extended atomic length in type $A_n^{(1)}$ and $C_n^{(1)}$

In this section, we establish some important properties the atomic length in its extended version. We focus on types $A_n^{(1)}$ and $C_n^{(1)}$, which will be particularly relevant in Section 8.

## 4.1 Extended atomic length in type $A_n^{(1)}$

**Proposition 4.1.** In type $A_n^{(1)}$ we have for any $0 \le j \le n$

$$ \mathcal{L}_{\Lambda_j}(t_{\omega_i}) = h \operatorname{ch}_j(\omega_i) $$

where we emphasize that in the above equality that $\mathcal{L}_{\Lambda_0}(t_{\omega_i}) = 0$. Moreover for $1 \le i \le n$ we have

$$ \mathcal{L}_{\Lambda_i}(t_{\omega_i}) = i(h - i). $$

*Proof.* We claim that $|\omega_i|^2 = \frac{i(h-i)}{h}$ and $\mathrm{ht}(\omega_i) = \frac{i(h-i)}{2}$. Having these claims we see that they cancel each other in the formula of $\mathcal{L}_{\Lambda_j}(t_{\omega_i})$, indeed in type $A_n^{(1)}$ all the coefficients $a_j^\vee$ and $a_j$ are equal to 1. It follows then that

$$ \begin{align*} \mathcal{L}_{\Lambda_j}(t_{\omega_i}) &= h \operatorname{ch}_j(\omega_i) + \frac{1}{2} |\omega_i|^2 a_j^\vee h - a_j^\vee \operatorname{ht}(\omega_i) \\ &= h \operatorname{ch}_j(\omega_i) + \frac{1}{2} \frac{i(h-i)}{h} h - \frac{i(h-i)}{2} \\ &= h \operatorname{ch}_j(\omega_i) \\ &= (n+1) \operatorname{ch}_j(\omega_i). \end{align*} $$

Let us prove now the claims.

It is well known that the decomposition of $\omega_i$ in the canonical basis is given by

$$ \begin{align*} \omega_i &= (\varepsilon_1 + \cdots + \varepsilon_i) - \frac{i}{(n+1)} (\varepsilon_1 + \cdots + \varepsilon_{n+1}) \\ &= \left(1 - \frac{i}{n+1}\right) \varepsilon_1 + \cdots + \left(1 - \frac{i}{n+1}\right) \varepsilon_i - \frac{i}{n+1} \varepsilon_{i+1} - \cdots - \frac{i}{n+1} \varepsilon_{n+1}. \end{align*} $$

Therefore

$$ \begin{align*} |\omega_i|^2 &= (\omega_i | \omega_i) = i \left(1 - \frac{i}{n+1}\right)^2 + (n+1-i) \left(\frac{i}{n+1}\right)^2 \\ &= i \left(\frac{n+1-i}{n+1}\right)^2 + (n+1-i) \left(\frac{i}{n+1}\right)^2 \\ &= \frac{i(n+1-i)}{(n+1)^2} (n+1-i+i) \\ &= \frac{i(n+1-i)}{n+1} = \frac{i(h-i)}{h}. \end{align*} $$
It is also well known that the decomposition of $\omega_i$ in the basis of simple roots is given by

$$ \omega_i = \frac{1}{n+1} \left[ (n+1-i)\alpha_1 + 2(n+1-i)\alpha_2 + \cdots + i(n+1-i)\alpha_i \right] \\ + \frac{1}{n+1} \left[ i(n-i)\alpha_{i+1} + i(n-i-1)\alpha_{i+2} + \cdots + i\alpha_n \right] $$

Then we can rewrite it as

$$ \omega_i = \frac{n+1-i}{n+1} [\alpha_1 + 2\alpha_2 + \cdots + i\alpha_i] + \frac{i}{n+1} [\alpha_n + 2\alpha_{n-1} + \cdots + (n-i)\alpha_{i+1}]. $$

Therefore one has

$$ \begin{aligned} \mathrm{ht}(\omega_i) &= \frac{n+1-i}{n+1} \cdot \frac{i(i+1)}{2} + \frac{i}{n+1} \cdot \frac{(n-i)(n-i+1)}{2} = \frac{i(n+1-i)}{2(n+1)}(i+1+n-i) \\ &= \frac{i(n+1-i)}{2} = \frac{i(h-i)}{2}. \end{aligned} $$

For the second equality this comes from the fact that

$$ \mathrm{ch}_i(\omega_i) = \frac{i(n+1-i)}{n+1} = \frac{i(h-i)}{h} $$

and then

$$ \mathcal{L}_{\Lambda_i}(t_{\omega_i}) = h \, \mathrm{ch}_i(\omega_i) = h \cdot \frac{i(h-i)}{h} = i(h-i). $$

**Example 4.2.** For $A_2^{(1)}$. We have $\omega_1 = \frac{2}{3}\alpha_1 + \frac{1}{3}\alpha_2$ and $\omega_2 = \frac{1}{3}\alpha_1 + \frac{2}{3}\alpha_2$. Hence

$$ \mathcal{L}_{\Lambda_0}(t_{\omega_1}) = \mathcal{L}_{\Lambda_0}(t_{\omega_2}) = 0. $$

$$ \mathcal{L}_{\Lambda_1}(t_{\omega_1}) = 2 \quad \text{and} \quad \mathcal{L}_{\Lambda_1}(\omega_2) = 3 \cdot \frac{1}{3} = 1. $$

$$ \mathcal{L}_{\Lambda_2}(t_{\omega_1}) = 3 \cdot \frac{1}{3} = 1 \quad \text{and} \quad \mathcal{L}_{\Lambda_2}(t_{\omega_2}) = 2. $$

**Example 4.3.** For $A_3^{(1)}$. We have $\omega_1 = \frac{3}{4}\alpha_1 + \frac{1}{2}\alpha_2 + \frac{1}{4}\alpha_3$ and $\omega_2 = \frac{1}{2}\alpha_1 + \alpha_2 + \frac{1}{2}\alpha_3$ and $\omega_3 = \frac{1}{4}\alpha_1 + \frac{1}{2}\alpha_2 + \frac{3}{4}\alpha_3$. Hence

$$ \mathcal{L}_{\Lambda_0}(t_{\omega_1}) = \mathcal{L}_{\Lambda_0}(t_{\omega_2}) = \mathcal{L}_{\Lambda_0}(t_{\omega_3}) = 0. $$

$$ \mathcal{L}_{\Lambda_1}(t_{\omega_1}) = 3 \quad \text{and} \quad \mathcal{L}_{\Lambda_1}(t_{\omega_2}) = 4 \cdot \frac{1}{2} = 2 \quad \text{and} \quad \mathcal{L}_{\Lambda_1}(t_{\omega_3}) = 4 \cdot \frac{1}{4} = 1. $$

$$ \mathcal{L}_{\Lambda_2}(t_{\omega_1}) = 4 \cdot \frac{1}{2} = 2 \quad \text{and} \quad \mathcal{L}_{\Lambda_2}(t_{\omega_2}) = 4 \quad \text{and} \quad \mathcal{L}_{\Lambda_2}(t_{\omega_3}) = 4 \cdot \frac{1}{2} = 2. $$

$$ \mathcal{L}_{\Lambda_3}(t_{\omega_1}) = 4 \cdot \frac{1}{4} = 1 \quad \text{and} \quad \mathcal{L}_{\Lambda_3}(t_{\omega_2}) = 4 \cdot \frac{1}{2} = 2 \quad \text{and} \quad \mathcal{L}_{\Lambda_3}(t_{\omega_3}) = 3. $$

**Lemma 4.4.** Write $f = [\omega_1]$. For any $j \in J$ one has $[\omega_j] = f^j$ and $\sigma_j = \sigma_1^j$.

*Proof.* To prove it is enough to show that $\omega_j = j\omega_1 + x_M$ where $x_M \in M$. Indeed going to the quotient we will get $[\omega_j] = [j\omega_1] = [\omega_1]^j = f^j$. We know that for any $j \in I$ one has

$$ \omega_j = \frac{n+1-j}{n+1} [\alpha_1 + 2\alpha_2 + \cdots + j\alpha_j] + \frac{j}{n+1} [\alpha_n + 2\alpha_{n-1} + \cdots + (n-j)\alpha_{j+1}] $$

and then

$$ \omega_1 = \frac{n}{n+1}\alpha_1 + \frac{1}{n+1}[\alpha_n + 2\alpha_{n-1} + \cdots + (n-1)\alpha_2]. $$

Therefore

$$ \begin{aligned} \omega_j - j\omega_1 &= \left(\frac{n+1-j}{n+1} - j\frac{n}{n+1}\right)\alpha_1 + \sum_{k=2}^{j} \left(k \cdot \frac{n+1-j}{n+1} - j\frac{n+1-k}{n+1}\right)\alpha_k + \sum_{k=j+1}^{n} \left((n+1-k) \cdot \frac{j}{n+1} - j\frac{n+1-k}{n+1}\right)\alpha_k \\ &= (1-j)\alpha_1 + \sum_{k=2}^{j} (k-j)\alpha_k \\ &= \sum_{k=1}^{j-1} (k-j)\alpha_k. \end{aligned} $$
Hence, by setting $x_M = \sum_{k=1}^{j-1} (k-j)\alpha_k$ we do have $x_M \in M$ such that $w_j = j\omega_1 + x_M$. The second equality is a direct consequence of the first one and of the fact that $f = [\omega_1] \mapsto \sigma_1$ and $[\omega_j] \mapsto \sigma_j$ via the group isomorphism (10). $\square$

**Lemma 4.5.** Let $W = A_n^{(1)}$. The matrix $M_i$ (for $1 \le i \le n$) corresponding to $w_{0,i}w_0 \in W$ (in the canonical basis) is the square matrix of size $n+1$ given by $M_i^i$ where $M_1$ is the following matrix

$$M_1 = \begin{pmatrix} 0 & 0 & \cdots & 0 & 1 \\ 1 & 0 & \cdots & 0 & 0 \\ 0 & 1 & \cdots & 0 & 0 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & 1 & 0 \end{pmatrix}.$$

*Proof.* For $i=1$ it can be checked without difficulty by induction on $n$. For $i \ne 1$ it follows from the case $M_1$ and from Lemma 4.4. $\square$

Upcoming Lemma 4.6 and Theorem 4.7 are particularly important. Indeed, it has been observed that the atomic length, when considered on the Weyl group $W$, enjoys some striking similarities with the usual Coxeter length $\ell$ [CLG22]. Now, the Coxeter length $\ell$ is not affected while going to the extended affine Weyl group $\tilde{W}$ Section 1.4.1. This feature is straightforward by definition. On the contrary, it is a priori not clear that a similar behaviour should hold for the $\Lambda$-atomic length.

We already explained that the atomic length specialised to $\Lambda_0$ was of particular interest. Theorem 4.7 shows that $\mathcal{L}_{\Lambda_0}$ is invariant by multiplication by any element of the extended affine Weyl group.

For the following key lemma, recall that we had defined $J$ in Section 1.4.2, and that $J = \{1, 2, \dots, n\}$ in type $A_n^{(1)}$. Recall also that the elements $\sigma_j$ are defined in (8) and the maps $Q_{\Lambda_0, r}, \tilde{Q}_{\Lambda_0, r}$ are introduced in Definitions 3.2 and 3.5.

**Lemma 4.6.** Let $j \in J$ and $q \in M$. One has $\tilde{Q}_{\Lambda_0, r}(\omega_j + M_j(q)) = Q_{\Lambda_0, r}(q)$.

*Proof.* We proof separately the case $j=1$ with an approach that uses the canonical basis and the action of the matrix $M_1$. We could make all the remaining cases with the same approach but it would be longer. We prove then the general case via a theoretic Coxeter approach.

Any element in $\tilde{W}/W_0$ decomposes uniquely as $[\sigma_j w]$ for $j \in J$ and $w = t_q \in W^0$. We know by (36) that this element is sent to $\omega_j + M_j(q) \in L$ and to $\sigma_j w \in \Sigma W^0$. By definition of $\tilde{Q}_{\Lambda_0, r}$ it follows that $\tilde{Q}_{\Lambda_0, r}(\omega_j + M_j(q)) = \mathcal{L}_{\Lambda_0}(\sigma_j w)$. Therefore we need to compute $\mathcal{L}_{\Lambda_0}(\sigma_j w)$ and show that it is equal to $Q_{\Lambda_0, r}(q)$.

(1) Case $j=1$. We have

$$\begin{align*}
\mathcal{L}_{\Lambda_0}(\sigma_1 w) &= \mathcal{L}_{\Lambda_0}(t_{\omega_1} w_{0,1} w_0 t_q) && \text{by (8)} \\
&= \mathcal{L}_{\Lambda_0}(t_{\omega_1+w_{0,1} w_0(q)} w_{0,1} w_0) \\
&= \mathcal{L}_{\Lambda_0}(t_{\omega_1+w_{0,1} w_0(q)}) && \text{by Prop. 2.6} \\
&= \mathcal{L}_{\Lambda_0}(t_{\omega_1+M_1(q)}) && \text{by Lemma 4.5} \\
&= \mathcal{L}_{\Lambda_0}(t_{\omega_1}) + \mathcal{L}_{\Lambda_0}(t_{M_1(q)}) + h(\omega_1 | M_1(q)) && \text{by Theorem 2.4 and (29)} \\
&= \mathcal{L}_{\Lambda_0}(t_{M_1(q)}) + h(\omega_1 | M_1(q)) && \text{by Prop. 4.1} \\
&= \frac{h}{2} |M_1(q)|^2 - \mathrm{ht}(M_1(q)) + h(\omega_1 | M_1(q)) && \text{by Prop. 2.6.}
\end{align*}$$

As $M_1$ acts on $q = (q_1, \dots, q_n, q_{n+1})$ by $M_1(q) = (q_{n+1}, q_1, \dots, q_n)$ it follows that $|M_1(q)|^2 = |q|^2$. We claim now that $\mathrm{ht}(M_1(q)) - h(\omega_1 | M_1(q)) = \mathrm{ht}(q)$. First of all, with this claim and Proposition 2.6 the proof of the first point is complete.

Let us prove the claim. We know that for $q \in M$ (with $q_{n+1} = -(q_1 + \cdots + q_n)$) expressed in the canonical basis, its height is given by $\mathrm{ht}(q) = \sum_{k=1}^n (n+1-k)q_k$ (42). Moreover, expressing $\omega_1$ in the canonical basis
yields easily that $h(\omega_1 | M_1(q)) = (n+1)q_{n+1}$ (as $h = n+1$ in type $A_n^{(1)}$). Therefore

$$ 
\begin{align*}
\mathrm{ht}(M_1(q)) - h(\omega_1 | M_1(q)) &= nq_{n+1} + \sum_{k=1}^{n} (n-k)q_k - (n+1)q_{n+1} = -q_{n+1} + \sum_{k=1}^{n} (n-k)q_k \\
&= \sum_{k=1}^{n} q_k - \sum_{k=1}^{n} (n-k)q_k = \sum_{k=1}^{n} (n+1-k)q_k \\
&= \mathrm{ht}(q).
\end{align*}
$$

(2) Case $j \in J$. It is well known that $w_0(\Delta_0) = -\Delta_0$. An easy induction on $n$ shows that $w_{0,j}(\alpha_j)$ is the highest root, that is $w_{0,j}(\alpha_j) = \sum_{i=1}^n \alpha_i$, implying among others that $\mathrm{ht}(w_{0,j}(\alpha_j)) = n$. Moreover we also have $w_{0,i}(-\Delta_i) = \Delta_i$. Doing the same computation as in the point (1) yields

$$ 
\begin{align*}
\mathcal{L}_{\Lambda_0}(\sigma_j w) &= \frac{h}{2}|M_j(q)|^2 - \mathrm{ht}(M_j(q)) + h(\omega_j | M_j(q)) \\
&= \frac{h}{2}|q|^2 - \mathrm{ht}(M_j(q)) + h(\omega_j | M_j(q)).
\end{align*}
$$

Write $X = \{k \in J | w_0(\alpha_k) \neq -\alpha_j\} := J \setminus \{m\}$ and let $q = \sum_{k=1}^n a_k \alpha_k$. We have

$$ 
\begin{align*}
M_j(q) &= w_{0,j} w_0 \left( \sum_{k=1}^{n} a_k \alpha_k \right) \\
&= w_{0,j} \left( \sum_{k \in X} a_k w_0(\alpha_k) \right) + a_m w_{0,j}(-\alpha_j) \\
&= w_{0,j} \left( \sum_{\alpha_{k'} \in \Delta_j} a_k(-\alpha_{k'}) \right) - a_m \sum_{i=1}^{n} \alpha_i \\
&= \sum_{\alpha_{k''} \in \Delta_j} a_k \alpha_{k''} - a_m \sum_{i=1}^{n} \alpha_i.
\end{align*}
$$

The above equality shows in particular that the $j$-th coefficient of $M_j(q)$ in the simple basis (see also (28)) is equal to $-a_m$, hence $(\omega_j | M_j(q)) = -a_m$. It follows that

$$ 
\mathrm{ht}(M_j(q)) = \sum_{k \in X} a_k - n a_m = \sum_{k \in I} a_k - a_m - n a_m = \mathrm{ht}(q) - (1+n)a_m = \mathrm{ht}(q) + h(\omega_j | M_j(q)).
$$

Thus

$$ 
\begin{align*}
\mathcal{L}_{\Lambda_0}(\sigma_j w) &= \frac{h}{2}|q|^2 - \left(\mathrm{ht}(q) + h(\omega_j | M_j(q))\right) + h(\omega_j | M_j(q)) \\
&= \frac{h}{2}|q|^2 - \mathrm{ht}(q) \\
&= Q_{\Lambda_0, r}(q) \quad \text{by (30).}
\end{align*}
$$

□

**Theorem 4.7.** Let $W = A_n^{(1)}$, let $w \in W$ and let $j \in J$. One has

$$ (1) \quad \mathcal{L}_{\Lambda_0}(w) = \mathcal{L}_{\Lambda_0}(\sigma_j w) = \mathcal{L}_{\Lambda_0}(\sigma_1^j w). $$

$$ (2) \quad \mathcal{L}_{\Lambda_0}(wf^j) = \mathcal{L}_{\Lambda_0}(\pi_j(w)) \quad \text{where } f = [\omega_1]. $$

*Proof.*

(1) Write $w = w^0 w_0$ with $w^0 := t_q \in W^0$ and $w_0 \in W_0$. By Theorem 2.1 we have $\mathcal{L}_{\Lambda_0}(w) = \mathcal{L}_{\Lambda_0}(t_q)$. Moreover by Proposition 2.6 we also have $\mathcal{L}_{\Lambda_0}(\sigma_j w) = \mathcal{L}_{\Lambda_0}(\sigma_j w^0)$. By Section 3.2 we know that the element $[\sigma_j w] = [\sigma_j w^0] = [t_{\omega_j+M_j(q)} w_{0,j} w_0]$ is sent to $\sigma_j w^0 \in \Sigma W^0$ and to $\omega_j + M_j(q) \in L$. But then by definition of $\hat{Q}_{\Lambda_0,r}$ we have $\hat{Q}_{\Lambda_0,r} \circ \hat{f}_r([t_{\omega_j+M_j(q)} w_{0,j} w_0]) = \mathcal{L}_{\Lambda_0}(\sigma_j w^0)$, that is $\hat{Q}_{\Lambda_0,r}(\omega_j + M_j(q)) = \mathcal{L}_{\Lambda_0}(\sigma_j w^0) = \mathcal{L}_{\Lambda_0}(\sigma_j w)$. By Lemma 4.6 we also have $\hat{Q}_{\Lambda_0,r}(\omega_j + M_j(q)) = Q_{\Lambda_0,r}(q)$ and combining (30) and Theorem 2.1 we get $Q_{\Lambda_0,r}(q) = \mathcal{L}_{\Lambda_0}(t_q) = \mathcal{L}_{\Lambda_0}(w)$. This shows the first equality. With respect to the second one this is a direct consequence of Lemma 4.4.
(2) This is a direct consequence of (16) and the point (1) above.

To conclude this section, we prove a general fact in type $A_n^{(1)}$ which will be illustrated in Section 8.1 and Section 8.7. Recall that we have established the identity (24), considered as a Diophantine equation in the variables $x_1, \dots, x_n$. Recall also that the set $\hat{B}(N)$ was introduced in Definition 3.6.

**Corollary 4.8.** Let $N \in \mathbb{N}$. The number of elements in $\hat{B}(N)$ is divisible by $n+1$.

*Proof.* This is a direct consequence of Theorem 4.7. If $\hat{B}(N) = \emptyset$ then there is nothing to do. Assume that there exists $w = t_q \bar{w} \in W$ such that $\mathcal{L}_{\Lambda_0}(w) = N$. First, the elements $\sigma_i w$ with $j = 1, 2, \dots, n$ are all distinct by design. But then by Theorem 4.7 we have that $\sigma_j w \in \hat{B}(N)$. Now the only thing missing is to be sure that for another $\sigma_i v \in \hat{B}(N)$ the sets $\{\sigma_j w \mid j \in J\}$ and $\{\sigma_j v \mid j \in J\}$ have no intersection. But this is obvious because $\sigma_i w = \sigma_j v$ implies that $\sigma_i = \sigma_j$ and $w = v$. $\square$

## 4.2 Extended atomic length in type $C_n^{(1)}$

In type $C_n^{(1)}$, with the realisation of $M$ given in Table 1, we have $M = \sqrt{2\mathbb{Z}}\varepsilon_1 \oplus \dots \oplus \sqrt{2\mathbb{Z}}\varepsilon_n$, that is any $q \in M$ decomposes in the canonical basis as $q = (\sqrt{2}q_1, \dots, \sqrt{2}q_n)$ with $q_i \in \mathbb{Z}$. Expressing $q$ in the simple roots basis (see also Table 1) we get

$$q = 2q_1\alpha_1 + 2(q_1 + q_2)\alpha_2 + \dots + 2(q_1 + \dots + q_{n-1})\alpha_{n-1} + (q_1 + \dots + q_n)\alpha_n. \quad (38)$$

Thus the height of $q$ in terms of the $q_i$'s, which is the analogue of Formula (42) but in type $C_n^{(1)}$, is given by

$$\mathrm{ht}(q) = 2 \sum_{k=1}^{n-1} (n-k)q_k + \sum_{k=1}^{n} q_k. \quad (39)$$

**Proposition 4.9.** In type $C_n^{(1)}$ we have for any $0 \le j \le n$

$$\mathcal{L}_{\Lambda_j}(t_{\omega_i}) = 2n \operatorname{ch}_j(\omega_i) - i \frac{n-i}{2}$$

where we emphasize in the above equality that $\mathcal{L}_{\Lambda_0}(t_{\omega_n}) = 0$. In particular for $1 \le i < n$ we have

$$\mathcal{L}_{\Lambda_i}(t_{\omega_i}) = 2ni - i \frac{n-i}{2} \quad \text{and} \quad \mathcal{L}_{\Lambda_n}(t_{\omega_n}) = n^2.$$

*Proof.* In type $C_n$ all the $a_j^\vee$ are equal to 1 and $h = 2n$, so by Proposition 2.5 we have

$$\mathcal{L}_{\Lambda_j}(t_{\omega_i}) = 2n \cdot \operatorname{ch}_j(\omega_i) + n|\omega_i|^2 - \operatorname{ht}(\omega_i).$$

We know that in type $C_n$ the weight $\omega_i$ decomposes in the canonical basis as follows

$$\omega_i = \frac{\sqrt{2}}{2} (\varepsilon_1 + \varepsilon_2 + \dots + \varepsilon_i). \quad (40)$$

Hence $|\omega_i|^2 = i/2$. Moreover in the simple basis it decomposes as

$$\omega_i = (\alpha_1 + 2\alpha_2 + \dots + i\alpha_i) + i \cdot (\alpha_{i+1} + \dots + \alpha_{n-1} + \frac{1}{2}\alpha_n),$$

and it follows that

$$\mathrm{ht}(\omega_i) = \frac{i(i+1)}{2} + i(n-i-1) + \frac{i}{2} = \frac{-i^2 + 2ni}{2}.$$

Therefore

$$\begin{align*}
\mathcal{L}_{\Lambda_j}(t_{\omega_i}) &= 2n \cdot \operatorname{ch}_j(\omega_i) + n \frac{i}{2} - \frac{-i^2 + 2ni}{2} \\
&= 2n \cdot \operatorname{ch}_j(\omega_i) + \frac{ni + i^2 - 2ni}{2} \\
&= 2n \cdot \operatorname{ch}_j(\omega_i) + \frac{i^2 - ni}{2} \\
&= 2n \cdot \operatorname{ch}_j(\omega_i) - i \frac{n-i}{2}.
\end{align*}$$

$\square$
Recall that in type $C_n^{(1)}$ the group $\Sigma$ is given by $\Sigma = \{e, \sigma_n\} = \{e, t_{\omega_n}w_{0,n}w_0\}$ (see Section 1.4.4). The following theorem is the analogue of Theorem 4.7 in type $C_n^{(1)}$. We first need the following straightforward lemma.

**Lemma 4.10.** The matrix $M_n$ corresponding to $w_{0,n}w_0$ (in the canonical basis) is the square matrix of size $n$ given by

$$M_n = \begin{pmatrix} 0 & \cdots & 0 & -1 \\ 0 & \cdots & -1 & 0 \\ \vdots & \ddots & \vdots & \vdots \\ -1 & \cdots & 0 & 0 \end{pmatrix}.$$

*Proof.* It can be checked without difficulty by induction on $n$. □

**Theorem 4.11.** Let $w = t_q \overline{w} \in W = C_n^{(1)}$. One has $\mathcal{L}_{\Lambda_0}(\sigma_n w) = \mathcal{L}_{\Lambda_0}(w)$.

*Proof.* We need to carry out the same computation as in Lemma 4.6. One has

$$
\begin{align*}
\mathcal{L}_{\Lambda_0}(\sigma_n w) &= \mathcal{L}_{\Lambda_0}(t_{\omega_n} w_{0,n} w_0 t_q \overline{w}) \tag{8} \\
&= \mathcal{L}_{\Lambda_0}(t_{\omega_n+w_{0,n}w_0(q)} w_{0,n} w_0 \overline{w}) \\
&= \mathcal{L}_{\Lambda_0}(t_{\omega_n+w_{0,n}w_0(q)}) \tag*{by Prop. 2.6} \\
&= \mathcal{L}_{\Lambda_0}(t_{\omega_n+M_n(q)}) \tag*{by Lemma 4.10} \\
&= \mathcal{L}_{\Lambda_0}(t_{\omega_n}) + \mathcal{L}_{\Lambda_0}(t_{M_n(q)}) + h(\omega_n | M_n(q)) \tag*{by Theorem 2.4 and (29)} \\
&= \mathcal{L}_{\Lambda_0}(t_{M_n(q)}) + h(\omega_n | M_n(q)) \tag*{by Prop. 4.9} \\
&= \frac{h}{2} |M_n(q)|^2 - \mathrm{ht}(M_n(q)) + h(\omega_n | M_n(q)) \tag*{by Prop. 2.6.}
\end{align*}
$$

As $M_n$ acts on $q = (\sqrt{2}q_1, \dots, \sqrt{2}q_n)$ by $M_n(q) = -(\sqrt{2}q_n, \sqrt{2}q_{n-1}, \dots, \sqrt{2}q_1)$ it follows that $|M_n(q)|^2 = |q|^2$. We claim now that $\mathrm{ht}(M_n(q)) - h(\omega_n | M_n(q)) = \mathrm{ht}(q)$. First of all, with this claim and Proposition 2.6 the proof is complete. Using (38) for $M_n(q)$ with the change of variables $\varphi: k \mapsto n-k+1$ (coming from $M_n$) we get

$$M_n(q) = -2q_n\alpha_1 - 2(q_n + q_{n-1})\alpha_2 - \dots - 2(q_n + \dots + q_2)\alpha_{n-1} - (q_n + \dots + q_1)\alpha_n,$$

and then

$$
\begin{align*}
\mathrm{ht}(M_n(q)) &= -2q_n - 2(q_n + q_{n-1}) - \dots - 2(q_n + \dots + q_2) - (q_n + \dots + q_1) \\
&= -(2(n-1)+1)q_n - (2(n-2)+1)q_{n-1} - \dots - 3q_2 - q_1 \\
&= -(2n-1)q_n - (2n-3)q_{n-1} - \dots - 3q_2 - q_1.
\end{align*}
$$

Moreover by (40) we have easily that $(\omega_n | M_n(q)) = - \sum_{k=1}^{n} q_k$. Therefore, as $h = 2n$ it follows that

$$
\begin{align*}
\mathrm{ht}(M_n(q)) - h(\omega_n | M_n(q)) &= -(2n-1)q_n - (2n-3)q_{n-1} - \dots - 3q_2 - q_1 + 2n(q_1 + q_2 + \dots + q_{n-1} + q_n) \\
&= (2n-1)q_1 + (2n-3)q_2 + \dots + 3q_{n-1} + q_n \\
&= \mathrm{ht}(q) \text{ by (39).}
\end{align*}
$$

**Corollary 4.12.** Let $N \in \mathbb{N}$. The number of elements in $\hat{B}(N)$ is divisible by 2.

*Proof.* The proof is exactly the same as that of Corollary 4.8. □

# 5 Type $A_n^{(1)}$: core size and atomic length

In this section, we focus on type $A_n^{(1)}$. More precisely, let $W_0 = \langle s_1, \dots, s_n \rangle$ be the Weyl group of type $A_n$ and $W = \langle s_0, s_1, \dots, s_n \rangle = T(M) \times W_0$ (see Figure 1). We will recall Lascoux’s recursive construction of the $(n+1)$-cores via the action of $W$ [Las01]. Then, we will use the quadratic formula for the atomic length of Theorem 2.1, similar to that of [GKS90], to establish the special Diophantine equation evoked in Section 2.2.
## 5.1 Cores partitions via alcove geometry

Recall that we have bijections between $W/W_0$, affine Grassmannian elements, the lattice $M$, and alcoves of the fundamental chamber. For the rest of this paper, we write $C_{n+1}(N)$ for the set of $(n+1)$-cores of size $N$, and $C_{n+1} = \bigsqcup_{N \in \mathbb{N}} C_{n+1}(N)$. One can show that $W$ acts transitively on $C_{n+1}$, where the generator $s_i$ acts by adding or removing all boxes of residue $i$ (it is easy to see that these are either all addable or all removable) [Las01]. This yields a bijection

$$ \begin{gathered} W/W_0 \xrightarrow{\sim} C_{n+1} \\ w \mapsto w\emptyset, \end{gathered} \qquad (41) $$

where, on the left-hand side, we have identified cosets of $W/W_0$ with $W^0$, see Section 3.1. Moreover, this bijection intertwines the Bruhat order and the Young order (inclusion of partitions), see also [LM05, Proposition 40]. This bijection is usually realised using the alcove geometry of $W$, by filling the alcoves of the fundamental chamber by cores recursively as follows:

(1) Put the empty partition $\emptyset$ inside the fundamental alcove.

(2) Fill in all other alcoves of the fundamental chamber by $(n+1)$-cores recursively by adding all possible $i$-boxes each time a new $i$-wall is crossed.

**Example 5.1.** The case $e = 3$ is illustrated in Figure 5. There, 0 corresponds to the color black, 1 to blue and 2 to red.

<figure><img src="image_6.png" /><figcaption>Fig. 5: The fundamental chamber in type $A_2^{(1)}$ and the 3-cores.</figcaption></figure>

In [LLM$^{+}$14, Proposition 1.9], an explicit formula for the inverse map (that is, to construct an affine Grassmannian element from a core) is given, and relies on the notion of *bounded partition*.

Now, because of the formula $W = T(M) \bowtie W_0$, each $w \in W_{\text{aff}}$ decomposes uniquely as $w = t_q \bar{w}$ with $q \in M$, $\bar{w} \in W_0$. Let us identify $q$ with the vector $(q_1, \dots, q_{n+1})$ of its coordinates in the standard basis $(\varepsilon_1, \dots, \varepsilon_{n+1})$. To compute $q$ starting from $w$, one can use a reduced decomposition of $w$ and the formula $s_i t_{\gamma} = t_{s_i(\gamma)} s_i$. Alternatively, there is a more combinatorial way to figure out $q$, starting from the core partition $\lambda = w\emptyset$, let us recall this briefly. We refer to e.g. [JK84, GKS90] for the definition of the following notions. Since $\lambda$ is an $(n+1)$-core, the $(n+1)$-quotient of $\lambda$ is empty, and the position of the last bead of each row in the corresponding $(n+1)$-abacus determines a vector of size $n+1$, sometimes called the $(n+1)$-charge, which coincides with $(q_1, \dots, q_{n+1})$. The fact that these two procedures give the same vector $q$ is not hard to prove, see for instance [Las01, LM05, LLM$^{+}$14]. We decide not to recall in detail these combinatorial constructions, referring to the above literature instead, but we still find it useful to give below an example of computations with $(n+1)$-cores. Indeed, several results of this paper will be illustrated in a similar fashion, see Example 8.10, Example 8.19 and Example 8.29.
**Example 5.2.**

(1) One checks that the partition $(8, 5, 5, 2, 2, 1)$ is a 5-cores of size 23. It is represented by the following abacus.

<figure><img src="image_7.png" /></figure>

Its 5-quotient is represented by the abacus

<figure><img src="image_8.png" /></figure>

which in particular shows that $\lambda$ is a 5-core (since in each row, there are no gaps). We can read off the 5-charge: it is the index of the last bead of each row. We obtain the vector $(0, -1, 2, 1, -2)$.

(2) Consider the 3-core $(3, 1)$. On the one hand, one can check that its 3-quotient has associated charge $(0, -1, 1)$. On the other hand, from the alcove construction of cores, we see that $(3, 1) = w\emptyset$ with $w = s_2s_1s_0$. Indeed, in Figure 5, we have crossed walls of color 0 (black), then 1 (blue), then 2 (red) to reach the alcove containing the partition $(3, 1)$. Now, one checks that $w = s_2s_1s_0 = \tau_{-\alpha_2}s_2s_1s_\alpha$, hence $q = -\alpha_2 = -\varepsilon_2 + \varepsilon_3$, and the proposition is verified.

## 5.2 Size of core partitions and link with the Garvan–Kim–Stanton formula

Using either a representation-theoretic [CLG22] or a combinatorial [STW23] argument, we are ensured that the formula for the atomic length given in Section 2 gives the size of the corresponding $(n+1)$-core. More precisely, if $w = t_q\bar{w}$ for $\beta \in M$ and $\bar{w} \in W_0$ is any element of $W$, the size of the core $\lambda = w\emptyset$ is given by the formula

$$|\lambda| = \mathcal{L}(q) = \frac{n+1}{2} |q|^2 - \mathrm{ht}(q).$$

In order to compute $\mathcal{L}(q)$, we can use the decomposition $q = q_1\varepsilon_1 + \cdots + q_{n+1}\varepsilon_{n+1}$ of $q$ in the standard basis of $\mathbb{R}^{n+1}$. By the discussion in Remark 1.2, we have

$$|q|^2 = \sum_{i=1}^{n+1} q_i^2 = q_1^2 + \cdots + q_n^2 + (q_1 + \cdots + q_n)^2 = 2 \sum_{i=1}^{n} q_i^2 + 2 \sum_{1 \le i < j \le n} q_i q_j.$$

since $q_{n+1} = -(q_1 + \cdots + q_n)$, and

$$\mathrm{ht}(q) = \sum_{i=1}^{n} (n - i + 1)q_i. \qquad (42)$$

This yields the formula

$$\mathcal{L}(q) = (n+1) \left( \sum_{i=1}^{n} q_i^2 + \sum_{1 \le i,j \le n} q_i q_j \right) - \sum_{i=1}^{n} (n+1-i)q_i. \qquad (43)$$

The quadratic expression on the right-hand side is the polynomial $Q_{\Lambda_0,r}(q)$ introduced in Definition 3.2.

**Remark 5.3.** Note that since $\sum_{i=1}^{n+1} q_i = 0$, adding $n \sum_{i=1}^{n+1} q_i$ to the right-hand side above yields the formula

$$|\lambda| = (n+1) \left( \sum_{i=1}^{n} q_i^2 + \sum_{1 \le i,j \le n} q_i q_j \right) + \sum_{i=1}^{n+1} (i-1)q_i,$$

and we recover precisely the formula established by Garvan, Kim and Stanton [GKS90, Section 2].

Recall the procedure introduced in Section 2.2, which allows us to rewrite Identity (43) by performing a Gaussian reduction. Let us detail the computations in the following essential example.
### Example 5.4.

(1) Take $n = 2$. Then (43) gives

$$ \mathcal{L}(q) = Q_{\Lambda_0, r}(q) = 3(q_1^2 + q_2^2 + q_1q_2) - 2q_1 - q_2. $$

We want to perform a Gaussian reduction in order to have a sum of squares appear. This can be achieved as follows:

$$ \begin{aligned} \mathcal{L}(q) &= 3(q_2^2 + (q_1 - \frac{1}{3})q_2) + 3q_1^2 - 2q_1 \\ &= 3(q_2 + \frac{1}{2}q_1 - \frac{1}{6})^2 + (\frac{3}{2}q_1 - \frac{1}{2})^2 - \frac{1}{3} \end{aligned} $$

We can get rid of the denominators and obtain the following equivalent identity.

$$ 12\mathcal{L}(q) + 4 = (6q_2 + 3q_1 - 1)^2 + 3(3q_1 - 1)^2. $$

Setting $x = 6q_2 + 3q_1 - 1$ and $y = 3q_1 - 1$, we get a solution to the Diophantine equation

$$ x^2 + 3y^2 = 12N + 4 $$

by taking $N = \mathcal{L}(q)$. Note that this resembles Pell's equation, where we have allowed a negative coefficient in front of $y^2$.

(2) Take $n = 3$. In this case, we have

$$ \mathcal{L}(w) = 4(c_1^2 + c_2^2 + c_3^2 + c_1c_2 + c_2c_3 + c_1c_3) - 3c_1 - 2c_2 - c_3, $$

and by a similar procedure, we find the following equivalent identity.

$$ 48\mathcal{L}(w) + 30 = x^2 + 2y^2 + 3z^2 $$

where

$$ x = 4c_1 + 12c_2 - 3, \quad y = 8c_1 - 3, \quad z = 4c_1 + 4c_2 + 8c_3 - 1. $$

We will see that similar Pell-type equations can also be established in other Dynkin types. This will be investigated in Section 8 and yield the main theorems of this paper.

## 6 Combinatorial models for generalised cores

By the results of the previous section, it is natural to generalise the notion of core partitions by considering affine Grassmannian elements, or equivalently the elements of the lattice $M$. This is the point of view of [STW23], and we shall use this approach in this paper.

**Remark 6.1.** There is an even broader generalisation of cores. Let $\mathfrak{g}$ denote the affine Kac-Moody algebra associated to the chosen generalised Cartan matrix. It is well-known that we have a bijection

$$ \mathcal{O}(\Lambda_0) \stackrel{1:1}{\leftrightarrow} W/W_0, $$

where $\mathcal{O}(\Lambda_0)$ is the orbit, under the action of $W$, of the highest weight vertex in the $\mathfrak{g}$-crystal of the basic $\mathfrak{g}$-representation $V(\Lambda_0)$. Therefore, it is natural to consider a similar construction for an arbitrary dominant weight $\Lambda$. This is the approach of [CLG22], and also works for Kac-Moody algebras of finite type. However, we will not need this degree of generality in the rest of this paper.

Now, we want to have combinatorial models for these generalised cores. In classical untwisted types and in type $G_2^{(1)}$, this has been achieved in [STW23, Section 5], see also [HJ12, CW21], where $M$ is put in bijection with a certain subset of partitions (often self-conjugate with additional symmetry properties) Moreover, Stucky, Thiel and Williams [STW23] show that the statistic $\mathcal{L}_{\Lambda_0}$ (whose formula is given in Theorem 2.1) can be computed by counting boxes of the corresponding partition, but using an appropriate weighting for boxes of a given residue, hence generalising the formula of Remark 5.3. For the remaining types, namely the twisted ones, similar results have been established by Lecouvey and Wahiche [LW24]. We quickly recall the different results in all classical (untwisted and twisted) types and in types $G_2^{(1)}$ and $D_4^{(3)}$.

For $d \in \mathbb{Z}_{\ge 2}$ and $N \ge 0$, denote $\mathcal{SCC}_d(N)$ the set of self-conjugate $d$-cores of size $N$, and $\mathcal{SCC}_d = \bigsqcup_{N \in \mathbb{N}} \mathcal{SCC}_d(N)$. For $\lambda \in \mathcal{C}_d$ and for all $0 \le i \le d-1$, we denote by $|\lambda|_i$ the number of $i$-boxes of $\lambda$, so that $|\lambda| = \sum_{i=0}^{d-1} |\lambda|_i$.
## 6.1 Type $C_n^{(1)}$

let W be the Weyl group of type $C_n^{(1)}$, see Figure 1. Using a folding of the type $A_{2n-1}^{(1)}$ root system, see [STW23, Theorem 5.2] or [LW24, Section 4.2] for details, it is established that

$$W/W_0 \stackrel{\sim}{\leftrightarrow} \mathcal{SCC}_{2n}. \qquad (44)$$

Moreover, for $q = q_1\sqrt{2\varepsilon_1} + \cdots + q_n\sqrt{2\varepsilon_n} \in M$ with $q_i \in \mathbb{Z}$, we have

$$\mathcal{L}(q) = |\lambda|,$$

where $\lambda$ is the self-conjugate 2n-core corresponding to $q$ under Bijection (44).

## 6.2 Type $D_{n+1}^{(2)}$

let W be the Weyl group of type $D_{n+1}^{(2)}$, see Figure 1, which is the transpose of type $C_n^{(1)}$. Using a similar root system folding, see [LW24, Section 4.3] for details, we have

$$W/W_0 \stackrel{\sim}{\leftrightarrow} \mathcal{SCC}_{2n}. \qquad (45)$$

Moreover, for $q = q_1\sqrt{2\varepsilon_1} + \cdots + q_n\sqrt{2\varepsilon_n} \in M$ with $q_i \in \mathbb{Z}$, we have

$$\mathcal{L}(q) = \frac{1}{2}(|\lambda| - |\lambda|_0 + |\lambda|_n),$$

where $\lambda$ is the self-conjugate 2n-core corresponding to $q$ under Bijection (45).

In this case, there is an alternative partition model for which the size is exactly given by the atomic length, see [LW24]. Since we will need it in Section 8.3, we quickly recall this construction here. A *bar partition* is a partition with only distinct parts (these are also called *distinct* or 2-regular partitions). The combinatorics of bar partitions and their applications in representation have been extensively studied in the literature, see for instance the seminal work [Mor65]. To each bar partition $\lambda$, we can associate a *double distinct* partition $\tilde{\lambda}$, obtained by shifting row $k$ of the Young diagram of $\lambda$ $k$ steps to the right, and completing by the transpose of this shifted diagram, see [Mac98, Chapter III] for details.

**Example 6.2.** The partition $(4, 2, 1)$ is a bar partition of size 7. Its Young diagram is

<figure><img src="image_9.png" /></figure>

and its corresponding double distinct partition is

<figure><img src="image_10.png" /></figure>

The bar partition $\lambda$ is called an $(2n + 2)$-core if $\tilde{\lambda}$ is an $(2n + 2)$-core. Let us denote by $\mathcal{D}_{2n+2}(N)$ the set of $(2n + 2)$-core bar partitions of size $N$ with no part equal to $(n + 1)$, and $\mathcal{D}_{2n+2} = \cup_{N \in \mathbb{N}} \mathcal{D}_{2n+2}(N)$. As showed in [LW24], there is a bijection

$$W/W_0 \stackrel{\sim}{\leftrightarrow} \mathcal{D}_{2n+2} \qquad (46)$$

such that we have

$$\mathcal{L}(q) = |\lambda|$$

where $\lambda$ is the bar $(2n + 2)$-core corresponding to $q$ under Bijection (46). In fact, this bijection is explicit, and is essentially the same as the bijection in type $A_n^{(1)}$ recalled in Section 5.1. More precisely, starting with $q = q_1\sqrt{2\varepsilon_1} + \cdots + q_n\sqrt{2\varepsilon_n} \in M$, we first associate the vector $\tilde{q} = (0, q_1, \dots, q_n, 0, -q_n, \dots, -q_1)$. By the procedure illustrated in Example 5.2, this element $\tilde{q}$ defines a $(2n + 2)$-core partition, which turns out to lie in $\mathcal{D}_{2n+2}$: this is the partition $\tilde{\lambda}$. We will give an illustration of this construction later, namely in Example 8.19.

### Example 6.3.
(1) Take $n = 2$, so that $2n + 2 = 6$. Let us compute $\mathcal{D}_6(N)$ for the first values of $N$.

<table><thead><tr><th>size N</th><th>Elements of D<sub>6</sub>(N)</th></tr></thead><tbody><tr><td>0</td><td>Ø</td></tr><tr><td>1</td><td>☐</td></tr><tr><td>2</td><td>□□</td></tr><tr><td>3</td><td>□□□</td></tr><tr><td>4</td><td>□□□□</td></tr><tr><td>5</td><td>□□□□□, □□□□□□</td></tr><tr><td>6</td><td>none</td></tr></tbody></table>

(2) One can show that $\mathcal{D}_6(35) = \{(17, 11, 5, 2), (16, 10, 5, 4), (13, 10, 7, 4, 1)\}$.

## 6.3 Type $A_{2n}^{(2)}$

let $W$ be the Weyl group of type $A_{2n}^{(2)}$, see Figure 1. Using again a folding of the type $A_{2n-1}^{(1)}$ root system, see [LW24, Section 4.4] for details, it is established that we once again have

$$W/W_0 \xleftarrow{\sim} \mathcal{SCC}_{2n}. \qquad (47)$$

Moreover, for $q = q_1\epsilon_1 + \cdots + q_n\epsilon_n \in M$ with $q_i \in \mathbb{Z}$, we have

$$\mathcal{L}(q) = |\lambda| + |\lambda|_0,$$

where $\lambda$ is the self-conjugate $2n$-core corresponding to $q$ under Bijection (47).

## 6.4 Type $B_n^{(1)}$

let $W$ be the Weyl group of type $B_n^{(1)}$, see Figure 1. This time, one needs to first consider an embedding into the type $D_{n+1}^{(2)}$ root system, and then use the results of Section 6.2. We will need the set

$$\mathcal{SCC}_{2n}^{+} = \{\lambda \in \mathcal{SCC}_{2n} \mid \lambda \text{ has an even number of diagonal boxes}\}.$$

Then we have, by [STW23, Theorem 5.3] or [LW24, Section 4.6],

$$W/W_0 \xleftarrow{\sim} \mathcal{SCC}_{2n}^{+}. \qquad (48)$$

Moreover, for $q = q_1\epsilon_1 + \cdots + q_n\epsilon_n \in M$ with $q_i \in \mathbb{Z}$, we have

$$\mathcal{L}(q) = \frac{1}{2} (|\lambda| - |\lambda|_0 + |\lambda|_n),$$

where $\lambda \in \mathcal{SCC}_{2n}^{+}$ corresponds to $q$ under Bijection (48).

## 6.5 Type $A_{2n-1}^{(2)}$

let $W$ be the Weyl group of type $A_{2n-1}^{(2)}$, see Figure 1. This time, one needs to first consider an embedding into the type $A_{2n}^{(2)}$ root system, and then use the results of Section 6.3. By [LW24, Section 4.7], we have a bijection

$$W/W_0 \xleftarrow{\sim} \mathcal{SCC}_{2n}^{+}. \qquad (49)$$

Moreover, for $q = q_1\epsilon_1 + \cdots + q_n\epsilon_n \in M$ with $q_i \in \mathbb{Z}$, we have

$$\mathcal{L}(q) = \frac{1}{2} (|\lambda| - |\lambda|_0),$$

where $\lambda \in \mathcal{SCC}_{2n}^{+}$ corresponds to $q$ under Bijection (49).
## 6.6 Type $D_n^{(1)}$

let W be the Weyl group of type $D_n^{(1)}$, see Figure 1. One considers again an embedding into the type $D_{n+1}^{(2)}$ root system. We again get the following bijection, see [STW23, Theorem 5.4] or [LW24, Section 4.8],

$$W/W_0 \stackrel{\sim}{\leftrightarrow} \mathcal{SCC}_{2n}^{+} \qquad (50)$$

Moreover, for $q = q_1\sqrt{2\epsilon_1} + \cdots + q_n\sqrt{2\epsilon_n} \in M$ with $q_i \in \mathbb{Z}$, we have

$$\mathcal{L}(q) = \frac{1}{2} (|\lambda| - |\lambda|_0 - |\lambda|_n),$$

where $\lambda \in \mathcal{SCC}_{2n}^{+}$ corresponds to $q$ under Bijection (50).

## 6.7 Type $G_2^{(1)}$

let W be the Weyl group of type $D_n^{(1)}$, see Figure 1. By a more complicated construction, one obtains [LW24, Section 4.11],

$$W/W_0 \stackrel{\sim}{\leftrightarrow} \mathcal{SCC}_6^b, \qquad (51)$$

where $\mathcal{SCC}_6^b$ is the subset of self-conjugate 6-cores whose corresponding 6-charge is of the form $(c_1, c_2, c_1 - c_2, c_2 - c_1, -c_2, -c_1)$. Moreover, for $q = q_1\epsilon_1 + q_2\epsilon_2 + q_3\epsilon_3 \in M$ with $q_i \in \mathbb{Z}$ and $q_3 = -q_1 - q_2$, we have

$$\mathcal{L}(q) = \frac{1}{2} (|\lambda| - |\lambda|_0 + |\lambda|_3),$$

where $\lambda \in \mathcal{SCC}_6^b$ corresponds to $q$ under Bijection (51).

Alternatively, note that the 3-cores also provide a combinatorial model for the affine Grassmannian elements in this type, see [STW23, Section 5.4] and [CW21].

## 6.8 Type $D_4^{(3)}$

let W be the Weyl group of type $D_n^{(1)}$, see Figure 1. By a similar construction as for $G_2^{(1)}$, one obtains [LW24, Section 4.10],

$$W/W_0 \stackrel{\sim}{\leftrightarrow} \mathcal{SCC}_6^b, \qquad (52)$$

where $\mathcal{SCC}_6^b$ is the subset of self-conjugate 6-cores whose corresponding 6-charge is of the form $(c_1, c_2, c_1 - c_2, c_2 - c_1, -c_2, -c_1)$. Moreover, for $q = q_1\epsilon_1 + q_2\epsilon_2 + q_3\epsilon_3 \in M$ with $q_i \in \mathbb{Z}$ and $q_3 = -q_1 - q_2$, we have

$$\mathcal{L}(q) = \frac{1}{2} (|\lambda| - |\lambda|_0 - |\lambda|_3),$$

where $\lambda \in \mathcal{SCC}_6^b$ corresponds to $q$ under Bijection (52).

In this case, we will also use the alternative partition model of [LW24, Section 4.10], which we denote here $\mathcal{D}_4^b(N)$, in which the size of partitions is given by the atomic length. In other terms, we have

$$W/W_0 \stackrel{\sim}{\leftrightarrow} \mathcal{D}_4^b, \qquad (53)$$

and,

$$\mathcal{L}(q) = |\lambda|$$

where $\lambda$ is the partition corresponding to $q$ under Bijection (53). If we call $i$-part a non-zero part of $\lambda$ which is congruent to $i$ modulo 4, [LW24] show that the set $\mathcal{D}_4^b$ consists of bar partitions $\lambda$ of size $N$ such that $\tilde{\lambda}$ has no 4-hook below the diagonal$^2$, and with an extra technical condition relating the number of $i$-parts of $\lambda$ (for $i = 0, \pm, 2$), see Formula (55) below. Instead of recalling this relationship precisely here, we prefer to give the following construction, from which the exact formula can be easily derived.

The combinatorial recipe to construct $\lambda \in \mathcal{D}_4^b$ from $q \in M$ is as follows. Write $q = q_1\epsilon_1 + q_2\epsilon_2 + q_3\epsilon_3 \in M$. Recall that $q_3 = -q_1 - q_2$, so the knowledge of $(q_1, q_2)$ is enough. Then, define $m_0, m_{\pm 1}, m_2$ by

$$m_2 = |q_2|, \quad (m_1, m_{-1}) = \begin{cases} (|q_2|, 0) & \text{if } q_2 \le 0 \\ (0, |q_2|) & \text{if } q_2 > 0 \end{cases} \quad \text{and} \quad m_0 = \begin{cases} q_1 + q_2 & \text{if } q_1 + q_2 \ge 0 \\ -(q_1 + q_2) - 1 & \text{if } q_1 + q_2 < 0. \end{cases} \qquad (54)$$

Then define $\lambda$ to be the only partition such that

<footnote>$^2$ Note that this does not quite mean that $\tilde{\lambda}$ is a 4-core, as there might be boxes above or on the diagonal with hook-length 4.</footnote>
• $m_i$ is the number of $i$-parts of $\lambda$,

• $k$ is a part of $\lambda \Rightarrow k - 4$ is a part of $\lambda$ (if $k - 4 > 0$).

Note that the relation defining $m_0$ induces a relation between the $i$-parts of $\lambda$ of the form

$$m_0 = \pm m_{\pm 1} \pm m_2 - \delta \quad \text{with } \delta \in \{0, 1\}. \qquad (55)$$

### Example 6.4.

(1) Let $q = -3\varepsilon_1 + \varepsilon_2 + \varepsilon_3$, so that $(q_1, q_2) = (-3, 1)$. Formulas (54) yield

• $m_2 = 3$, so $\lambda$ contains the parts 2, 6, 10,

• $m_{-1} = 1$, so $\lambda$ contains the part 3,

• $m_0 = 1$, so $\lambda$ contains the part 4.

$$\text{We get } \lambda = (10, 6, 4, 3, 2) = \boxed{\phantom{00000}} \quad \boxed{\phantom{00000}} \quad \boxed{\phantom{00000}} \quad \boxed{\phantom{00000}} \quad \boxed{\phantom{00000}}$$

(2) Let us compute $\mathcal{D}_4^b(N)$ for the first values of $N$.

<table><thead><tr><th>size N</th><th>Elements of D<sub>4</sub><sup>b</sup>(N)</th></tr></thead><tbody><tr><td>0</td><td>Ø</td></tr><tr><td>1</td><td>☐</td></tr><tr><td>2</td><td>□</td></tr><tr><td>3</td><td>□□</td></tr><tr><td>4</td><td>none</td></tr><tr><td>5</td><td>□□□</td></tr><tr><td>6</td><td>□□□□</td></tr><tr><td>7</td><td>□□□□, □□□□</td></tr><tr><td>8</td><td>□□□□□</td></tr><tr><td>9</td><td>none</td></tr><tr><td>10</td><td>□□□□□□</td></tr></tbody></table>

# 7 Pell-type equations and group actions

In this short section, we investigate some $G$-set structures on the solution sets of certain Pell-like Diophantine equations, where $G$ is a well-chosen finite group. We will see in Section 8 that these equations will appear naturally in the study of generalised cores.

## 7.1 The Diophantine equation $x^2 + y^2 = k$

Let $k \ge 2$ be an integer. We consider the equation

$$x^2 + y^2 = k \qquad (56)$$

in the variables $x, y$. We denote by $\mathcal{U}(k)$ the set of integer solutions of (56).

First, we recall some generalities about (56). For that, we introduce some notation. We denote by $\mathcal{P}_1(k)$ and $\mathcal{P}_3(k)$ the sets of prime factors of $k$ with residue 1 and 3 modulo 4. Furthermore, we identify $\mathbb{Z}^2$ with the ring
of Gaussian integers $\mathbb{Z}[i]$ by $(x, y) \in \mathbb{Z} \mapsto x + iy \in \mathbb{Z}[i]$. By abuse of notation, we will continue to write $\mathcal{U}(k)$ for the set of elements $x + iy \in \mathbb{Z}[i]$ with $(x, y)$ solution of (56).

We also recall that $\mathbb{Z}[i]$ is a principal ideal domain with group of units $(\mathbb{Z}[i])^\times = \{1, -1, i, -i\}$, whose irreducible elements (up to association) are described as follows.

• The element $(1 + i)$.

• The set of prime integers with residue 3 modulo 4.

• The set of elements of the form $a + ib$ and $a - ib$ whose product is a prime integer with residue 1 modulo 4.

Let $\alpha \in \mathbb{N}$ and $m$ be an odd integer such that $k = 2^\alpha m$. By the famous sum of two squares theorem, we know that (56) has solutions if and only if $\nu_p(k)$ is even for all $p \in \mathcal{P}_3(k)$. In particular, $\mathcal{U}(k)$ is empty if and only if $\mathcal{U}(m)$ is.

From now on, we assume that Equation (56) has integer solutions. Then the product (with multiplicity) of the prime factors with residue 3 modulo 4 is a square denoted by $c^2$.

**Lemma 7.1.** *The map*

$$ \Phi : \mathcal{U}(m) \to \mathcal{U}(k), \quad z \mapsto (1+i)^\alpha cz, $$

is a bijection.

*Proof.* First, we remark that if $z' = (1+i)^\alpha cz$ with $z \in \mathcal{U}(m)$ (that is $z\bar{z} = m$), then

$$ z'\bar{z}' = (1+i)^\alpha (1-i)^\alpha c^2 z\bar{z} = 2^\alpha c^2 m = k. $$

Hence, $\Phi$ is well-defined. Now, assume that $z' \in \mathcal{U}(k)$. For any $p \in \mathcal{P}_1(k)$, we fix $z_p \in \mathbb{Z}[j]$ such that $p = z_p\bar{z}_p$. Since $(1-i) = -i(1+i)$, the $\mathbb{Z}[i]$-decomposition of $k$ into irreducible elements is

$$ k = (-i)^\alpha (1+i)^{2\alpha} \prod_{p \in \mathcal{P}_3} p^{\nu_p(k)} \prod_{p \in \mathcal{P}_1} z_p^{\nu_p(k)} \bar{z}_p^{\nu_p(k)}. \qquad (57) $$

Then by uniqueness of the $\mathbb{Z}[i]$-decomposition into irreducible factors of $k$, we deduce from $k = z'\bar{z}'$ that

• there are $z_1 \in \mathbb{Z}[i]$ with only irreducible factor $(1+i)$ and $z \in \mathbb{Z}[i]$ whose irreducible factors are some $z_p$ for $p \in \mathcal{P}_3(k)$, such that $z' = z_1 cz$,

• we must have $z_1\bar{z}_1 = 2^\alpha$ and $z\bar{z} = m$.

Since $(1+i)$ is the only irreducible factor of $z_1$, there is a unit element $\xi \in \mathbb{Z}[i]$ and a positive integer $u$ such that $z_1 = \xi(1+i)^u$. However, $z_1\bar{z}_1 = (-i)^u(1+i)^{2u}$, and the uniqueness of the decomposition of $2^\alpha$ into irreducibles implies that $u = \alpha$. Hence $z_1 = \xi(1+i)^\alpha$ and $\Phi(\xi z) = z'$, with $\xi z \in \mathcal{U}(m)$, proving that $\Phi$ is surjective. The injectivity of $\Phi$ is immediate. $\square$

Lemma 7.1 reduces the study of (56) to the case of odd integers $k$. On the other hand, considering the quadratic residues modulo 4, if $\mathcal{U}(k) \neq \emptyset$, then $k \equiv 1 \pmod 4$. Note that this last condition is equivalent to

$$ k \equiv 1 \pmod 8 \quad \text{or} \quad k \equiv 5 \pmod 8. $$

In the following, we will put natural families of solutions of $\mathcal{U}(k)$ ($k$ odd) in bijective correspondence with (extended) Grassmannian elements with respect to the type $C_2^{(1)}$ in Section 8.2. More precisely,

• using the affine Grassmannian elements in type $C_2^{(1)}$ of atomic length equal to $N$ (that are naturally in bijection with the elements of $\mathrm{SCC}_4(N)$), we obtain a description of the solutions of the Diophantine equation $x^2 + y^2 = 8N + 5$,

• similarly, but using the atomic length associated with the fundamental weight $\Lambda_1$ in type $C_2^{(1)}$, we obtain a description of the solutions of the Diophantine equation $x^2 + y^2 = 8N + 1$ in terms of the extended Grassmannian elements.
## 7.2 Group actions on the solution set of $x^2 + y^2 = k$

Let $D_8 = \langle r, s | r^4 = s^2 = (rs)^2 = 1 \rangle$ be the dihedral group of order 8. Clearly, the formulas

$$ \left\{ \begin{array}{ll} r(x, y) = (-y, x) & \text{for all } (x, y) \in \mathcal{U}(k) \\ s(x, y) = (y, x) & \end{array} \right. \qquad (58) $$

yield an action of $D_8$ on $\mathcal{U}(k)$ when $\mathcal{U}(k)$ is non-empty. The $D_8$-orbit of $(x, y)$ in $\mathcal{U}(k)$ is

$$ D_8(x, y) = \{(x, y), (x, -y), (-x, y), (-x, -y), (y, x), (y, -x), (-y, x), (-y, -x)\}. \qquad (59) $$

**Remark 7.2.** Through the identification $(x, y) \mapsto x + iy \in \mathbb{Z}[i]$ used in Section 7.1, observe that the elements $r, s \in D_8$ given in (58) act on $\mathcal{U}(k)$ respectively by multiplication by $i$ and $iconj$, where *conj* is the complex conjugation.

Now, all the subgroups of $D_8$ also act on $\mathcal{U}(k)$. In Section 8, we will need the following subgroup actions.

* The action of $\langle r \rangle \simeq C_4$ (the cyclic group of order 4)

$$ r(x, y) = (-y, x) \quad \text{for all } (x, y) \in \mathcal{U}(k). \qquad (60) $$

The orbit of $(x, y)$ under this $C_4$-action is

$$ C_4(x, y) = \{(x, y), (-y, x), (-x, -y), (y, -x)\}. \qquad (61) $$

* The action of $\langle rs, sr \rangle \simeq V_4$ (the Klein four-group)

$$ \left\{ \begin{array}{ll} rs(x, y) = (-x, y) & \text{for all } (x, y) \in \mathcal{U}(k). \\ sr(x, y) = (x, -y) & \end{array} \right. \qquad (62) $$

The orbit of $(x, y)$ under this $V_4$-action is

$$ V_4(x, y) = \{(x, y), (x, -y), (-x, y), (-x, -y)\}. \qquad (63) $$

**Lemma 7.3.** Let $(x, y) \in \mathcal{U}(k) \setminus \{(0, 0)\}$.

(1) The $C_4$-orbit of $(x, y)$ described in (61) has size 4.

(2) The $D_8$-orbit of $(x, y)$ described in (59) has size 8 if and only if $x, y \neq 0$ and $x \neq \pm y$.

*Proof.* Point (1) is clear by the explicit description of the orbit (61). Now, if $x, y \neq 0$ and $x \neq \pm y$, all the elements listed in (59) are pairwise distinct. Conversely, if $x = 0$ or $y = 0$ or $x = \pm y$, then the action of $\langle rs \rangle$, respectively $\langle sr \rangle$, respectively $\langle s \rangle$, is not free. $\square$

**Proposition 7.4.** Let $k \ge 2$. Assume that $\mathcal{U}(k)$ is non-empty. Then the $D_8$-action on $\mathcal{U}(k)$ is free if and only if $k$ is neither a perfect square nor twice a perfect square.

*Proof.* First, suppose that there is an integer $\ell$ such that $k = \ell^2$. Then $(\ell, 0) \in \mathcal{U}(k)$, and the $D_8$-orbit of $(\ell, 0)$ has size 4 by Lemma 7.3. Similarly, if $k = 2\ell^2$, then $(\ell, \ell) \in \mathcal{U}(k)$ and again, we conclude with Lemma 7.3. It follows that $D_8$ does not act freely on $\mathcal{U}(k)$ in these cases.

Now, assume that $k$ is not a square or twice a square. Then there is an odd non-perfect square $m$ and a non-negative integer $\alpha$ such that $k = 2^\alpha m$. As above, we identify $\mathbb{Z}^2$ with $\mathbb{Z}[i]$. As noted in Remark 7.2, the group $D_8$ is generated by the multiplication by $i$ and complex conjugation. Let $(x, y) \in \mathcal{U}(k)$ and set $z' = x + iy$. By Lemma 7.1 there are an integer $c$ with prime factors in $\mathcal{P}_3$ and $z \in \mathcal{U}_m$ such that $z' = (1 + i)^\alpha cz$. Suppose that $\bar{z}' \in \langle i \rangle \cdot z'$, that is, there is $\beta \in \mathbb{N}$ such that $\bar{z}' = i^\beta z'$. Since

$$ \bar{z}' = (1 - i)^\alpha c\bar{z} = i^{3\alpha}(1 + i)^\alpha c\bar{z}, $$

we deduce that

$$ \bar{z} = i^{3-3\alpha} z. $$

Write $z = u + iv$ with $u, v \in \mathbb{Z}$. We remark that $u \neq 0$ and $v \neq 0$ (otherwise $m = u^2$ or $m = v^2$) and if $u = \pm v$, that is $z = u(1 \pm i)$, then

$$ m = |i^{3-3\alpha} z|^2 = 2u^2 $$

is even, which is a contradiction. Thus, by Lemma 7.3, the $D_8$-orbit of $(x, y)$ has size 8, as required. $\square$
**Remark 7.5.** In fact, let us show that the $D_8$-orbits of $\mathcal{U}_k$ all have size 8 except exactly one with size 4. Assume $\mathcal{U}(k) \neq \emptyset$ where $k$ is a square or twice a square. Let $(x, y) \in \mathcal{U}(k)$ and assume that the $D_8$-orbit of $(x, y)$ has size 4.

* Suppose that $k = \ell^2$ is a square. If $x = \pm y$, then $x^2 + y^2 = 2x^2$, and $\ell^2 = 2x^2$ which is impossible. Hence, by Lemma 7.3, $x$ or $y$ is equal to 0. Say $y = 0$ (the case $x = 0$ is analogue). Then $x^2 = k = \ell^2$ and $x = \pm \ell$. It follows that $(x, y)$ and $(\ell, 0)$ have the same $D_8$-orbit.

* Suppose now that $k = 2\ell^2$ for some integer $\ell$. If $y = 0$ (the case $x = 0$ is similar) then $x^2 = k = 2\ell^2$ which is impossible. Hence, by Lemma 7.3, $x = \mp y$ and $2x^2 = 2\ell^2$ implying $x = \pm \ell$. The $D_8$-orbits of $(x, y)$ and $(\ell, \ell)$ are the same.

We will investigate the set $\mathcal{U}(k)$ in the case where $k$ is of the form

$$k = aN + b$$

for some $a, b \in \mathbb{N}$, where $N \in \mathbb{N}$ is fixed.

**Corollary 7.6.** Let $k$ be as above. Assume that $b$ is neither is neither a quadratic residue nor a twice a quadratic residue modulo $a$. Then the action (58) is free.

*Proof.* By contraposition, suppose that the $D_8$-action is not free. Then by Proposition 7.4, $k$ is either a square or twice a square. Since $k = aN + b$, reducing modulo $a$ implies that $b$ is either a quadratic residue or twice a quadratic residue. $\square$

*Proof.* We have $D_8 = V_4 \times \langle s \rangle$. Consider first the action of $V_4 = \langle rs \rangle \times \langle sr \rangle$ on $\mathcal{U}(k)$. The $V_4$-orbit of $(x, y)$ consists of the elements $(x, y), (-x, y), (x, -y), (-x, -y)$, and by Condition (1), these are all pairwise distinct modulo $c$, and therefore all pairwise distinct. The action of $\langle s \rangle$ (swapping components) produces the remaining elements listed in (59), which are again all distinct modulo $c$ by Condition (2), and therefore distinct. $\square$

**Remark 7.7.** In higher rank, that is for the Diophantine equation $x_1^2 + \dots + x_n^2 = k$, there is an analogous action of the hyperoctahedral group $H_n$. We will see in Section 8.8 that these equations naturally arise in affine types that have an underlying finite Weyl group of type $B_n$ or $C_n$ but that there is no hope of having a free action in general.

## 7.3 The Diophantine equation $x^2 + 3y^2 = k$

Let $k \in \mathbb{N}$ and consider the equation

$$x^2 + 3y^2 = k \qquad (64)$$

in the variables $x, y$. We denote again by $\mathcal{U}(k)$ the set of integer solutions of (64).

In this situation, we do not have an action of $D_8$, but we can will consider the following actions on $\mathcal{U}(k)$.

* The action of $V_4$ defined as in (62).

* If $k$ is even, the action of the cyclic group $C_6 = \langle t \rangle$ defined by

$$t(x, y) = (x', y') \text{ where } x' + jy' = -j(\frac{1}{2}x + \frac{i\sqrt{3}}{2}y), \qquad (65)$$

that is, $(x, y)$ is identified with the Eisenstein integer $\frac{x}{2} + i\sqrt{3}\frac{y}{2} \in \mathbb{Z}[j]$. Indeed, by the same argument as [BN22], this identification makes sense and this group action is well-defined if and only if $k$ is even.

We state the following lemma, analogous to Lemma 7.3, and whose proof is exactly the same.

**Lemma 7.8.** Let $(x, y) \in \mathcal{U}(k)$. The $V_4$-orbit of $(x, y)$ described in (63) has size 4 if and only if $x, y \neq 0$. In particular, if this condition holds for all $(x, y) \in \mathcal{U}(k)$, $V_4$ acts freely on $\mathcal{U}(k)$.
# 8 Solution sets via generalised cores

In this long section, we study the solutions of the Pell-type equations naturally arising from the atomic length in different Dynkin types. This new approach is based on the study of the generalised cores (recall that these are the (extended) affine Grassmannian elements). We will start by recalling how the results of [BN22] (involving usual 3-cores) naturally arise in our context. Then, we will see that our approach gives a simple combinatorial proof of [Alp14, Theorem 7] (involving self-conjugate 4-cores). The results of this section provide far-reaching extensions of these two papers, see also [OS97] for connected results on 3 and 4-cores.

We will first treat exhaustively all types of rank 2 in the case of the $\Lambda_0$-atomic length, before addressing some rank 3 types. Surprisingly, certain Dynkin types (notably $A_n^{(1)}$, $C_n^{(1)}$, $D_{n+1}^{(2)}$ and $D_4^{(3)}$) will provide very fruitful results, while others will not. The wide variety of results in this section illustrate the relevance of working with both untwisted and twisted Dynkin types.

Moreover, in type $C_2^{(1)}$, we will unsparingly use the theory developed in Section 2 and Section 2.3 as the $\Lambda_1$-atomic length and the extended atomic length will play a crucial role, see Section 8.2. The extended atomic length will also be heavily reinvested in Theorem 8.6 and Section 8.7.2 to refine the parametrisation of the solution sets investigated.

## 8.1 Type $A_2^{(1)}$

Let $W$ be the Weyl group of type $A_2^{(1)}$. Recall from Figure 1 that we have $M = \mathbb{Z}\alpha_1 + \mathbb{Z}\alpha_2 = \{q = q_1\epsilon_1 + q_2\epsilon_2 + q_3\epsilon_3 \in \mathbb{Z}\epsilon_1 + \mathbb{Z}\epsilon_2 + \mathbb{Z}\epsilon_3 | q_1 + q_2 + q_3 = 0\}$.

### 8.1.1 Crank and 3-cores

We denote

$$ \mathcal{B}(N) = \{q \in M \mid \mathcal{L}(q) = N\}. \qquad (66) $$

By Section 5, we have a bijection

$$ \mathcal{B}(N) \stackrel{\sim}{\longrightarrow} C_3(N) \qquad (67) $$

where $C_3(N)$ is the set of 3-core partitions of size $N$.

Moreover, recall that we have established in Example 5.4 that $\mathcal{L}$ verifies the following equation.

**Lemma 8.1.** For all $q \in M$, we have

$$ 12\mathcal{L}(q) + 4 = (6q_2 + 3q_1 - 1)^2 + 3(3q_1 - 1)^2. $$

Therefore, we consider the Diophantine equation (64) for $k4 \bmod 12$, that is

$$ x^2 + 3y^2 = 12N + 4. \qquad (68) $$

Recall that we had denoted $\mathcal{U}(k) = \{(x, y) \in \mathbb{Z}^2 \mid x^2 + 3y^2 = k\}$ be the set of solutions of (68). Then Lemma 8.1 ensures that the following map is well-defined

$$ \begin{array}{ccc} \varphi: & \mathcal{B}(N) & \longrightarrow \mathcal{U}(12N + 4) \\ & (q_1, q_2, q_3) & \longmapsto (6q_2 + 3q_1 - 1, 3q_1 - 1) \end{array} \qquad (69) $$

In [BN22, Theorem 2.1, Theorem 3.2], the authors proved the following.

**Theorem 8.2.** Let $N \in \mathbb{N}$.

(1) The action of the cyclic group $C_6$ on $\mathcal{U}(12N + 4)$ defined in (65) is free.

(2) The set $\mathrm{Im}(\varphi)$ is a complete set of representatives of the $C_6$-orbits of $\mathcal{U}(12N + 4)$.

By Theorem 8.2 together with Bijection (67), the following identity is straightforward.

**Corollary 8.3.** For all $N \in \mathbb{N}$, we have

$$ |C_3(N)| = \frac{1}{6} |\mathcal{U}(12N + 4)|. $$
### 8.1.2 Computations with the extended atomic length

In this subsection, we illustrate Theorem 4.7. Let $p$ be the map, similar to the map $\varphi$ of the previous section, defined by

$$ p : \mathbb{Z}^3 \longrightarrow \mathbb{Z}^2 \tag{70} \\ (x, y, z) \longmapsto (3x + 6y - 1, 3x - 1). $$

Consider the extended affine Grassmannian $\Sigma W^0$. Write $\sigma := \sigma_1$ so that $\sigma^2 = \sigma_2$.

* Let $w = t_q \bar{w} \in W$. We have

$$ \begin{align*} \mathcal{L}_{\Lambda_0}(\sigma w) &= \mathcal{L}_{\Lambda_0}(t_{\omega_1} s_1 s_2 w) & \text{by (12)} \\ &= \mathcal{L}_{\Lambda_0}(t_{\omega_1} s_1 s_2 t_q \bar{w}) \\ &= \mathcal{L}_{\Lambda_0}(t_{\omega_1+s_1s_2(q)} s_1 s_2 \bar{w}) \\ &= \mathcal{L}_{\Lambda_0}(t_{\omega_1+s_1s_2(q)}) & \text{by Prop. 2.6} \\ &= \mathcal{L}_{\Lambda_0}(t_{\omega_1}) + \mathcal{L}_{\Lambda_0}(t_{s_1s_2(q)}) + 3(\omega_1 | s_1s_2(q)) & \text{by Prop. 2.4} \\ &= \mathcal{L}_{\Lambda_0}(t_{s_1s_2(q)}) + 3(\omega_1 | s_1s_2(q)) & \text{by Prop. 4.1.} \end{align*} $$

The element $w_{0,1}w_0 = s_1s_2$ seen as element of $GL(\mathbb{R}^3)$ has for matrix

$$ M_1 = \begin{pmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix} $$

and then acts on $\mathbb{R}\langle\epsilon_1, \epsilon_2, \epsilon_3\rangle$ by $(q_1, q_2, q_3) \mapsto (q_3, q_1, q_2)$. Moreover we know from (42) that for any $(a, b, c) \in M$ one has $\mathrm{ht}((a, b, c)) = 2a + b$. Hence $\mathrm{ht}(M_1(q)) = 2q_3 + q_1 = -2(q_1 + q_2) + q_1 = -q_1 - 2q_2$.

Finally doing the computation $3(\omega_1 | M_1(q))$ gives $3q_3$. It follows that

$$ \begin{align*} \mathcal{L}_{\Lambda_0}(\sigma w) &= \mathcal{L}_{\Lambda_0}(t_{s_1s_2(q)}) + 3(\omega_1 | s_1s_2(q)) \\ &= \mathcal{L}_{\Lambda_0}(t_{M_1(q)}) + 3(\omega_1 | M_1(q)) \\ &= \frac{3}{2}|M_1(q)|^2 - \mathrm{ht}(M_1(q)) + 3(\omega_1 | M_1(q)) \\ &= \frac{3}{2}|q|^2 + q_1 + 2q_2 + 3q_3 \\ &= 3(q_1^2 + q_2^2 + q_1q_2) + q_1 + 2q_2 - 3(q_1 + q_2) \\ &= 3(q_1^2 + q_2^2 + q_1q_2) - 2q_1 - q_2. \end{align*} $$

* Doing the same kind of computations as above we have

$$ \mathcal{L}_{\Lambda_0}(\sigma^2 w) = \mathcal{L}_{\Lambda_0}(t_{s_2s_1(q)}) + 3(\omega_2 | s_2s_1(q)). $$

The element $w_{0,2}w_0 = s_2s_1$ seen as element of $GL(\mathbb{R}^3)$ has for matrix

$$ M_2 = M_1^2 = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{pmatrix} $$
and then acts on $\mathbb{R}\langle\epsilon_1, \epsilon_2, \epsilon_3\rangle$ by $(q_1, q_2, q_3) \mapsto (q_2, q_3, q_1)$. We also have $\mathrm{ht}(M_2(q)) = 2q_2 + q_3 = q_2 - q_1$ and $3(\omega_2 | M_2(q)) = -3q_1$. It follows then that

$$ 
\begin{aligned}
\mathcal{L}_{\Lambda_0}(\sigma^2 w) &= \mathcal{L}_{\Lambda_0}(t_{x_2(w)}) + 3(\omega_2 | x_2(w)) \\
&= \mathcal{L}_{\Lambda_0}(t_{M_2(q)}) + 3(\omega_2 | M_2(q)) \\
&= \frac{3}{2}|M_2(q)|^2 - \mathrm{ht}(M_2(q)) + 3(\omega_2 | M_2(q)) \\
&= \frac{3}{2}|q|^2 + q_1 - q_2 - 3q_1 \\
&= 3(q_1^2 + q_2^2 + q_1q_2) - 2q_1 - q_2.
\end{aligned}
$$

**Example 8.4.** Let us look at $\mathcal{U}(4) = \{(x, y) \in \mathbb{Z}^2 | x^2 + 3y^2 = 4\}$. As usual write $\sigma := \sigma_1 = t_{\omega_1}s_1s_2$ and $\sigma_2 = t_{\omega_2}s_2s_1 = \sigma^2$. Recall that $p$ is the map defined in (70) by $p(x, y, z) = (3x + 6y - 1, 3x - 1)$.

(1) The empty 3-core corresponds to $w = 1 \in W^0$, and its correspondent in $M$ is $q = (0, 0, 0)$. Then $p(0, 0, 0) = (-1, -1) =: a$ (see Figure 6). Now let us look at the images of $w$ in the extended affine Grassmannian, that is, the elements $\sigma_1 w$ and $\sigma_2 w$.

Clearly $\sigma_1 w = t_{\omega_1}s_1s_2$ and $\sigma_2 w = t_{\omega_2}s_2s_1$. However $\omega_1 = (2/3, -1/3, -1/3)$ and $\omega_1^2 = (1/3, 1/3, -2/3)$. It follows that $p(\omega_1) = (-1, 1) =: e$ and $p(\omega_2) = (2, 0) =: c$. We have then one element coming from each “layer” of $\tilde{W}$, namely $a$ from $W^0$, $e$ from $\sigma_1 W^0$ and $c$ from $\sigma_2 W^0$. Acting by $\mathbb{Z}/2\mathbb{Z}$ on these 3 points by $(x, y) \mapsto (-x, -y)$, one recover the full orbit of $a$, see Figure 6.

(2) Now let us look at the 3-core with one box, which corresponds to $w = s_0 = t_{\alpha_1+\alpha_2}s_1s_2s_1$. The correspondent in $M$ is $q = \alpha_1 + \alpha_2 = (1, 0, -1)$. The corresponding extended 3-cores are given by $\sigma w = t_{\omega_1+M_1(q)}s_1s_2s_1s_2s_1 = t_{\omega_1+M_1(q)}s_2$ and $\sigma^2 w = t_{\omega_2+M_2(q)}s_2s_1s_2s_1 = t_{\omega_2+M_2(q)}s_1$. Therefore, using the map $\tilde{f}_r$ (see Section 3.2) $\sigma w$ is identified with $\omega_1 + M_1(q) = (2/3, -1/3, -1/3) + (-1, 1, 0) = (-1/3, 2/3, -1/3)$ and $\sigma^2 w$ is identified with $\omega_2 + M_2(q) = (1/3, 1/3, -2/3) + (0, -1, 1) = (1/3, -2/3, 1/3)$. Now applying $p$ on these three elements we get $p(q) = (2, 2) =: a'$, $p(\omega_1 + M_1(q)) = (2, -2) =: e'$ and $p(\omega_2 + M_1^2(q)) = (-4, 0) =: c'$.

Notice that $\mathcal{L}_{\Lambda_0}(w) = 1$ and $\mathcal{L}_{\Lambda_0}(\sigma w) = \mathcal{L}_{\Lambda_0}(t_{M_1(q)}) + 3(\omega_1 | M_1(q)) = 4 + 3(-1) = 1$ (but we already knew it from Theorem 4.7). Of course we also have $\mathcal{L}_{\Lambda_0}(\sigma^2 w) = 1$. So the three elements: $(2, 2)$, $(2, -2)$, $(-4, 0)$, are solutions of the equation $x^2+3y^2 = 12 \cdot 1+4$, that come from the extended affine Grassmannian. A Sage verification shows that $\mathcal{U}(16) = \{(2, 2), (-2, 2), (-4, 0), (-2, -2), (2, -2), (4, 0)$. Once again we recover the full orbit only by acting by $\mathbb{Z}/2\mathbb{Z}$ on each layer of $\tilde{W}$, see Figure 6.

<figure><img src="image_11.png" /><figcaption>Fig. 6: Orbit in $\mathbb{Z}^2$ of the 3-cores $w = 1$ (on the blue ellipse) and $w = s_0$ (on the red ellipse) via the parametrisation $p$. The different colors represent the three layers of $\tilde{W}$ from which the integer points arise (blue from $W^0$, green from $\sigma_1 W^0$ and black from $\sigma_2 W^0$).</figcaption></figure>
### 8.1.3 The decomposition theorem for $A_2^{(1)}$

Let $W = A_2^{(1)}$ and $N \in \mathbb{N}$. Using [BN22, Th. 2.1] we know that the group $G = \langle R \rangle \subset \text{GL}(\mathbb{R}^2)$ is cyclic and has order 6, where

$$R = \frac{1}{2} \begin{pmatrix} 1 & -3 \\ 1 & 1 \end{pmatrix} \qquad (71)$$

and acts freely on $\mathcal{U}(12L + 4)$. Therefore any orbit under this action provides 6 points where only one of them comes from an affine 3-core $w = t_q \bar{w}$ that is seen as a point $p(q) \in \mathbb{Z}^2$ via the parametrisation $p$ defined in (70). For example in Figure 6 the point $a$ is the only 3-core of length 0 and acting on it by $G$ provides anticlockwise the other points on the blue ellipse. This is the same story for the red ellipse where $a'$ is the only 3-core of length 1.

Recall that $\mathcal{B}(N)$ is given in Definition 3.4. Let $\mathcal{O}_N(w)$ be the orbit under $G$ of a 3-core $w$ of size $N$, that is by expressing $w = t_q \bar{w}$ with $\mathcal{L}_{\Lambda_0}(t_q) = N$, the orbit is

$$\mathcal{O}_N(w) := \{R^k p(q) \mid k = 1, \dots, 6\}. \qquad (72)$$

By [BN22, Th. 3.2] we have the following decomposition

$$\begin{align}
\mathcal{U}(12N + 4) &:= \{(x, y) \in \mathbb{Z}^2 \mid x^2 + 3y^2 = 12N + 4\} \nonumber \\
&= \bigsqcup_{w \in \mathcal{B}(N)} \mathcal{O}_N(w). \tag{73}
\end{align}$$

<figure><img src="image_12.png" /><figcaption>Fig. 7: The six black points represent the orbit $\mathcal{O}_6(w)$ where $w = t_{2\alpha_1+\alpha_2}s_1s_2$ with corresponding 3-core (4, 2) and $a = p(2\alpha_1 + \alpha_2)$. Similarly the six red points represent the orbit $\mathcal{O}_6(v)$ where $v = t_{\alpha_1+2\alpha_2}s_2s_1$ with corresponding 3-core (2, 2, 1, 1) and $b = p(\alpha_1 + 2\alpha_2)$. There are only two 3-cores of size 6, hence $\mathcal{U}(76) = \mathcal{O}_6(w) \sqcup \mathcal{O}_6(v)$. To make the notation less cluttered in the picture we omit the symbol $p$, for example $p(\omega_1 + M_1(2\alpha_1 + \alpha_2))$ is $\omega_1 + M_1(a)$ and so forth.</figcaption></figure>

We see in Figure 7 that the full set of integral solutions can be recovered from only knowledge of the three red labelled points and the three blue labelled points, after applying $(x, y) \mapsto (-x, -y)$. The following theorem shows that we can refine the decomposition (73) using extended affine Grassmannian elements. Recall that the set $\tilde{\mathcal{B}}(N)$ is given in Definition 3.6. For $\sigma_i w = \sigma_i t_q \bar{w} \in \Sigma W^0$ of length $N$ let $\tilde{\mathcal{O}}_N(\sigma_i w)$ be the orbit of $\sigma_i w$ under $(x, y) \mapsto (-x, -y)$, that is

$$\tilde{\mathcal{O}}_N(\sigma_i w) := \{p(\omega_i + M_i(q)), -p(\omega_i + M_i(q))\}. \qquad (74)$$

**Lemma 8.5.** One has $p(\omega_1 + M_1(q)) = -R(p(q)) = R^3(p(q))$ and $p(\omega_2 + M_2(q)) = R^2(p(q))$.
**Proof.** Let $q = (q_1, q_2, q_3)$ with $q_1 + q_2 + q_3 = 0$. Then $\omega_1 + M_1(q) = (2/3, -1/3, -1/3) + (q_3, q_1, q_2) = \frac{1}{3}(3q_3 + 2, 3q_1 - 1, 3q_2 - 1)$ and $\omega_2 + M_2(q) = (1/3, 1/3, -2/3) + (q_2, q_3, q_1) = \frac{1}{3}(3q_2 + 1, 3q_3 + 1, 3q_1 - 2)$. Therefore $p(\omega_1 + M_1(q)) = (3q_3 + 2 + 2(3q_1 - 1) - 1, 3q_3 + 2 - 1) = (3q_3 + 6q_1 - 1, 3q_3 + 1) = (-3(q_1 + q_2) + 6q_1 - 1, -3(q_1 + q_2) + 1) = (3q_1 - 3q_2 - 1, -3q_1 - 3q_2 + 1)$.
Similarly $p(\omega_2 + M_2(q)) = (3q_2 + 1 + 2(3q_3 + 1) - 1, 3q_2 + 1 - 1) = (3q_2 + 6q_3 + 1, 3q_2) = (3q_2 - 6(q_1 + q_2) + 1, 3q_2) = (-6q_1 - 3q_2 + 1, 3q_2)$.
Now an easy computation of $R(p(q)), R^2(p(q))$ and $R^3(p(q))$ yields the announced statement. $\square$

**Theorem 8.6.** Let $w \in W^0$ such that $\mathcal{L}_{\Lambda_0}(w) = N$. We have

$$ (1) \quad \mathcal{O}_N(w) = \bigsqcup_{i=0}^{2} \hat{O}_N(\sigma_i w). $$

$$ (2) \quad \mathcal{U}(12N + 4) = \bigsqcup_{w \in \tilde{B}(N)} \hat{O}_N(w). $$

*Proof.*

(1) By Theorem 4.7 we know that $w, \sigma_1 w$ and $\sigma_2 w$ have the same $\Lambda_0$-length $N$. Let $a, b, c$ be the corresponding points, that is writing $w = t_q \bar{w}$ one has $a = p(q)$, $b = p(\omega_1 + M_1(q))$ and $c = p(\omega_2 + M_2(q))$. First of all notice that these points are all distinct since $p$ is injective and the vectors $q, \omega_1 + M_1(q)$ and $\omega_2 + M_2(q)$ are by design all distinct. Using Lemma 8.5 we have that they belong to the same orbit $\mathcal{O}_N(w)$. As the central symmetry preserves obviously the integrability of a solution (obtained after multiplying by $R^3$) we have then 6 integral points solution of the same equation $x^2 + 3y^2 = 12N + 4$ and in the same orbit. As each orbit has 6 points we are done.

(2) This is a direct consequence of (1) above and of the definition of $\hat{\mathcal{B}}(N)$ (37).

## 8.2 Type $C_2^{(1)}$

We now turn to the simplest non simply-laced Dynkin type. We obtain here two astonishing results. Theorem 8.8 simply uses the $\Lambda_0$-atomic length, and gives a bijective proof of Alpoge's number-theoretic result [Alp14, Theorem 7] on the solutions of $x^2 + y^2 = 8N + 5$, which we recover in Corollary 8.9. Theorem 8.12 is both truly important, as it treats the complementary equation $x^2 + y^2 = 8N + 1$, and very interesting, as it involves the $\Lambda_1$-atomic length, in its extended version. As such, it relies on virtually all the preceding results of this paper.

### 8.2.1 Pell-type equation from the basic atomic length

Let $W$ be the Weyl group of type $C_2^{(1)}$. By Figure 1, elements in $M$ write $q = q_1\sqrt{2}\varepsilon_1 + q_2\sqrt{2}\varepsilon_2$ with $(q_1, q_2) \in \mathbb{Z}^2$. Moreover, denote $\mathcal{B}(N) = \{q \in M \mid \mathcal{L}(q) = N\}$. By Section 6.1, we have a bijection

$$ \mathcal{B}(N) \stackrel{\sim}{\hookrightarrow} \mathcal{SCC}_4(N) \qquad (75) $$

where $\mathcal{SCC}_4(N)$ is the set of self-conjugate 4-core partitions of size $N$. Using the expression of the atomic length established in Theorem 2.1, we find

$$ \mathcal{L}(q) = 4q_1^2 + 4q_2^2 - 3q_1 - q_2. \qquad (76) $$

We now use a trick specific to this rank 2 type. Let $u : \mathbb{R}^2 \to \mathbb{R}^2$ be the isomorphism whose matrix in the standard basis $\{\varepsilon_1, \varepsilon_2\}$ is

$$ \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}. \qquad (77) $$

Recall from Figure 1 that the simple roots are $\alpha_1 = \frac{1}{\sqrt{2}}(\varepsilon_1 - \varepsilon_2)$ and $\alpha_2 = \sqrt{2}\varepsilon_2$. One can check that $u$ is an involutive isometry and that $u(\alpha_1) = \varepsilon_2$, $u(\alpha_2) = \varepsilon_1 - \varepsilon_2$. In particular, $\{u(\alpha_2), u(\alpha_1)\}$ forms a simple root system of type $B_2$. The image lattice $M' = u(M)$ is

$$ M' = \{q_1 + q_2 \in \mathbb{Z}\varepsilon_1 + \mathbb{Z}\varepsilon_2 \mid q_1 + q_2 \text{ is even}\}, $$
and we can consider the statistic $\mathcal{L}' = \mathcal{L} \circ u : M' \to \mathbb{N}$. The map $u$ restricts to a bijection

$$ \mathcal{B}(N) \xrightarrow{\sim} \mathcal{B}'(N) \qquad (78) $$

where

$$ \mathcal{B}'(N) = u(\mathcal{B}(N)) = \{q' \in M' \mid \mathcal{L}'(q') = N\}. $$

Moreover, rewriting the right-hand side of (76) by setting $u(q) = q' = q'_1\epsilon_1 + q'_2\epsilon_2 \in M'$ and using (77), we obtain the formula

$$ \mathcal{L}'(q') = 2q_1'^2 + 2q_2'^2 - 2q_1' - q_2'. $$

We can rewrite this as

$$ \mathcal{L}'(q') = \frac{1}{8}(4q_1' - 2)^2 + \frac{1}{8}(4q_2' - 1)^2 - \frac{5}{8}, $$

and we obtain the following equivalent identity

**Lemma 8.7.** For all $q' \in M'$, we have

$$ 8\mathcal{L}'(q') + 5 = (4q_1' - 2)^2 + (4q_2' - 1)^2. $$

Therefore, we consider Equation (56) for $a = 8$ and $b = 5$, that is

$$ x^2 + y^2 = 8N + 5 \qquad (79) $$

and the corresponding solution set $\mathcal{U}(8N + 5)$. Lemma 8.7 ensures that the following map is well-defined

$$ \begin{array}{ccc} \varphi: & \mathcal{B}'(N) & \to \mathcal{U}(8N + 5) \\ & (q_1', q_2') & \mapsto (4q_1' - 2, 4q_2' - 1) \end{array} \qquad (80) $$

**Theorem 8.8.** Let $N \in \mathbb{N}$.

(1) The action of $D_8$ on $\mathcal{U}(8N + 5)$ given in (58) is free.

(2) The set $\mathrm{Im}(\varphi)$ is a complete set of representatives of the $D_8$-orbits of $\mathcal{U}(8N + 5)$.

*Proof.* Let $N \in \mathbb{N}$.

(1) By Corollary 7.6, it suffices to show that 5 is neither a quadratic residue nor twice a quadratic residue modulo 8. We have $5 = -3 \mod 8$, and the quadratic residues modulo 8 are given in the following table.

<table><tr><th>x</th><td>0</td><td>&plusmn;1</td><td>&plusmn;2</td><td>&plusmn;3</td><td>4</td></tr><tr><th>x<sup>2</sup></th><td>0</td><td>1</td><td>4</td><td>1</td><td>0</td></tr></table>

The result follows.

(2) We need to show that each orbit contains exactly one element of $\mathrm{Im}(\varphi)$. Let us prove the existence first. Let $(x', y') \in \mathcal{U}(8N + 5)$ and consider the associated orbit $\mathcal{O}$. By the above table, one of $x, y$ must be $\pm 2 \mod 8$, so it must be $\pm 2 \mod 4$, and the other must be $\pm 1$ or $\pm 3$, so it must be $\pm 1 \mod 4$. Therefore, $\mathcal{O}$ contains an element $(x, y)$ verifying $x = -2 \mod 4$ and $y = -1 \mod 4$. Write $x = 4r_1 - 2$ and $y = 4r_2 - 1$.

* If $r_1 + r_2$ is even, then $(r_1, r_2) \in \mathcal{B}'(N)$ and

$$ (x, y) = \varphi(r_1, r_2). $$

* If $r_1 + r_2$ is odd, then $(1 - r_1, r_2) \in \mathcal{B}'(N)$. Moreover, the pair $(-x, y)$ also belongs to $\mathcal{O}$ and we have

$$ (-x, y) = (4(1 - r_1) - 2, 4r_2 - 1) = \varphi(1 - r_1, r_2). $$

Finally, let us prove uniqueness. Let $(r_1, r_2), (t_1, t_2) \in \mathcal{B}'(N)$ be distinct. Suppose that $\varphi(r_1, r_2)$ and $\varphi(t_1, t_2)$ are in the same orbit. Then we must have $4r_2 - 1 = 4t_2 - 1$ and $4r_1 - 2 = -4t_1 + 2$, therefore $r_2 = t_2$ and $r_1 = 1 - t_1$. But then $r_1 + r_2 = 1 - t_1 + t_2$, so $r_1 + r_2$ is odd since $t_1 + t_2$ is even, which is a contradiction.

□
Theorem 8.8 implies that

$$|\mathcal{B}'(N)| = \frac{1}{8} |\mathcal{U}(8N + 5)|.$$

Combining this with Bijections (75) and (78), we get the following result. This recovers [Alp14, Theorem 7].

**Corollary 8.9.** For all $N \in \mathbb{N}$, we have

$$|\mathcal{SCC}_4(N)| = \frac{1}{8} |\mathcal{U}(8N + 5)|.$$

**Example 8.10.** Take $N = 40$. One can check that there are 3 self-conjugate 4-cores of size 40, namely

<figure><img src="image_13.png" /></figure>

which correspond respectively to the following elements $\sqrt{2}(q_1, q_2)$ of $M$:

$$\sqrt{2}(1, -3) , \sqrt{2}(-1, 3) , \sqrt{2}(-2, -2).$$

Applying $u$, we obtain the following corresponding elements $(q'_1, q'_2)$ of $M'$:

$$(-2, 4) , (2, -4) , (-4, 0).$$

Finally, applying $\varphi$ yields respectively the following pairs $(x, y)$:

$$(-10, 15) , (6, -17) , (-18, -1).$$

These are the representatives in $\mathrm{Im}(\varphi)$ of the three $D_8$-orbits on the set of solutions of $x^2 + y^2 = 325$ (there are 24 integer solutions in total).

### 8.2.2 Type $C_2^{(1)}$: a new Diophantine equation using the $\Lambda_1$-atomic length

Let us now study $\mathcal{L}_1$, that is, the $\Lambda_1$-atomic length. We will consider its extended version, but restricted to $T(L)$, that is, elements of the form $t_x$ for $x \in L$. Since

$$L = \frac{1}{2} M = \left\{ \sqrt{2}q_1\varepsilon_1 + \sqrt{2}q_2\varepsilon_2 \mid q_1, q_2 \in \frac{1}{2}\mathbb{Z} \right\},$$

we have

$$\mathcal{L}_1 : T(L) \to \frac{1}{2}\mathbb{N}.$$

Recall that $\Lambda_1 = \Lambda_0 + \omega_1$ where $\omega_1 = \frac{1}{\sqrt{2}}\varepsilon_1$. Combining Proposition 2.2 and Proposition 2.5 (for $\Lambda = \Lambda_1$ and $x = q$), we have

$$\mathcal{L}_1(q) = 4q_1^2 + 4q_2^2 + q_1 - q_2. \qquad (81)$$

We now consider again $\mathcal{L}'_1 = \mathcal{L}_1 \circ u : L' \to \mathbb{N}$, where

$$L' = u(L) = \{q'_1\varepsilon_1 + q'_2\varepsilon_2 \mid q_1, q_2 \in \mathbb{Z}\}.$$

Note that $u$ is compatible with the decomposition $L = M \sqcup (L \setminus M)$, that is,

$$u(L) = u(M) \sqcup u(L \setminus M).$$

Since $M' = u(M)$ is again the lattice of integer pairs of even sum, $L' \setminus M' = u(L \setminus M)$ is the set of integer pairs of odd sum.

Similarly to the previous section, and in accordance with the notation of Definition 3.6, we let

$$\widehat{\mathcal{B}}_1(N) = \{q \in L \mid \mathcal{L}_1(q) = N\} \quad \text{and} \quad \widehat{\mathcal{B}}'_1(N) = u(\widehat{\mathcal{B}}_1(N)) = \{q' \in L' \mid \mathcal{L}'_1(q') = N\}.$$

The map $u$ restricts to a bijection

$$\widehat{\mathcal{B}}_1(N) \xrightarrow{\sim} \widehat{\mathcal{B}}'_1(N) \qquad (82)$$
Moreover, rewriting the right-hand side of (81) by setting $u(q) = q' = q'_1\epsilon_1 + q'_2\epsilon_2 \in P'$ and using (77), we obtain the formula

$$ \mathcal{L}'_1(q') = 2q_1'^2 + 2q_2'^2 + q_2'. \qquad (83) $$

We can rewrite this as

$$ \mathcal{L}'_1(q') = 2q_1'^2 + 2(q_2' + \frac{1}{4})^2 - \frac{1}{8}, $$

and we obtain the following equivalent identity.

**Lemma 8.11.** For all $q' \in L'$, we have

$$ 8\mathcal{L}'_1(q') + 1 = (4q_1')^2 + (4q_2' + 1)^2. $$

Therefore, we consider Equation (56) for $a = 8$ and $b = 1$, that is

$$ x^2 + y^2 = 8N + 1 \qquad (84) $$

and the corresponding solution set $\mathcal{U}(8N + 1)$. Lemma 8.11 ensures that the following map is well-defined

$$ \begin{aligned} \varphi : \widehat{B}'_1(N) &\to \mathcal{U}(8N + 1) \\ (q'_1, q'_2) &\mapsto (4q'_1, 4q'_2 + 1) \end{aligned} \qquad (85) $$

**Theorem 8.12.** Let $N \in \mathbb{N}$.

(1) The action of the cyclic group $C_4$ on $\mathcal{U}(8N + 1)$ given in (60) is free.

(2) The sets $\varphi(M')$ and $\varphi(L' \setminus M')$ are disjoint. Moreover, $\varphi(L')$ is a complete set of representatives of the $C_4$-orbits of $\mathcal{U}(8N + 1)$.

*Proof.*

(1) Let $(x, y) \in \mathcal{U}(8N + 1)$. In particular, $x^2 + y^2 = 1 \mod 4$. Recall the quadratic residues modulo 8 given in the proof of Theorem 8.8. Up to permutation, we must have, modulo 8, $x \in \{0, 4\}$ and $y \in \{\pm 1, \pm 3\}$. In particular, $x = 0 \mod 4$ and $y = \pm 1 \mod 4$. Using (61), we see that the $C_4$-orbit of $(0, 1)$ and $(0, -1)$ are both equal to

$$ \{(0, 1), (-1, 0), (0, -1), (1, 0)\}, $$

and have size 4. A fortiori, the $C_4$-orbit of $(x, y)$ also has size 4, that is, the action is free.

(2) If $(x, y) \in \varphi(M')$ then $(x, y) = (4q'_1, 4q'_2 + 1)$ for some $q_1, q_2$ with $q_1 + q_2$ even. Then $x + y = 1 \mod 8$. On the contrary, if $(x, y) \in \varphi(L' \setminus M')$ then $(x, y) = (4q'_1, 4q'_2 + 1)$ for some $q_1, q_2$ with $q_1 + q_2$ odd, and in this case $x + y = 5 \mod 8$. Therefore $\varphi(M')$ and $\varphi(L' \setminus M')$ are disjoint.

Let us prove the second statement, by showing that each orbit contains a unique $(x, y)$ such that $\varphi(q) = (x, y)$ for some $q \in L'$. Let $(x', y') \in \mathcal{U}(8N + 1)$ and consider its $C_4$-orbit $\mathcal{O}$. By the same consideration as in (1), there is a unique $(x, y) \in \mathcal{O}$ such that $x = 0 \mod 4$ and $y = 1 \mod 4$.

* If $x = 0 \mod 8$ and $y = 1 \mod 8$, then $x = 8k_1$ and $y = 8k_2 + 1$. Then

$$ (x, y) = (4(2k_1), 4(2k_2) + 1) = \varphi(2k_1, 2k_2) \in \varphi(M'). $$

* If $x = 0 \mod 8$ and $y = 5 \mod 8$, then $x = 8k_1$ and $y = 8k_2 + 5$. Then

$$ (x, y) = (4(2k_1), 4(2k_2 + 1) + 1) = \varphi(2k_1, 2k_2 + 1) \in \varphi(L' \setminus M'). $$

* If $x = 4 \mod 8$ and $y = 1 \mod 8$, then $x = 8k_1 + 4$ and $y = 8k_2 + 1$. Then

$$ (x, y) = (4(2k_1 + 1), 4(2k_2) + 1) = \varphi(2k_1 + 1, 2k_2) \in \varphi(L' \setminus M'). $$

* If $x = 4 \mod 8$ and $y = 5 \mod 8$, then $x = 8k_1 + 4$ and $y = 8k_2 + 5$. Then

$$ (x, y) = (4(2k_1 + 1), 4(2k_2 + 1) + 1) = \varphi(2k_1 + 1, 2k_2 + 1) \in \varphi(M'). $$

Using (82), we obtain an analogue of Corollary 8.9 for the Diophantine equation $x^2 + y^2 = 8N + 1$.
<table><caption>Fig. 8: Solutions of $x^2 + y^2 = 8N + 1$ via affine Grassmannian elements of type $C_2^{(1)}$.</caption><thead><tr><th>N</th><th>q' ∈ M' | L'(q') = N</th><th>φ(q')</th><th>q' ∈ L' \ M' | L'(q) = N</th><th>φ(q')</th><th>Solutions of x² + y² = 8N + 1</th></tr></thead><tbody><tr><td>0</td><td>(0, 0)</td><td>(0, 1)</td><td></td><td></td><td>(-1, 0)<br>(0, -1)<br>(0, 1)<br>(1, 0)</td></tr><tr><td>1</td><td></td><td></td><td>(0, -1)</td><td>(0, -3)</td><td>(-3, 0)<br>(0, -3)<br>(0, 3)<br>(3, 0)</td></tr><tr><td>2</td><td></td><td></td><td>(-1, 0)<br>(1, 0)</td><td>(-4, 1)<br>(4, 1)</td><td>(-4, -1)<br>(-4, 1)<br>(-1, -4)<br>(-1, 4)<br>(1, -4)<br>(1, 4)<br>(4, -1)<br>(4, 1)</td></tr><tr><td>3</td><td>(-1, -1)<br>(1, -1)</td><td>(-4, -3)<br>(4, -3)</td><td>(0, 1)</td><td>(0, 5)</td><td>(-5, 0)<br>(-4, -3)<br>(-4, 3)<br>(-3, -4)<br>(-3, 4)<br>(0, -5)<br>(0, 5)<br>(3, -4)<br>(3, 4)<br>(4, -3)<br>(4, 3)<br>(5, 0)</td></tr><tr><td>4</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>5</td><td>(-1, 1)<br>(1, 1)</td><td>(-4, 5)<br>(4, 5)</td><td></td><td></td><td>(-5, -4)<br>(-5, 4)<br>(-4, -5)<br>(-4, 5)<br>(4, -5)<br>(4, 5)<br>(5, -4)<br>(5, 4)</td></tr><tr><td>6</td><td>(0, -2)</td><td>(0, -7)</td><td></td><td></td><td>(-7, 0)<br>(0, -7)<br>(0, 7)<br>(7, 0)</td></tr><tr><td>7</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>8</td><td>(-2, 0)<br>(2, 0)</td><td>(-8, 1)<br>(8, 1)</td><td>(-1, -2)<br>(1, -2)</td><td>(-4, -7)<br>(4, -7)</td><td>(-8, -1)<br>(-8, 1)<br>(-7, -4)<br>(-7, 4)<br>(-4, -7)<br>(-4, 7)<br>(-1, -8)<br>(-1, 8)<br>(1, -8)<br>(1, 8)<br>(4, -7)<br>(4, 7)<br>(7, -4)<br>(7, 4)<br>(8, -1)<br>(8, 1)</td></tr><tr><td>9</td><td></td><td></td><td>(-2, -1)<br>(2, -1)</td><td>(-8, -3)<br>(8, -3)</td><td>(-8, -3)<br>(-8, 3)<br>(-3, -8)<br>(-3, 8)<br>(3, -8)<br>(3, 8)<br>(8, -3)<br>(8, 3)</td></tr><tr><td>10</td><td>(0, 2)</td><td>(0, 9)</td><td></td><td></td><td>(-9, 0)<br>(0, -9)<br>(0, 9)<br>(9, 0)</td></tr><tr><td>11</td><td></td><td></td><td>(-2, 1)<br>(2, 1)</td><td>(-8, 5)<br>(8, 5)</td><td>(-8, -5)<br>(-8, 5)<br>(-5, -8)<br>(-5, 8)<br>(5, -8)<br>(5, 8)<br>(8, -5)<br>(8, 5)</td></tr><tr><td>12</td><td></td><td></td><td>(-1, 2)<br>(1, 2)</td><td>(-4, 9)<br>(4, 9)</td><td>(-9, -4)<br>(-9, 4)<br>(-4, -9)<br>(-4, 9)<br>(4, -9)<br>(4, 9)<br>(9, -4)<br>(9, 4)</td></tr><tr><td>13</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>14</td><td>(-2, -2)<br>(2, -2)</td><td>(-8, -7)<br>(8, -7)</td><td></td><td></td><td>(-8, -7)<br>(-8, 7)<br>(-7, -8)<br>(-7, 8)<br>(7, -8)<br>(7, 8)<br>(8, -7)<br>(8, 7)</td></tr></tbody></table>
**Corollary 8.13.** For all $N \in \mathbb{N}$, we have

$$|\widehat{\mathcal{B}}_1(N)| = \frac{1}{4}|\mathcal{U}(8N + 1)|.$$

**Example 8.14.** We illustrate in Figure 8 how the solutions of $x^2 + y^2 = 8N + 1$ correspond to elements of $M'$ and $L' \setminus M'$ taken in combination.

**Remark 8.15.**

(1) Let $\mathcal{H}: M \to \mathbb{N}$ defined by the formula

$$\mathcal{H}(q) = 4q_1^2 + 4q_2^2 - 3q_1 + 3q_2$$

for all $q = q_1\sqrt{2\varepsilon_1} + q_2\sqrt{2\varepsilon_2} \in M$. Again, using the change of variables $(q_1, q_2) \mapsto (q'_1, q'_2)$ induced by $u$, we get the statistic $\mathcal{H}' = \mathcal{H} \circ u$ whose formula is

$$\mathcal{H}'(q') = 2q_1'^2 + 2q_2'^2 - 3q_2'$$

This can be rewritten as

$$\mathcal{H}'(q') = 2q_1'^2 + 2(q_2' - \frac{3}{4})^2 - \frac{9}{8},$$

and we obtain the following equivalent identity:

$$8(\mathcal{H}'(q') + 1) + 1 = (4q_1')^2 + (4q_2' - 3)^2$$

for all $q' \in M'$. Now, observe that

$$\mathcal{H}'(q') = 2q_1'^2 + 2q_2'^2 - 3q_2' = 2q_1'^2 + 2(q_2' - 1)^2 + (q_2' - 1) + 1 = \mathcal{L}_1'((q_1', q_2' - 1)) + 1.$$

Therefore, it is equivalent to consider the combination of $\mathcal{L}_1$ and $\mathcal{H}$ on the lattice $M$ or only $\mathcal{L}_1$ on the finer lattice $L$.

(2) We leave open the problem of finding a combinatorial model as in Section 6 in which the size of partitions is given by the statistics $\mathcal{L}_1$ and $\mathcal{H}$ on $M$.

## 8.3 Type $D_3^{(2)}$

Let $W$ be the Weyl group of type $D_3^{(2)}$. By Figure 1, elements in $M$ write $q = q_1\sqrt{2\varepsilon_1} + q_2\sqrt{2\varepsilon_2}$ with $(q_1, q_2) \in \mathbb{Z}^2$ Moreover, denote $\mathcal{B}(N) = \{q \in M | \mathcal{L}(q) = N\}$. By Section 6.2, we have a bijection

$$\mathcal{B}(N) \stackrel{\sim}{\longrightarrow} \mathcal{D}_6(N). \qquad (86)$$

Using the expression of the atomic length established in Theorem 2.1, we find

$$\begin{aligned} \mathcal{L}(q) &= 3q_1^2 + 3q_2^2 - 2q_1 - q_2 \\ &= 3(q_1 - \frac{2}{3})^2 + 3(q_2 - \frac{1}{3})^2 - \frac{5}{12} \end{aligned}$$

We can get rid of the denominators and obtain the following equivalent identity.

**Lemma 8.16.** For all $q \in M$, we have

$$12\mathcal{L}(q) + 5 = (6q_1 - 2)^2 + (6q_2 - 1)^2.$$

Therefore, we consider Equation (56) for $a = 12$ and $b = 5$, that is

$$x^2 + y^2 = 12N + 5 \qquad (87)$$

and the corresponding solution set $\mathcal{U}(12N + 5)$. Lemma 8.16 ensures that the following map is well-defined

$$\begin{aligned} \varphi: \mathcal{B}(N) &\longrightarrow \mathcal{U}(12N + 5) \\ (q_1, q_2) &\longmapsto (6q_1 - 2, 6q_2 - 1) \end{aligned} \qquad (88)$$

**Theorem 8.17.** Let $N \in \mathbb{N}$.
(1) The action of $D_8$ on $\mathcal{U}(12N + 5)$ given in (58) is free.

(2) The set $\mathrm{Im}(\varphi)$ is a complete set of representatives of the $D_8$-orbits of $\mathcal{U}(12N + 5)$.

*Proof.* Let $N \in \mathbb{N}$.

(1) By Corollary 7.6, it suffices to show that 5 is neither a quadratic residue nor twice a quadratic residue modulo 12. The quadratic residues modulos 12 are given in the following table.

<table><tr><th>x</th><td>0</td><td>±1</td><td>±2</td><td>±3</td><td>±4</td><td>±5</td><td>6</td></tr><tr><th>x<sup>2</sup></th><td>0</td><td>1</td><td>4</td><td>-3</td><td>4</td><td>1</td><td>0</td></tr></table>

and the result follows.

(2) We need to show that each orbit contains exactly one element of $\mathrm{Im}(\varphi)$. In order to do this, we look at residues modulo 6. Let $(x, y) \in \mathcal{U}(12N + 5)$, so that

$$x^2 + y^2 = -1 \quad \mathrm{mod} \ 6.$$

The quadratic residues modulo 6 are

<table><tr><th>x</th><td>0</td><td>±1</td><td>±2</td><td>3</td></tr><tr><th>x<sup>2</sup></th><td>0</td><td>1</td><td>-2</td><td>3</td></tr></table>

Therefore, we must have $(x \mod 6, y \mod 6) \in \{(\pm1, \pm2), (\pm1, \pm2)\}$. We now observe (see (59)) that this set is precisely the orbit of $(x \mod 6, y \mod 6)$ under the action (58) of $D_8$. Therefore, the pair $(-2, -1)$ yields a unique element in the orbit of $(x, y)$, that writes $(6q_1 - 2, 6q_2 - 1)$, and this element clearly lies in $\mathrm{Im}(\varphi)$.

Theorem 8.8 implies that

$$|\mathcal{B}(N)| = \frac{1}{8} |\mathcal{U}(12N + 5)|.$$

Combining this with Bijection (86), we get the following result.

**Corollary 8.18.** For all $N \in \mathbb{N}$, we have

$$|\mathcal{D}_6(N)| = \frac{1}{8} |\mathcal{U}(12N + 5)|.$$

**Example 8.19.** Recall Example 6.3 (2), where we had determined $\mathcal{D}_6(35)$. We found the following partitions

<figure><img src="image_14.png" /></figure>

whose corresponding double distinct partitions are respectively

<figure><img src="image_15.png" /></figure>

The corresponding vectors, computed by the abacus method illustrated in Example 5.2 are respectively

$$(0, -3, 1, 0, -1, 3), \quad (0, -1, -3, 0, 3, 1), \quad (0, 3, -2, 0, 2, -3).$$
Recall that by Section 6.2, these are of the form $(0, q_1, q_2, 0, -q_2, -q_1)$ and we can extract the associated elements $(q_1, q_2) \in M$, which constitute the set $\mathcal{B}(35)$:

$$(-3, 1), \quad (-1, -3), \quad (3, -2).$$

Finally, we use the map $\varphi$ to get the corresponding solutions of $x^2 + y^2 = 425$, which are

$$(-20, 5), \quad (-8, -19), \quad (16, -13).$$

The remaining solutions are obtained by letting $D_8$ act on these particular solutions, that is by allowing sign changes and component switching.

## 8.4 Type $A_4^{(2)}$

Let $W$ be the Weyl group of type $A_4^{(2)}$. By Figure 1, elements in $M$ write $q = q_1\varepsilon_1 + q_2\varepsilon_2$ with $(q_1, q_2) \in \mathbb{Z}^2$
Moreover, denote $\mathcal{B}(N) = \{q \in M \mid \mathcal{L}(q) = N\}$. For $q = q_1\varepsilon_1 + q_2\varepsilon_2 \in M$,

$$|q|^2 = q_1^2 + q_2^2 \quad \text{and} \quad \text{ht}(q) = \frac{3}{2}q_1 + \frac{1}{2}q_2.$$

By Theorem 2.1, we obtain

$$\begin{aligned} \mathcal{L}(q) &= \frac{5}{2}q_1^2 + \frac{5}{2}q_2^2 - \frac{3}{2}q_1 - \frac{1}{2}q_2 \\ &= \frac{5}{2}(q_1 - \frac{3}{10})^2 + \frac{5}{2}(q_2 - \frac{1}{10})^2 - \frac{1}{4} \end{aligned}$$

which is equivalent to the following identity.

**Lemma 8.20.** For all $q \in M$, we have

$$40\mathcal{L}(q) + 10 = (10q_1 - 3)^2 + (10q_1 - 1)^2.$$

Therefore, we now consider Equation (56) for $a = 40$ and $b = 10$, that is

$$x^2 + y^2 = 40N + 10 \qquad (89)$$

and the corresponding solution set $\mathcal{U}(40N + 10)$. Lemma 8.20 ensures that the following map is well-defined

$$\begin{array}{rcl} \varphi: & \mathcal{B}(N) & \longrightarrow \mathcal{U}(40N + 10) \\ & (q_1, q_2) & \longmapsto (10q_1 - 3, 10q_2 - 1) \end{array} \qquad (90)$$

Unfortunately, here, no direct analogue of Theorems 8.2, 8.8, 8.12 and 8.17, as illustrated in the following example. However, we are able to prove the following. Recall the $D_8$ action on $\mathcal{U}(40N + 10)$ given in (58)

**Proposition 8.21.** Let $q \in M$. Then the $D_8$-orbit of $\varphi(q)$ has size 8.

*Proof.* Let $q \in M$ and $(x, y) = \varphi(q)$. We have $x = -3 \mod 10$ and $y = -1 \mod 10$. Therefore, Lemma 7.3 applies and the result follows. $\square$

**Example 8.22.** We determine in Figure 9 the affine Grassmannian elements of atomic length $N$, give the corresponding solution of $x^2 + y^2 = 40N + 10$, and compare this to the remaining solutions of the equation. We see that the action of $D_8$ is not necessarily free. For instance, for $N = 1$, the orbit of $(5, 5)$ has size only 4. However, the orbit of $\varphi(q)$ has size 8 for all $q \in M$, which illustrates Proposition 8.21 It is unclear how to get the remaining solutions.

## 8.5 Type $G_2^{(1)}$

Let $W$ be the Weyl group of type $G_2^{(1)}$. By Figure 1, elements in $M$ write $q = q_1\varepsilon_1 + q_2\varepsilon_2 + q_3\varepsilon_3$ with $(q_1, q_2, q_3) \in \mathbb{Z}^3$ such that $q_3 = -q_1 - q_2$. One computes

$$|q|^2 = 2q_1^2 + 2q_2^2 + 2q_1q_2 \quad \text{and} \quad \text{ht}(q) = -4q_1 - 5q_2.$$

This yields

$$\begin{aligned} \mathcal{L}(q) &= 6q_1^2 + 6q_2^2 + 6q_1q_2 + 4q_1 + 5q_2 \\ &= 6(q_1 + \frac{1}{2}q_2 + \frac{1}{3})^2 + \frac{9}{2}(q_2 + \frac{1}{3})^2 - \frac{7}{6} \end{aligned}$$

which is equivalent to the following identity.
<table><caption>Fig. 9: Solutions of $x^2 + y^2 = 40N + 10$ versus affine Grassmannian elements of type $A_4^{(2)}$.</caption><thead><tr><th>N</th><th>q ∈ B(N)</th><th>φ(q)</th><th>solutions of x<sup>2</sup> + y<sup>2</sup> = 40N + 10</th></tr></thead><tbody><tr><td>0</td><td>(0, 0)</td><td>(-3, -1)</td><td>(-3, -1)<br>(-3, 1)<br>(-1, -3)<br>(-1, 3)<br>(1, -3)<br>(1, 3)<br>(3, -1)<br>(3, 1)</td></tr><tr><td>1</td><td>(1, 0)</td><td>(7, -1)</td><td>(-7, -1)<br>(-7, 1)<br>(-5, -5)<br>(-5, 5)<br>(-1, -7)<br>(-1, 7)<br>(1, -7)<br>(1, 7)<br>(5, -5)<br>(5, 5)<br>(7, -1)<br>(7, 1)</td></tr><tr><td>2</td><td>(0, 1)</td><td>(-3, 9)</td><td>(-9, -3)<br>(-9, 3)<br>(-3, -9)<br>(-3, 9)<br>(3, -9)<br>(3, 9)<br>(9, -3)<br>(9, 3)</td></tr><tr><td>3</td><td>(0, -1)<br>(1, 1)</td><td>(-3, -11)<br>(7, 9)</td><td>(-11, -3)<br>(-11, 3)<br>(-9, -7)<br>(-9, 7)<br>(-7, -9)<br>(-7, 9)<br>(-3, -11)<br>(-3, 11)<br>(3, -11)<br>(3, 11)<br>(7, -9)<br>(7, 9)<br>(9, -7)<br>(9, 7)<br>(11, -3)<br>(11, 3)</td></tr><tr><td>4</td><td>(-1, 0)<br>(1, -1)</td><td>(-13, -1)<br>(7, -11)</td><td>(-13, -1)<br>(-13, 1)<br>(-11, -7)<br>(-11, 7)<br>(-7, -11)<br>(-7, 11)<br>(-1, -13)<br>(-1, 13)<br>(1, -13)<br>(1, 13)<br>(7, -11)<br>(7, 11)<br>(11, -7)<br>(11, 7)<br>(13, -1)<br>(13, 1)</td></tr><tr><td>5</td><td></td><td></td><td></td></tr><tr><td>6</td><td>(-1, 1)</td><td>(-13, 9)</td><td>(-15, -5)<br>(-15, 5)<br>(-13, -9)<br>(-13, 9)<br>(-9, -13)<br>(-9, 13)<br>(-5, -15)<br>(-5, 15)<br>(5, -15)<br>(5, 15)<br>(9, -13)<br>(9, 13)<br>(13, -9)<br>(13, 9)<br>(15, -5)<br>(15, 5)</td></tr></tbody></table>
<table><caption>Fig. 10: Solutions of $x^2 + 3y^2 = 6N + 7$ versus affine Grassmannian elements of type $G_2^{(1)}$.</caption><thead><tr><th>N</th><th>q ∈ B(N)</th><th>φ(q)</th><th>solutions of x<sup>2</sup> + 3y<sup>2</sup> = 6N + 7</th></tr></thead><tbody><tr><td>0</td><td>(0, 0)</td><td>(2, 1)</td><td>(-2, -1)<br>(-2, 1)<br>(2, -1)<br>(2, 1)</td></tr><tr><td>1</td><td>(0, -1)</td><td>(-1, -2)</td><td>(-1, -2)<br>(-1, 2)<br>(1, -2)<br>(1, 2)</td></tr><tr><td>2</td><td>(-1, 0)</td><td>(-4, 1)</td><td>(-4, -1)<br>(-4, 1)<br>(4, -1)<br>(4, 1)</td></tr><tr><td>3</td><td></td><td></td><td>(-5, 0)<br>(5, 0)</td></tr><tr><td>4</td><td></td><td></td><td>(-2, -3)<br>(-2, 3)<br>(2, -3)<br>(2, 3)</td></tr><tr><td>5</td><td>(1, -1)</td><td>(5, -2)</td><td>(-5, -2)<br>(-5, 2)<br>(5, -2)<br>(5, 2)</td></tr></tbody></table>

**Lemma 8.23.**

$$6\mathcal{L}(q) + 7 = (6q_1 + 3q_2 + 2)^2 + 3(3q_2 + 1)^2.$$

Therefore, we now consider Equation (64) for $a = 6$ and $b = 7$, that is

$$x^2 + 3y^2 = 6N + 7 \qquad (91)$$

and the corresponding solution set $\mathcal{U}(6N + 7)$. Lemma 8.23 ensures that the following map is well-defined

$$ \begin{array}{rcl} \varphi: & \mathcal{B}(N) & \to \mathcal{U}(6N + 7) \\ & (q_1, q_2) & \mapsto (6q_1 + 3q_2 + 2, 3q_2 + 1) \end{array} \qquad (92) $$

Here again, we have no direct analogue of Theorems 8.2, 8.8, 8.12 and 8.17, as illustrated in the example below. However, we are able to prove the following. Recall the $V_4$ action on $\mathcal{U}(6N + 7)$ given in (62).

**Proposition 8.24.** Let $q \in M$. Then the $V_4$-orbit of $\varphi(q)$ has size 4.

*Proof.* Let $q \in M$, denote $(x, y) = \varphi(q) \in \mathcal{U}(6N + 7)$. Since $x = 2 \pmod 3$ and $y = 1 \pmod 3$, Lemma 7.8 applies, which proves the claim. $\square$

**Example 8.25.** We determine in Figure 10 the affine Grassmannian elements of type $G_2^{(1)}$ of atomic length $N$, give the corresponding solution of $x^2 + 3y^2 = 6N + 7$, and compare this to the remaining solutions of the equation. There is an action of $V_4$ (by allowing signs in each component) which is not free. For instance, for $N = 3$, the orbit of $(5, 0)$ has size only 2. As in Section 8.4, it is unclear how to get the remaining solutions.

## 8.6 Type $D_4^{(3)}$

Let $W$ be the Weyl group of type $D_4^{(3)}$. By Figure 1, elements in $M$ write $q = q_1\varepsilon_1 + q_2\varepsilon_2 + q_3\varepsilon_3$ with $(q_1, q_2, q_3) \in \mathbb{Z}^3$ such that $q_3 = -q_1 - q_2$. One computes

$$|q|^2 = 2q_1^2 + 2q_2^2 + 2q_1q_2 \quad \text{and} \quad \text{ht}(q) = -2q_1 - 3q_2.$$

This yields

$$ \begin{aligned} \mathcal{L}(q) &= 4q_1^2 + 4q_2^2 + 4q_1q_2 + 2q_1 + 3q_2 \\ &= 4\left(q_1 + \frac{1}{2}q_2 + \frac{1}{4}\right)^2 + 3\left(q_2 + \frac{1}{3}\right)^2 - \frac{7}{12} \end{aligned} $$

which is equivalent to the following identity.

**Lemma 8.26.**

$$12\mathcal{L}(q) + 7 = (6q_2 + 2)^2 + 3(4q_1 + 2q_2 + 1)^2.$$
Therefore, we consider Equation (64) for $a = 12$ and $b = 7$, that is

$$x^2 + 3y^2 = 12N + 7 \qquad (93)$$

and the corresponding solution set $\mathcal{U}(12N + 7)$. Lemma 8.26 ensures that the following map is well-defined

$$\varphi: \begin{array}{ccc} \mathcal{B}(N) & \to & \mathcal{U}(12N + 7) \\ (q_1, q_2) & \mapsto & (6q_2 + 2, 4q_1 + 2q_2 + 1) \end{array} \qquad (94)$$

**Theorem 8.27.** Let $N \in \mathbb{N}$.

(1) The action of the Klein four-group $V_4$ on $\mathcal{U}(12N + 7)$ given in (62) is free.

(2) The set $\mathrm{Im}(\varphi)$ is a complete set of representatives of the $V_4$-orbits of $\mathcal{U}(12N + 7)$.

*Proof.* Let $N \in \mathbb{N}$.

(1) Let $(x, y) \in \mathcal{U}(12N + 7)$. This implies that $x^2 = 1 \pmod 3$, so $x = \pm 1 \pmod 3$. Moreover, $x^2 - y^2 = 3 \pmod 4$, so by examining the quadratic residues modulo 4, one must have $x^2 = 0 \pmod 4$ and $y^2 = 1 \pmod 4$, therefore $x = 0 \pmod 2$. By the Chinese remainder theorem (or by a direct check), these conditions on $x$ imply that $x = \pm 2 \pmod 6$. Moreover, since $y^2 = 1 \pmod 4$, $y = \pm 1 \pmod 4$. We obtain $x \in \{\pm 1, \pm 4\} \pmod{12}$ and $y \in \{\pm 1, \pm 3, \pm 5, \pm 7\} \pmod{12}$. Therefore, Lemma 7.8 applies and the action is free.

(2) Let $\mathcal{O}$ be a $V_4$-orbit in $\mathcal{U}(12N + 7)$. We have seen in (1) that there exists a unique $(x, y) \in \mathcal{O}$ such that $x = 2 \pmod 6$ and $y = \pm 1 \pmod 4$. Write $x = 6q_2 + 2$ for some $q_2 \in \mathbb{Z}$.

* Suppose that $q_2$ is even. Then we choose the element $y$ such that $y = 1 \pmod 4$, that is, $y = 4k + 1$ for some $k \in \mathbb{Z}$. Thus, we have

$$(x, y) = (6q_2 + 2, 4(k - \frac{q_2}{2}) + 2q_2 + 1) = \varphi(q_1, q_2) \quad \text{with} \quad q_1 = k - \frac{q_2}{2}.$$

* Suppose that $q_2$ is odd. Then we choose the element $y$ such that $y = -1 \pmod 4$, that is, $y = 4k - 1$ for some $k \in \mathbb{Z}$. Thus, we have

$$(x, y) = (6q_2 + 2, 4(k - \frac{q_2 + 1}{2}) + 2q_2 + 1) = \varphi(q_1, q_2) \quad \text{with} \quad q_1 = k - \frac{q_2 + 1}{2}.$$

□

Recall that we had a bijection

$$\mathcal{B}(N) \stackrel{\sim}{\to} \mathcal{D}_4^b(N),$$

where $\mathcal{D}_4^b$ is the combinatorial model of Section 6.8.

**Corollary 8.28.** For all $N \in \mathbb{N}$, we have

$$|\mathcal{D}_4^b(N)| = \frac{1}{4}|\mathcal{U}(12N + 7)|.$$

**Example 8.29.** For each $0 \le N \le 7$, we have recorded in Figure 11 which elements $q \in M$ have atomic length $N$ and their image under $\varphi$. In the last column, we have computed $\mathcal{U}(12N + 7)$. Comparing the last two columns illustrates Theorem 8.27. For completeness, we illustrate Corollary 8.28 by listing the elements of $\mathcal{D}_4^b$ in the second column, which can be computed from the third column using Formulas (54) of Section 6 (see also Example 6.4).

## 8.7 Type $A_3^{(1)}$

### 8.7.1 First computations

Let $W$ be the Weyl group of type $A_3^{(1)}$. Recall from Figure 1 that we have $M = \mathbb{Z}\alpha_1 + \mathbb{Z}\alpha_2 + \mathbb{Z}\alpha_3 = \{q = q_1\varepsilon_1 + q_2\varepsilon_2 + q_3\varepsilon_3 + q_4\varepsilon_4 \in \mathbb{Z}\varepsilon_1 + \mathbb{Z}\varepsilon_2 + \mathbb{Z}\varepsilon_3 + \mathbb{Z}\varepsilon_4 | q_1 + q_2 + q_3 + q_4 = 0\}$. Moreover, denote

$$\mathcal{B}(N) := \{q \in M \mid \mathcal{L}(q) = N\}. \qquad (95)$$

By Section 5, we have a bijection

$$\mathcal{B}(N) \stackrel{\sim}{\to} \mathcal{C}_4(N) \qquad (96)$$

where $\mathcal{C}_4(N)$ is the set of 4-core partitions of size $N$.

Recall that we have established in Example 5.4 that $\mathcal{L}$ verifies the following equation.
<table><caption>Fig. 11: Solutions of $x^2 + 3y^2 = 12N + 7$, corresponding affine Grassmannian elements of type $D_4^{(3)}$, and corresponding bar partitions in $D_4^2$.</caption><thead><tr><th>N</th><th>elements of D<sub>4</sub><sup>5</sup></th><th>elements q ∈ B(N)</th><th>elements of ϕ(B(N))</th><th>solutions of x<sup>2</sup> + 3y<sup>2</sup> = 12N + 7</th></tr></thead><tbody><tr><td>0</td><td>Ø</td><td>(0, 0)</td><td>(2, 1)</td><td>(-2, -1)<br>(-2, 1)<br>(2, -1)<br>(2, 1)</td></tr><tr><td>1</td><td>☐</td><td>(0, -1)</td><td>(-4, -1)</td><td>(-4, -1)<br>(-4, 1)<br>(4, -1)<br>(4, 1)</td></tr><tr><td>2</td><td>☐</td><td>(-1, 0)</td><td>(2, -3)</td><td>(-2, -3)<br>(-2, 3)<br>(2, -3)<br>(2, 3)</td></tr><tr><td>3</td><td>☐</td><td>(1, -1)</td><td>(-4, 3)</td><td>(-4, -3)<br>(-4, 3)<br>(4, -3)<br>(4, 3)</td></tr><tr><td>4</td><td>☐</td><td>(-1, 1)</td><td>(8, -1)</td><td>(-8, -1)<br>(-8, 1)<br>(8, -1)<br>(8, 1)</td></tr><tr><td>5</td><td>☐</td><td>(1, 0)</td><td>(2, 5)</td><td>(-2, -5)<br>(-2, 5)<br>(2, -5)<br>(2, 5)</td></tr><tr><td>7</td><td>☐</td><td>(-1, -1)<br>(0, 1)</td><td>(-4, -5)<br>(8, 3)</td><td>(-8, -3)<br>(-8, 3)<br>(-4, -5)<br>(-4, 5)<br>(4, -5)<br>(4, 5)<br>(8, -3)<br>(8, 3)</td></tr><tr><td>8</td><td>☐</td><td>(1, -2)</td><td>(-10, 1)</td><td>(-10, -1)<br>(-10, 1)<br>(10, -1)<br>(10, 1)</td></tr><tr><td>9</td><td>☐</td><td>(0, -2)</td><td>(-10, -3)</td><td>(-10, -3)<br>(-10, 3)<br>(10, -3)<br>(10, 3)</td></tr><tr><td>11</td><td>☐</td><td>(-2, 1)</td><td>(8, -5)</td><td>(-8, -5)<br>(-8, 5)<br>(8, -5)<br>(8, 5)</td></tr><tr><td>12</td><td>☐</td><td>(-2, 0)</td><td>(2, -7)</td><td>(-2, -7)<br>(-2, 7)<br>(2, -7)<br>(2, 7)</td></tr><tr><td>13</td><td>☐</td><td>(2, -1)</td><td>(-4, 7)</td><td>(-4, -7)<br>(-4, 7)<br>(4, -7)<br>(4, 7)</td></tr><tr><td>14</td><td>☐</td><td>(2, -2)</td><td>(-10, 5)</td><td>(-10, -5)<br>(-10, 5)<br>(10, -5)<br>(10, 5)</td></tr><tr><td>15</td><td>☐</td><td>(-1, 2)</td><td>(14, 1)</td><td>(-14, -1)<br>(-14, 1)<br>(14, -1)<br>(14, 1)</td></tr><tr><td>17</td><td>☐</td><td>(1, 1)</td><td>(8, 7)</td><td>(-8, -7)<br>(-8, 7)<br>(8, -7)<br>(8, 7)</td></tr><tr><td>18</td><td>☐</td><td>(-2, 2)</td><td>(14, -3)</td><td>(-14, -3)<br>(-14, 3)<br>(14, -3)<br>(14, 3)</td></tr><tr><td>19</td><td>☐</td><td>(-1, 1)</td><td>(14, 1)</td><td>(-14, -1)<br>(-14, 1)<br>(14, -1)<br>(14, 1)</td></tr></tbody></table>
**Lemma 8.30.** For all $q \in M$, we have

$$48\mathcal{L}(w) + 30 = (4q_1 + 12q_2 - 3)^2 + 2(8q_1 - 3)^2 + 3(4q_1 + 4q_2 + 8q_3 - 1)^2.$$

In the section *p* is the map defined by

$$p: \mathbb{Z}^4 \longrightarrow \mathbb{Z}^3 \\ (x, y, z, t) \longmapsto (12y + 4z - 1, 8z + 1, 8x + 4y + 4z - 3). \tag{97}$$

Following the spirit of the matrix *R* introduced in [BN22, Section 2] and recalled in (71), we define in this section *R* to be the following matrix

$$R := \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & \frac{1}{\sqrt{3}} \end{pmatrix} \begin{pmatrix} \cos(\frac{\pi}{3}) & 0 & -\sin(\frac{\pi}{3}) \\ 0 & 1 & 0 \\ \sin(\frac{\pi}{3}) & 0 & \cos(\frac{\pi}{3}) \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & \sqrt{3} \end{pmatrix} = \frac{1}{2} \begin{pmatrix} 1 & 0 & -3 \\ 0 & 2 & 0 \\ 1 & 0 & 1 \end{pmatrix}.$$

Let *G* be the subgroup of $GL_3(\mathbb{R})$ generated by *R* and the reflection *s* associated to the hyperplane $z = 0$, that is

$$G := \langle R, s \rangle. \tag{98}$$

We give now the matrices that allow to express for $i = 1, 2, 3$ the points $p(\omega_i + M_i(q))$. Let $q = (q_1, q_2, q_3, q_4) \in \mathbb{Z}^4$ with $q_4 = -(q_1 + q_2 + q_3)$.

* $i=1$: First of all one has

$$\begin{aligned} \omega_1 + M_1(q) &= \left(\frac{3}{4}, \frac{-1}{4}, \frac{-1}{4}, \frac{-1}{4}\right) + (q_4, q_1, q_2, q_3) \\ &= \frac{1}{4}(-4q_1 - 4q_2 - 4q_3 + 3, 4q_1 - 1, 4q_2 - 1, 4q_3 - 1). \end{aligned}$$

Then using (97) it follows that

$$\begin{aligned} p(\omega_1 + M_1(q)) &= (12q_1 + 4q_2 - 5, 8q_2 - 2, -4q_1 - 4q_2 - 8q_3 + 2) \\ &= (12q_1 + 4q_2, 8q_2, -4q_1 - 4q_2 - 8q_3) + (-5, -2, 2). \end{aligned}$$

We define the following matrix $P_1$

$$P_1 := \begin{pmatrix} 12 & 4 & 0 \\ 0 & 8 & 0 \\ -4 & -4 & -8 \end{pmatrix}$$

so that $p(\omega_1 + M_1(q)) = P_1(q_1, q_2, q_3) + (-5, -2, 2)$.

* $i=2$: One has

$$\begin{aligned} \omega_2 + M_2(q) &= \left(\frac{2}{4}, \frac{2}{4}, \frac{-2}{4}, \frac{-2}{4}\right) + (q_3, q_4, q_1, q_2) \\ &= \frac{1}{2}(2q_3 + 1, -2q_1 - 2q_2 - 2q_3 + 1, 2q_1 - 1, 2q_2 - 1). \end{aligned}$$

Then using (97) it follows that

$$\begin{aligned} p(\omega_2 + M_2(q)) &= (-8q_1 - 12q_2 - 12q_3 + 3, 8q_1 - 3, -4q_2 + 4q_3 + 3) \\ &= (-8q_1 - 12q_2 - 12q_3, 8q_1, -4q_2 + 4q_3) + (3, -3, 3). \end{aligned}$$

As for $i=1$ we define similarly the matrix $P_2$ as follows

$$P_2 := \begin{pmatrix} -8 & -12 & -12 \\ 8 & 0 & 0 \\ 0 & -4 & 4 \end{pmatrix}$$

so that $p(\omega_2 + M_2(q)) = P_2(q_1, q_2, q_3) + (3, -3, 3)$.
• $i=3$: One has

$$ 
\begin{aligned}
\omega_3 + M_3(q) &= \left(\frac{1}{4}, \frac{1}{4}, \frac{1}{4}, \frac{-3}{4}\right) + (q_2, q_3, q_4, q_1) \\
&= \frac{1}{4}(4q_2 + 1, 4q_3 + 1, -4q_1 - 4q_2 - 4q_3 + 1, 4q_1 - 3).
\end{aligned}
$$

As above using (97) it follows that

$$ 
\begin{aligned}
p(\omega_3 + M_3(q)) &= (-4q_1 - 4q_2 + 8q_3 + 3, -8q_1 - 8q_2 - 8q_3 + 3, -4q_1 + 4q_2 + 1) \\
&= (-4q_1 - 4q_2 + 8q_3, -8q_1 - 8q_2 - 8q_3, -4q_1 + 4q_2) + (3, 3, 1).
\end{aligned}
$$

As above we define similarly the matrix $P_3$ as follows

$$ P_3 := \begin{pmatrix} -4 & -4 & 8 \\ -8 & -8 & -8 \\ -4 & 4 & 0 \end{pmatrix} $$

so that $p(\omega_3 + M_3(q)) = P_3(q_1, q_2, q_3) + (3, 3, 1)$.

### 8.7.2 The sets $X_{N,y}$

We recall that $\mathcal{U}(48N + 30)$, as introduced in Section 2.2, is the set of integral solutions of the equation $x^2 + 2y^2 + 3z^2 = 48N + 30$. The goal of this subsection is to decompose this set into smaller sets, denoted $X_{N,y}(\mathbb{Z})$ for $y$ describing the $(-, y, -) \in \mathcal{U}(48N + 30)$, and to study the action of $G$ on these smaller pieces. Therefore, the first objective is to understand which $y$'s provide non-empty sets $X_{N,y}(\mathbb{Z})$. We answer this question in Theorem 8.38.

**Proposition 8.31.** Let $(x, y, z) \in \mathcal{U}(48N + 30)$. Then $y \in [-\sqrt{15+24N}, \sqrt{15+24N}]$ and $y$ is odd.

*Proof.* The first statement is obvious: as $(x, y, z) \in \mathcal{U}(48N + 30)$ one has $x^2 + 3z^2 = 48N + 30 - 2y^2 = 2(\sqrt{24N+15}-y)(\sqrt{24N+15}+y)$. The left term is non negative and the right term is only non negative on $[-\sqrt{15+24N}, \sqrt{15+24N}]$. So $y \in [-\sqrt{15+24N}, \sqrt{15+24N}]$.

With respect to the second statement we know that any square $a^2$ satisfies $a^2 \equiv 0 \mod(4)$ or $1 \mod(4)$. It follows that $x^2 + 3y^2 \equiv 0 \mod(4)$ or $1 \mod(4)$ or $3 \mod(4)$. However $48N + 30 - 2y^2 = 4(12N + 7) + 2(1 - y^2)$ so if $y^2 \equiv 0 \mod(4)$ then $48N + 30 - 2y^2 \equiv 2 \mod(4)$, which is not possible. Hence $y$ cannot be even and must be odd.

Now we need to show that $y$ cannot be equal to $\pm\sqrt{15+24N}$. Assume that this is the case, as $y$ is odd one has $y^2 \equiv 1 \mod(4)$ but clearly $15 + 24N \equiv 3 \mod(4)$. This shows that $y \in [-\sqrt{15+24N}, \sqrt{15+24N}]$ and concludes the proof. $\square$

**Definition 8.32.** Let $N \in \mathbb{N}$. We define the sets $I_N$ and $C_N$ as follows

$$ 
\begin{aligned}
I_N &:= [-\sqrt{15+24N}, \sqrt{15+24N}] \cap \{\text{odd numbers}\} \\
C_N &:= \{y^2 \mid y \in I_N\}.
\end{aligned}
$$

**Lemma 8.33.** We have $C_N \subset \{3p \mid 1 \le p \le 8N + 4\} \cup \{3p + 1 \mid 0 \le p \le 8N + 4\}$.

*Proof.* First of all it is easy to see that any square $a^2$ satisfies $a^2 \equiv 0 \mod(3)$ or $1 \mod(3)$. Let us first write $y^2 = 3p$. Then as $y \in I_N$ one has $0 < y^2 < 24N + 15$, that is $0 < 3p < 24N + 15$ an then $0 < p < 8N + 5$, showing that $0 < p \le 8N + 4$. Now if we assume that $y^2 = 3p + 1$ then again from $0 < y^2 < 24N + 15$ we get $-1 < 3p < 24N + 15 - 1$, which is equivalent to $0 \le p < 8N + 5 - 1/3$ and also to $0 \le p \le 8N + 4$. Therefore we have shown that $C_N$ is included in the right set. $\square$
**Definition 8.34.** Let $N \in \mathbb{N}$ and let $y \in I_N$. Let $X_{N,y}$ be the affine variety in $\mathbb{R}^3$ defined by the ideal

$$ \mathcal{J}_{N,y} := \langle X^2 + 2Y^2 + 3Z^2 - 48N - 30, Y - y \rangle, $$

that is

$$ X_{N,y} = \{q \in \mathbb{R}^3 \mid P(q) = 0 \ \forall P \in \mathcal{J}_{N,y}\}. $$

Let $X_{N,y}(\mathbb{Z})$ be the integral points of $X_{N,y}$. We are eager to characterise which $y \in I_N$ provide a non-empty set $X_{N,y}(\mathbb{Z})$. This is aimed in Theorem 8.38. Indeed it is not granted, a priori, that for any $y \in I_N$ one has $X_{N,y}(\mathbb{Z}) \neq \emptyset$ and it is even false: for example take $N = 121$, then the $y$'s providing a non-empty set $X_{121,y}(\mathbb{Z})$ are $\{-49, -41, -37, -35, -29, -25, -19, -11, -5, -1, 1, 5, 11, 19, 25, 29, 35, 37, 41, 49\}$.

**Definition 8.35.** Let $N \in \mathbb{N}$ and $y \in I_N$. We know by Lemma 8.33 that either $y^2 = 3p$ with $0 < p \leq 8N + 4$ or $y^2 = 3p + 1$ with $0 \leq p \leq 8N + 4$. Let

$$ \mathcal{I}_{N,y} := \left[ -\left\lfloor \sqrt{48N + 30 - 2y^2} \right\rfloor, \left\lceil \sqrt{48N + 30 - 2y^2} \right\rceil \right]. $$

We define the following sets

$$ \mathcal{I}_{N,y}(0) := \{m \in \mathcal{I}_{N,y} \mid m^2 \equiv 0 \mod(3)\}. $$

$$ \mathcal{I}_{N,y}(1) := \{m \in \mathcal{I}_{N,y} \mid m^2 \equiv 1 \mod(3)\}. $$

**Definition 8.36.** Let $N \in \mathbb{N}$ and $y \in I_N$. As above, $y = 3p$ or $3p + 1$. Let us set $M_y = 16N + 10 - 2p$. We define the following sets

$$ \Omega_{N,y}(0) := \{m \in \mathcal{I}_{N,y}(0) \mid M_y - \frac{m^2}{3} \text{ is a perfect square}\}. $$

$$ \Omega_{N,y}(1) := \{m \in \mathcal{I}_{N,y}(1) \mid M_y - \frac{m^2 + 2}{3} \text{ is a perfect square}\}. $$

$$ \Gamma_N := \{y \in I_N \mid \Omega_{N,y}(0) \neq \emptyset \text{ or } \Omega_{N,y}(1) \neq \emptyset\}. $$

**Remark 8.37.** It is known from Ramanujan's work that the number of perfect squares and sum of two perfect squares between $a$ and $x$ is

$$ c \int_a^x \frac{dt}{\sqrt{\log(t)}} + \theta(x) $$

where $c \approx 0.764$ and $\theta(x)$ is very small compared with the integral. In particular we have a better bound for $|\Omega_{N,y}(i)|$.

**Theorem 8.38.** Let $N \in \mathbb{N}$ and $y \in I_N$.

(1) If $y^2 = 3p$ then the set $X_{N,y}(\mathbb{Z})$ is non empty if and only if $\Omega_{N,y}(0)$ is non empty.

(2) If $y^2 = 3p + 1$ then the set $X_{N,y}(\mathbb{Z})$ is non empty if and only if $\Omega_{N,y}(1)$ is non empty.

*Proof.* We know by Lemma 8.33 that either $y^2 = 3p$ or $y^2 = 3p + 1$ for some $p$. We consider below these two cases. Let us set $M_y = 16N + 10 - 2p$.

(1) Let assume first that $y^2 = 3p$. Let us set $A := 8N + 5 - p$. The equation $X^2 + 3Z^2 = 48N + 30 - 2y^2$ is the same as $X^2 + 3Z^2 = 6A$ and then can be rewritten as follows:

$$ \frac{X^2}{(\sqrt{6A})^2} + \frac{Z^2}{(\sqrt{2A})^2} = 1. \qquad (99) $$

Therefore one has the following parameter representation of (99) with $t \in [0, 2\pi]$

$$ \left\{ \begin{array}{l} x(t) = \sqrt{6A} \cos(t) \\ z(t) = \sqrt{2A} \sin(t). \end{array} \right. \qquad (100) $$

We want to find the values $t$ such that $x(t)$ and $z(t)$ both belong to $\mathbb{Z}$. Let us consider the potential candidates for $x(t)$. Saying that $x(t) \in \mathbb{Z}$ is equivalent to saying that there exists $m \in \mathbb{Z}$ such that
$\sqrt{6M} \cos(t) = m$. But $m$ satisfies the latter condition if and only if $m \in \mathcal{I}_{N,y}$. Therefore for any $m \in \mathcal{I}_{N,y}$, setting $t_m := \arccos(-\frac{m}{\sqrt{6A}})$ yields $x(t_m) \in \mathbb{Z}$. Now we are going to refine the conditions on $m$ in order to have $z(t_m) \in \mathbb{Z}$ as well. We have

$$z(t_m) = \sqrt{2A} \sin\left(\arccos\left(\frac{m}{\sqrt{6A}}\right)\right) = \sqrt{2A} \sqrt{1 - \left(\frac{m}{\sqrt{6A}}\right)^2} = \sqrt{\frac{6A - m^2}{3}}.$$

Thus, in order to have $z(t_m) \in \mathbb{Z}$ we must have $\frac{6A - m^2}{3}$ that is a perfect square. However one has

$$\frac{6A - m^2}{3} = M_y - \frac{m^2}{3}$$

and as $m^2 \equiv 0 \mod(3)$ or $1 \mod(3)$ we must have $m^2 \equiv 0 \mod(3)$, because otherwise $\frac{6A - m^2}{3}$ would not be an integer. Thus $m$ must live in $\mathcal{I}_{N,y}(0)$ and writing $m^2 = 3q$ we have $z(t_m) = \sqrt{M_y - q}$ with $z(t_m) \in \mathbb{N}$ if and only if $M_y - q$ is a perfect square, that is if and only if $m \in \Omega_{N,y}(0)$.

(2) Let assume now that $y^2 = 3p+1$. Let us set $B := 3(8N+5-p)-1$. The equation $X^2+3Z^2 = 48N+30-2y^2$ is the same as $X^2 + 3Z^2 = 2B$ and then can be rewritten as follows:

$$\frac{X^2}{(\sqrt{2B})^2} + \frac{Z^2}{(\sqrt{\frac{2B}{3}})^2} = 1. \qquad (101)$$

Hence the following parameter representation of (101) with $t \in [0, 2\pi]$

$$\left\{ \begin{array}{l} x(t) = \sqrt{2B} \cos(t) \\ z(t) = \sqrt{\frac{2B}{3}} \sin(t). \end{array} \right. \qquad (102)$$

As for the first case, saying that $x(t) \in \mathbb{Z}$ is equivalent to saying that there exists $m \in \mathbb{Z}$ such that $\sqrt{2B} \cos(t) = m$. But $m$ can satisfy the latter condition if and only if $m \in \mathcal{I}_{N,y}$. Therefore for any $m \in \mathcal{I}_{N,y}$, setting $t_m := \arccos(-\frac{m}{\sqrt{2B}})$ yields $x(t_m) \in \mathbb{Z}$. Now we are also going to refine the conditions on $m$ in order to have $z(t_m) \in \mathbb{Z}$ as well. We have

$$z(t_m) = \sqrt{\frac{2B}{3}} \sin\left(\arccos\left(\frac{m}{\sqrt{2B}}\right)\right) = \sqrt{\frac{2B}{3}} \sqrt{1 - \left(\frac{m}{\sqrt{2B}}\right)^2} = \sqrt{\frac{2B - m^2}{3}}.$$

This shows that $\frac{2B - m^2}{3}$ must be a perfect square. However

$$\frac{2B - m^2}{3} = M_y - \frac{m^2 + 2}{3}$$

and then $m$ must belong to $\Omega_{N,y}(1)$.

□

**Corollary 8.39.** Let $N \in \mathbb{N}$ and $y \in I_N$. We have

$$\mathcal{U}(48N + 30) = \bigsqcup_{y \in \Gamma_N} X_{N,y}(\mathbb{Z}). \qquad (103)$$

**Lemma 8.40.** Let $N \in \mathbb{N}$ and let $(x, y, z) \in \mathcal{U}(48N + 30)$. Then $x$ and $z$ have same parity.

*Proof.* The proof is almost straightforward. If $x = 2a$ and $z = 2b+1$ then it follows that $x^2 + 2y^2 + 3z^2 = 4a^2 + 2y^2 + 12b^2 + 12b + 3 = 2c+1$, a contradiction since $x^2 + 2y^2 + 3z^2 = 48N + 30$ is even. If $x = 2a+1$ and $z = 2b$ then $x^2 + 2y^2 + 3z^2 = 4a^2 + 4a + 1 + 2y^2 + 12b^2 = 2c + 1$, again a contradiction. □
**Proposition 8.41.** Let $N \in \mathbb{N}$ and $y \in \Gamma_N$. Then $G$ stabilises $X_{N,y}(\mathbb{Z})$, in other words if $p \in X_{N,y}(\mathbb{Z})$ then the orbit of $p$ under $G$ satisfies $O_G(p) \subseteq X_{N,y}(\mathbb{Z})$.

*Proof.* Write $p = (x, y, z)$. Let $g \in G$. As $R$ has order 6 and since $R^k$ and $s$ commute where $k$ runs in $\{1, 2, \dots, 5\}$ (see (98)), it is enough to show it for $g = R^k$ and for $g = s$. For $g = s$ it is obvious since $g(p) = (x, y, -z)$ and clearly $(x, y, z)$ and $(x, y, -z)$ both belong to $X_{N,y}(\mathbb{Z})$. Now for $R^k$, we only do the computations for $k = 1, 2$ and we leave the rest to the reader.

One has $R(p) = \frac{1}{2}(x - 3z, 2y, x + z)$ and $R^2(p) = \frac{1}{2}(-x - 3z, 2y, x - z)$, which shows first of all that if they belong to $\mathcal{U}(48N + 30)$ then they belong to $X_{N,y}(\mathbb{Z})$ as they all have $y$ in second coordinate. It turns out that their coefficients are integers because $x$ and $z$ have the same parity by Lemma 8.40. Since $p \in X_{N,y}(\mathbb{Z})$ we have $x^2 + 2y^2 + 3z^2 = 48N + 30$ and we need to show that $R(p), R^2(p)$ are also equal to $48N + 30$, which we do now

$$ 
\begin{aligned}
\left(\frac{x-3z}{2}\right)^2 + 2y^2 + 3\left(\frac{x+z}{2}\right)^2 &= \frac{1}{4}(x^2 - 6xz + 9z^2) + 2y^2 + \frac{3}{4}(x^2 + 2xz + z^2) \\
&= x^2 + 2y^2 + 3z^2 + \left(-\frac{6}{4}xz + \frac{6}{4}xz\right) \\
&= x^2 + 2y^2 + 3z^2 \\
&= 48N + 30,
\end{aligned}
$$

$$ 
\begin{aligned}
\left(\frac{-x-3z}{2}\right)^2 + 2y^2 + 3\left(\frac{x-z}{2}\right)^2 &= \frac{1}{4}(x^2 + 6xz + 9z^2) + 2y^2 + \frac{3}{4}(x^2 - 2xz + z^2) \\
&= x^2 + 2y^2 + 3z^2 + \left(\frac{6}{4}xz - \frac{6}{4}xz\right) \\
&= x^2 + 2y^2 + 3z^2 \\
&= 48N + 30.
\end{aligned}
$$

□

<figure><img src="image_16.png" /><figcaption>Fig. 12: The black ellipse describes $X_{N,y}$ for a particular $N \in \mathbb{N}$ and $y \in \Gamma_N$. The set $X_{N,y}(\mathbb{Z})$ has 12 points. By acting with $\langle R \rangle$ on the red point we recover the orange points, and adding the symmetry $z = 0$ we recover from the orange points the remaining black points. In other words the orbit of the red point under $G$ is $X_{N,y}(\mathbb{Z})$.</figcaption></figure>

**Notation 8.42.** We make the following abuse of language: for an element $\hat{w}$ of the extended affine Weyl group, we say that it belongs to $X_{N,y}(\mathbb{Z})$ (resp. to $\mathcal{U}(48N + 30)$) if by writing $\hat{w} = \sigma_i t_q \bar{w}$ one has $p(\omega_i + M_i(q))$ that belongs to $X_{N,y}(\mathbb{Z})$ (resp. to $\mathcal{U}(48N + 30)$). We will also write indistinctly $O_G(\hat{w})$ or $O_G(p(\omega_i + M_i(q)))$.
**Proposition 8.43.** Let $w \in W^0$ with $\mathcal{L}_{\Lambda_0}(w) = N$. The four elements $w, \sigma_i w$ with $i = 1, 2, 3$ belong to four different $X_{N,y}(\mathbb{Z})$ for some $y \in \Gamma_N$.

*Proof.* First of all it is clear with Theorem 4.7 that $w, \sigma_i w$ belong to $\mathcal{U}(48N + 30)$. Write $w = t_q \bar{w}$ where $q = (q_1, q_2, q_3, q_4) \in \mathbb{Z}^4$ with $q_4 = -(q_1 + q_2 + q_3)$. We need now to show that the second coordinates of these four points cannot be equal. We write $p(w)_2$ and $p(\sigma_i w)_2$ to express their second coordinate. Using (97) and Section 8.7.1 we have $p(w)_2 = 8q_3 + 1$, $p(\omega_1 + M_1(q))_2 = 8q_2 - 2$, $p(\omega_2 + M_2(q))_2 = 8q_1 - 3$ and $p(\omega_3 + M_3(q))_2 = -8(q_1 + q_2 + q_3) + 3$. The fact that they cannot be equal follows from: $q_i \in \mathbb{Z}$ and the affine parts of each of them are all distinct.

For example if $p(w)_2 = p(\omega_1 + M_1(q))_2$ then $8q_3 + 1 = 8q_2 - 2$, that is $(q_2 - q_3) = 3/8$, a contradiction. If for example $p(\omega_2 + M_2(q))_2 = p(\omega_3 + M_3(q))_2$ then $8q_1 - 3 = -8(q_1 + q_2 + q_3) + 3$, which leads to $2q_1 + q_2 + q_3 = 3/4$, again a contradiction. All the other cases are similar and are left to the reader. This ends the proof. $\square$

<figure><img src="image_17.png" /><figcaption>Fig. 13: Integral solutions of the equation $x^2 + 2y^2 + 3z^2 = 30$, that is when the $\Lambda_0$-length is equal to 0. Each red point comes from the unique extended Grassmannian elements of length 0, namely (from left to right) $\sigma_3, e, \sigma_1, \sigma_2$.</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>Fig. 14: Integral solutions of the equation $x^2 + 2y^2 + 3z^2 = 30 + 48 \cdot 1$, that is when the $\Lambda_0$-length is equal to 1. There are two affine Grassmannian elements of length 1. Let us denote them $u$ and $v$. Each of them generates 3 other elements of same length, namely $\sigma_i u$ and $\sigma_i v$ for $i = 1, 2, 3$. The red points represent the elements $u$ and $\sigma_i u$ while the blue points represent the elements $v$ and $\sigma_i v$.</figcaption></figure>
**Proposition 8.44.** Let $\hat{u}, \hat{v} \in \Sigma W^0$ with $\hat{u} \neq \hat{v}$. Assume that $\hat{u}$ and $\hat{v}$ belong to the same $X_{N,y}(\mathbb{Z})$.

(1) Write $\hat{u} = \sigma_i u$ and $\hat{v} = \sigma_j v$. We have $i = j$.

(2) $O_G(\hat{u}) \cap O_G(\hat{v}) = \emptyset$.

*Proof.*

(1) Write $u = t_q \bar{u}$ and $v = t_r \bar{v}$. By assumption the second coordinate of $p(\hat{u})$ and $p(\hat{v})$ is $y$. However by Section 8.7.1 we have $p(q)_2 = 8q_3 + 1$, $p(\omega_1 + M_1(q))_2 = 8q_2 - 2$, $p(\omega_2 + M_2(q))_2 = 8q_1 - 3$ and $p(\omega_3 + M_3(q))_2 = -8(q_1 + q_2 + q_3) + 3$ and similarly $p(r)_2 = r_3 + 1$, $p(\omega_1 + M_1(r))_2 = 8r_2 - 2$, $p(\omega_2 + M_2(r))_2 = 8r_1 - 3$ and $p(\omega_3 + M_3(r))_2 = -8(r_1 + r_2 + r_3) + 3$. We see then that the only situation that allows them to have the same second coordinate is when $i = j$, indeed for example as $y = p(\omega_2 + M_2(q))_2$ and $y = p(\omega_1 + M_1(r))_2$, it follows that $8q_1 - 3 = 8r_2 - 2$ and then $q_1 - r_2 = 1/8$, a contradiction since $q_i, r_j \in \mathbb{Z}$. All the other cases are similar and lead to a contradiction, unless $i = j$.

(2) We know by the first point that $\hat{u} = \sigma_i u$ and $\hat{v} = \sigma_i v$. Assume that there exists $g \in G$ such that $gu = v$, that is $g(p(\omega_i + M_i(q)) = p(\omega_i + M_i(r))$. We are going to show that the latter equality is impossible. As in the proof of Proposition 8.41 it is enough to show it for $g = R^k$ with $k = 1, 2, \dots, 5$ and for $g = s$.

* For $g = s$, using Section 8.7.1 the last coordinates of $p(\omega_i + M_i(r))$ are respectively $-2(2q_1 + 2q_2 + 4q_3 - 1)$, $-4q_2 + 4q_3 + 3$, $-4q_1 + 4q_2 + 1$. So applying $s$ on $p(\omega_i + M_i(r))$ multiplies these coordinates by $-1$ and we see that it cannot be equal to the third coordinate of $p(\omega_i + M_i(r))$. Again we illustrate this with an example and leave the details to the reader: let us take $i = 2$, then $p(\omega_2 + M_2(q))_3 = -4q_2 + 4q_3 + 3$ and $s(p(\omega_2 + M_2(q)))_3 = 4q_2 - 4q_3 - 3$, so $s(p(\omega_2 + M_2(q))) = p(\omega_2 + M_2(r))$ implies that $4q_2 - 4q_3 - 3 = 4r_2 + 4r_3 + 3$, that is $4(q_2 - q_3 - r_2 - r_3) = 6$, a contradiction as all the $q_i$'s and $r_j$'s belong to $\mathbb{Z}$.

* For $g = R^k$ with $k \in \{1, \dots, 5\}$. Once again we find some contradictions, forbidding the equality $R^k(p(\omega_i + M_i(q))) = p(\omega_i + M_i(r))$. As for the above proofs, it is again a tedious verification since there are $5 \times 3$ cases to check. We only treat the case $i = 1$ and leave the rest to the reader. By Section 8.7.1 the first coordinate of $R^k(p(\omega_1 + M_1(q)))$ are respectively $12q_1 + 8q_2 + 12q_3 - 11/2$, $4q_2 + 12q_3 - 1/2$, $-12q_1 - 4q_2 + 5$, $-12q_1 - 4q_2 - 12q_3 + 11/2$ and $-4q_2 - 12q_3 + 1/2$. As all the $q_i$'s are divisible by 4 and all the affine parts are all distinct. Therefore, if $R^k(p(\omega_1 + M_1(q))) = p(\omega_1 + M_1(r))$ then their first coordinates must be equal and we obtain an equation of the form $4K = C$ where $K \in \mathbb{Z}$ and $C \in \mathbb{Q}$ but is non divisible by 4, a contradiction. This ends the proof.

In the continuation of Notation 8.42, for $g \in G$ (98) and $\hat{w} \in \Sigma W^0$ (Section 3.2) we denote by $g \cdot \hat{w} := g(p(\omega_i + M_i(q))$ with $\hat{w} = \sigma_i t_q \bar{w}$ and where we recall that the map $p$ is defined in (97). The following conjecture would give a natural analogue of Theorem 8.6. It has been checked for the first values of $N$ up to $N = 1000$.

**Conjecture 8.45.** Let $N \in \mathbb{N}$ and $y \in \Gamma_N$. Let $\eta \in X_{N,y}(\mathbb{Z})$. There exists $\hat{w} \in \Sigma W^0$ and $g \in G$ such that $g \cdot \hat{w} = \eta$.

## 8.8 Underlying type $B_n/C_n$ and action of the hyperoctahedral group

In this section we generalise Proposition 8.21 to Dynkin types that have underlying finite type $B_n$ or $C_n$. According to Figure 1, these are type $B_n^{(1)}$, $C_n^{(1)}$, $A_{2n-1}^{(2)}$, $D_{n+1}^{(2)}$, $A_{2n}^{(2)}$, by considering the action of the hyperoctahedral group $H_n$ (which is nothing but the Weyl group of type $BC_n$). For $a, b \in \mathbb{Z}$, denote again $U(aN + b)$ the set of integer solutions of the Diophantine equation

$$x_1^2 + \dots + x_n^2 = aN + b. \qquad (104)$$

Using Theorem 2.1, it is easy to establish the general formula for $\mathcal{L}_q$, and to compute the corresponding Gaussian reduction. We obtain the following results.

### (1) Type $B_n^{(1)}$

For all $q \in M$, we have

$$ \begin{aligned} \mathcal{L}(q) &= n \sum_{i=1}^{n} q_i^2 - \sum_{i=1}^{n} (n - i + 1)q_i \\ &= n \sum_{i=1}^{n} \left( q_i - \frac{n - i + 1}{2n} \right)^2 - \frac{n(n+1)(2n+1)}{6n} \end{aligned} $$
where the numerator of the last fraction is obtained by the formula for the sum of the first $n$ squares.
This gives the following equivalent identity.

**Lemma 8.46.**

$$4n\mathcal{L}(q) + \frac{n(n+1)(2n+1)}{6} = \sum_{i=1}^{n} (2nq_i - (n-i+1))^2.$$

Therefore, if we take $a = 4n$ and $b = \frac{n(n+1)(2n+1)}{6}$, we obtain a map

$$\varphi: \begin{array}{rcl} \{q \in M \mid \mathcal{L}(q) = N\} & \to & \mathcal{U}(aN + b) \\ (q_1, \dots, q_i, \dots, q_n) & \mapsto & (\dots, 2nq_i - (n-i+1), \dots). \end{array} \tag{105}$$

In other terms, each $q \in M$ with produces a solution of (104) with $N = \mathcal{L}(q)$.

(2) **Type $C_n^{(1)}$**

For all $q \in M$, we have

$$\begin{aligned} \mathcal{L}(q) &= 2n \sum_{i=1}^{n} q_i^2 - \sum_{i=1}^{n} (2(n-i)+1)q_i \\ &= \sum_{i=1}^{n} 2n \left( q_i - \frac{2(n-i)+1}{4n} \right)^2 - \frac{n(2n+1)(2n-1)}{8n} \end{aligned}$$

where the numerator of the last fraction is obtained by the formula for the sum of the first $n$ odd integers squared. This gives the following equivalent identity.

**Lemma 8.47.**

$$8n\mathcal{L}(q) + \frac{n(2n+1)(2n-1)}{3} = \sum_{i=1}^{n} (4nq_i - (2(n-i)+1))^2.$$

Therefore, if we take $a = 8n$ and $b = \frac{n(2n+1)(2n-1)}{3}$, we obtain a map

$$\varphi: \begin{array}{rcl} \{q \in M \mid \mathcal{L}(q) = N\} & \to & \mathcal{U}(aN + b) \\ (q_1, \dots, q_i, \dots, q_n) & \mapsto & (\dots, 4nq_i - (2(n-i)+1), \dots). \end{array} \tag{106}$$

In other terms, by the results of Section 6.1, each self-conjugate $2n$-core of size $N$ produces a solution of (104).

(3) **Type $A_{2n-1}^{(2)}$**

For all $q \in M$, we have

$$\begin{aligned} \mathcal{L}(q) &= \sum_{i=1}^{n} q_i^2 - \sum_{i=1}^{n} \frac{(2(n-i)+1)}{2} q_i \\ &= \frac{2n-1}{2} \sum_{i=1}^{n} \left( q_i - \frac{2(n-i)+1}{2(2n-1)} \right)^2 - \frac{2n-1}{2} \frac{n(2n+1)(2n-1)}{4(2n-1)^2} \end{aligned}$$

This gives the following equivalent identity.

**Lemma 8.48.**

$$(16n-8)\mathcal{L}(q) + \frac{n(2n+1)(2n-1)}{3} = \sum_{i=1}^{n} ((4n-2)q_i - (2(n-i)+1))^2.$$

Therefore, if we take $a = (16n - 8)$ and $b = \frac{n(2n+1)(2n-1)}{3}$, we obtain a map

$$\varphi: \begin{array}{rcl} \{q \in M \mid \mathcal{L}(q) = N\} & \to & \mathcal{U}(aN + b) \\ (q_1, \dots, q_i, \dots, q_n) & \mapsto & (\dots, (4n-2)q_i - (2(n-i)+1), \dots). \end{array} \tag{107}$$

In other terms, each $q \in M$ with produces a solution of (104) with $N = \mathcal{L}(q)$.
(4) Type $D_{n+1}^{(2)}$

For all $q \in M$, we have

$$
\begin{aligned}
\mathcal{L}(q) &= (n+1) \sum_{i=1}^{n} q_i^2 - \sum_{i=1}^{n} (n-i+1)q_i \\
&= \sum_{i=1}^{n} (n+1) \left( q_i - \frac{n-i+1}{2(n+1)} \right)^2 - \frac{n(n+1)(2n+1)}{6(n+1)}
\end{aligned}
$$

where the numerator of the last fraction is obtained by the formula for the sum of the first $n$ integers squared. This gives the following equivalent identity.

**Lemma 8.49.**

$$4(n+1)\mathcal{L}(q) + \frac{n(n+1)(2n+1)}{6} = \sum_{i=1}^{n} (2(n+1)q_i - (n-i+1))^2.$$

Therefore, if we take $a = 4(n + 1)$ and $b = \frac{n(n+1)(2n+1)}{6}$, we obtain a map

$$ \begin{array}{rcl@{\quad}l} \varphi: & \{q \in M \mid \mathcal{L}(q) = N\} & \longrightarrow & \mathcal{U}(aN + b) \\ & (q_1, \dots, q_i, \dots, q_n) & \longmapsto & (\dots, 2(n+1)q_i - (n-i+1), \dots). \end{array} \tag{108} $$

In other terms, by the results of Section 6.2, each bar core partition in $D_{2n+2}(N)$ produces a solution of (104).

(5) Type $A_{2n}^{(2)}$

For all $q \in M$, we have

$$
\begin{aligned}
\mathcal{L}(q) &= \left(\frac{2n+1}{2}\right) \sum_{i=1}^{n} q_i^2 - \sum_{i=1}^{n} \left(n - i + \frac{1}{2}\right) q_i \\
&= \sum_{i=1}^{n} \left(\frac{2n+1}{2}\right) \left(q_i - \frac{2(n-i)+1}{4n+2}\right)^2 - \frac{(2n+1)}{2} \cdot \frac{n(2n+1)(2n-1)}{(4n+2)^2} \\
&= \sum_{i=1}^{n} \left(\frac{2n+1}{2}\right) \left(q_i - \frac{2(n-i)+1}{4n+2}\right)^2 - \frac{n(2n+1)(2n-1)}{8(2n+1)}.
\end{aligned}
$$

By multiplying both sides by $8(2n+1)$, This gives the following equivalent identity.

**Lemma 8.50.**

$$(16n + 8)\mathcal{L}(q) + \frac{n(2n + 1)(2n - 1)}{3} = \sum_{i=1}^{n} ((4n + 2)q_i - (2(n - i) + 1))^2.$$

Therefore, if we take $a = (16n + 8)$ and $b = \frac{n(2n+1)(2n-1)}{3}$, we obtain a map

$$ \begin{array}{rcl@{\quad}l} \varphi: & \{q \in M \mid \mathcal{L}(q) = N\} & \longrightarrow & \mathcal{U}(aN + b) \\ & (q_1, \dots, q_i, \dots, q_n) & \longmapsto & (\dots, (4n+2)q_i - (2(n-i)+1), \dots). \end{array} \tag{109} $$

In other terms, each $q \in M$ with produces a solution of (104) with $N = \mathcal{L}(q)$.

Now, let $H_n = C_2^n \times S_n$ be the hyperoctahedral group in dimension $n$, of order $2^n n!$. Similarly to Section 7, $H_n$ acts on the solution set of

$$x_1^2 + \dots + x_n^2 = k, \tag{110}$$

where the generator of $C_2$ acts by $x_1 \mapsto -x_1$, and $S_n$ permutes the $x_i$'s. Denote as usual $H_n(x)$ the $H_n$-orbit of a solution $x = (x_1, \dots, x_n)$ of (110). We are able to generalise Proposition 8.21 to all of the above types.

**Proposition 8.51.** Let $W$ be the one of the above Weyl groups, and consider the corresponding map $\varphi$. For all $q \in M$,

$$|H_n\varphi(q)| = 2^n n!.$$
In other words, each $q \in M$ with $\mathcal{L}(q) = N$ produces $2^n n!$ solutions of (104).

*Proof.* The proof is completely analogous to that of Proposition 8.21. Let $x_1^2 + \cdots + x_n^2 = aN + b$ be the associated Diophantine equation. Let $q \in M$ and write $x = \varphi(q)$. The $H_n$-orbit of $x$ is

$$ \{(\pm x_{\sigma(1)}, \dots, \pm x_{\sigma(n)}); \sigma \in S_n\}. $$

Let $c$ be the coefficient of each $q_i$ in $\varphi(q)$. Now we have in all cases

* $x_i \neq \pm x_j \bmod c$ and hence $x_i \neq \pm x_j$ for all $1 \le i \neq j \le n$,

* $x_i \neq 0$ for all $1 \le i \le n$.

By the direct analogue of Lemma 7.3 for $H_n$, the elements in the orbit above are all distinct. $\square$

**Remark 8.52.** Let us focus on type $C_n^{(1)}$, where self-conjugate $2n$-cores appear naturally because $\{q \in M | \mathcal{L}(q) = N\} \stackrel{\sim}{\to} \mathrm{SCC}_{2n}(N)$ (see Section 6).

(1) The case $n = 3$ yields, by Lemma 8.47

$$ (12q_1 - 5)^2 + (12q_2 - 3)^2 + (12q_3 - 1)^2 = 24\mathcal{L}(q) + 35. $$

By Proposition 8.51 each self-conjugate 6-core of size $N$ produces 48 distinct solutions of the equation

$$ x^2 + y^2 + z^2 = 24N + 35. $$

In [Alp14, Theorem 7], the number of self-conjugate 6-cores of size $N$ is proved to be equal to 1/32th of the number of solutions of

$$ |\mathrm{SCC}_6(N)| = \frac{1}{4} |\{(x, y, z) \in \mathbb{N}^3 | 3x^2 + 32y^2 + 96z^2 = 24N + 35\}|. $$

It is interesting to that the quantity $24N + 35$ appears naturally in both context.

(2) The case of $n = 4$ yields, by Lemma 8.47

$$ 32\mathcal{L}(w) + 84 = (16q_1 - 7)^2 + (16q_2 - 5)^2 + (16q_3 - 3)^2 + (16q_4 - 1)^2. $$

By Proposition 8.51 each self-conjugate 6-core of size $N$ produces 384 distinct solutions of the equation $x^2 + y^2 + z^2 + t^2 = 32N + 21$. This can also be compared to [Alp14, Theorem 4], where it is proved that

$$ |\mathrm{SCC}_8(N)| = \frac{1}{2} |\{(x, y, z, t) \in \mathbb{N}^4 | x^2 + y^2 + 2z^2 + 2t^2 = 8N + 21\}|, $$

and we notice that $8N + 21 = \frac{1}{4}(32N + 84)$.

## Acknowledgements

We thank Cédric Lecouvey and David Wahiche for sharing and discussing the results of [LW24]. We also thank James Parkinson for some useful communications.

## References

[AE04] George E. Andrews and Kimmo Eriksson. *Integer Partitions*. Integer Partitions. Cambridge University Press, 2004. 1

[Alp14] Levent Alpoge. Self-conjugate core partitions and modular forms. *J. Num. Theory*, 140:60–92, 2014. 1, 3, 4, 33, 37, 39, 58

[And74] George E. Andrews. An analytic generalization of the Rogers–Ramanujan identities for odd moduli. *Proc. Nat. Acad.Sci. USA*, 71:4082–4085, 1974. 1

[And02] Jaclyn Anderson. Partitions which are simultaneously $t_1$- and $t_2$-core. *Discrete Mathematics*, 248(1):237–243, 2002. 1

[BN22] Olivier Brunat and Rishi Nath. A crank-based approach to the theory of 3-core partitions. *Proc. Amer. Math. Soc.*, 150(1):15–29, 2022. 1, 2, 3, 4, 32, 33, 36, 49
[Bou68] N. Bourbaki. *Éléments de mathématiques. Groupes et algèbres de Lie. Chapitres IV-VI.* Hermann, Paris, 1968. 4, 8

[Bra47] Richard Brauer. On a conjecture by Nakayama. *Trans. Royal Soc. Canada.*, III(41):11–19, 1947. 1

[Bre79] David M Bressoud. A generalization of the rogers-ramanujan identities for all moduli. *Journal of Combinatorial Theory, Series A*, 27(1):64–68, 1979. 1

[Car05] Roger W. Carter. Lie algebras of finite and affine type. 2005. 3, 4, 5

[Che13] Shi-Chao Chen. Congruences for *t*-core partition functions. *J. Number Theory*, 133(12):4036–4046, 2013. 1

[CJ23] Maria Chlouveraki and Nicolas Jacon. Defect in cyclotomic Hecke algebras. *Math. Z.*, 305(4):article number 57, 2023. 1

[CLG22] Nathan Chapelier-Laget and Thomas Gerber. Atomic length in Weyl groups. 2022. arXiv: 2211.12359. 1, 2, 3, 11, 13, 19, 24, 25

[CW21] Benjamin Cotton and Nathan F. Williams. A core model for $G_2$. *Involve, a Journal of Mathematics*, 14(3):401–4012, 2021. 25, 28

[dBR47] Gilbert de Beauregard Robinson. On a conjecture by Nakayama. *Trans. Royal Soc. Canada.*, III(41):20–25, 1947. 1

[DH16] Matthew Dyer and Christophe Hohlweg. Small roots, low elements, and the weak order in Coxeter groups. *Adv. Math.*, 301:739–784, 2016. 11

[Fay06] Matthew Fayers. Weights of multipartitions and representations of Ariki–Koike algebras. *Advances in Mathematics*, 206(1):112–144, 2006. 1

[Fay19] Matthew Fayers. Simultaneous core multipartitions. *European J. Combinatorics*, 76:138–158, 2019. 1

[FS82] Paul Fong and Bhama Srinivasan. The blocks of finite general linear and unitary groups. *Inventiones mathematicae*, 69:109–154, 1982. 1

[GJ11] Meinolf Geck and Nicolas Jacon. *Representations of Hecke Algebras at Roots of Unity*. Springer, 2011. 1

[GKS90] Frank G. Garvan, Dongsu Kim, and Dennis Stanton. Cranks and *t*-cores. *Inventiones Math.*, 101:1–17, 1990. 1, 2, 4, 22, 23, 24

[GO96] Andrew Granville and Ken Ono. Defect zero *p*-blocks for finite simple groups. *Trans. AMS*, 348:331–347, 1996. 1, 2

[Gor61] Basil Gordon. A Combinatorial Generalization of the Rogers–Ramanujan Identities. *Amer. J. Math.*, 83:393–399, 1961. 1

[GP00] Meinolf Geck and Götz Pfeiffer. *Characters of Finite Coxeter Groups and Iwahori-Hecke Algebras*. Oxford University Press, 2000. 1

[Han10] Guo-Niu Han. The Nekrasov-Okounkov hook length formula: refinement, elementary proof, extension and applications. *Annales de l'Institut Fourier*, 60(1):1–29, 2010. 1

[HJ12] Christopher R.H. Hanusa and Brant C. Jones. Abacus models for parabolic quotients of affine Weyl groups. *Journal of Algebra*, 361:134–162, 2012. 25

[HN13] Christopher R.H. Hanusa and Rishi Nath. The number of self-conjugate core partitions. *J. Num. Theory*, 133:751–768, 2013. 1

[HO11] Guo-Niu Han and Ken Ono. Hook lengths and 3-cores. *Ann. Comb.*, 15(2):305–3012, 2011. 1

[HS96a] Michael Hirschhorn and James A Sellers. Two congruences involving 4-cores. *The Electronic Journal of Combinatorics*, pages R10–R10, 1996. 1

[HS96b] Michael D. Hirschhorn and James A. Sellers. Some amazing facts about 4-cores. *Journal of Number Theory*, 60(1):51–69, 1996. 1
[HS99] Michael D. Hirschhorn and James A. Sellers. Some parity results for 16-cores. *Ramanujan J.*, 3(3):281–296, 1999. 1

[JK84] Gordon James and Adalbert Kerber. *The Representation Theory of the Symmetric Group*. Encyclopedia of Mathematics and its Applications. Cambridge University Press, 1984. 1, 23

[JL21] Nicolas Jacon and Cédric Lecouvey. Cores of Ariki-Koike algebras. *Documenta Math.*, 26:103–124, 2021. 1

[Joh18] Paul Johnson. Lattice points and simultaneous core partitions. *Electronic J. Comb.*, 25(3):Article Number P3.47, 2018. 1

[Kac84] Victor G. Kac. *Infinite Dimensional Lie Algebras*. Birkhäuser, 1984. 4, 8

[Las01] Alain Lascoux. Ordering the affine symmetric group. *Algebraic Combinatorics and Applications*, 01 2001. 2, 3, 22, 23

[LLM$^{+}$14] Thomas Lam, Luc Lapointe, Jennifer Morse, Anne Schilling, Mark Shimozono, and Mike Zabrocki. *k-Schur Functions and Affine Schubert Calculus*, volume 33 of *Fields Institute Monographs*. Springer, 2014. 23

[LM05] Luc Lapointe and Jennifer Morse. Tableaux on $k+1$-cores, reduced words for affine permutations, and $k$-Schur expansions. *Journal of Combinatorial Theory, Series A*, 112(1):44–81, 2005. 23

[LW24] Cédric Lecouvey and David Wahiche. Affine Grassmanian, generalized cores, Macdonald identities and hook length formulas. 2024. In preparation. 3, 25, 26, 27, 28, 58

[Mac98] Ian G. Macdonald. *Symmetric functions and Hall polynomials*. Oxford Mathematical Monographs, second edition edition, 1998. 26

[Mor65] Alun O. Morris. The spin representation of the symmetric group. *Canadian Journal of Mathematics*, 17:543–549, 1965. 26

[MS23] Eleanor Mcspirit and Kristen Scheckelhoff. On the number of 2-hooks and 3-hooks of integer partitions. *Bulletin of the Australian Mathematical Society*, 107(3):432–439, 2023. 1

[Ols86] Jørn B. Olsson. Remarks on symbols, hooks and degrees of unipotent characters. *J. Comb. Theory, Ser. A*, 42:223–238, 1986. 1

[OS97] Ken Ono and Lawrence Sze. 4-core partitions and class numbers. *Acta Arithmetica*, 80:249–272, 1997. 1, 33

[STW23] Eric Nathan Stucky, Marko Thiel, and Nathan Williams. Strange Expectations in Affine Weyl Groups. 2023. arXiv:2309.14481. 1, 2, 3, 12, 24, 25, 26, 27, 28