All Euler problems
Project Euler

Remarkable Representations

For a finite group G, a representation is a homomorphism rho: G -> GL(V) for some vector space V. The dimension dim rho = dim V. The fundamental theorem of representation theory relates dimensions...

Source sync Apr 19, 2026
Problem #0883
Level Level 38
Solved By 121
Languages C++, Python
Answer 14854003484704
Length 345 words
linear_algebramodular_arithmeticsearch

Problem Statement

This archive keeps the full statement, math, and original media on the page.

In this problem we consider triangles drawn on a hexagonal lattice, where each lattice point in the plane has six neighbouring points equally spaced around it, all distance \(1\) away.

We call a triangle remarkable if

  • All three vertices and its incentre lie on lattice points.

  • At least of its angles if \(60^\circ \)

PIC

Above are four examples of remarkable triangles, with \(60^\circ \) angles illustrated in red. Triangles A and B have inradius \(1\); C has inradius \(\sqrt [3]{3}\); D has inradius \(2\).

Define \(T(r)\) o be the number of remarkable triangles with inradius \(\leq r\). Rotations and reflections, such as triangles A and B above, are counted separately; however direct translations are not. That is, the same triangle drawn in different positions of the lattice is only counted once.

You are give \(T(0.5) = 2\), \(T(2) = 44\) and \(T(10) = 1302\).

Find \(T(10^6)\).

Problem 883: Remarkable Representations

Mathematical Analysis

Theorem 1 (Sum of Squares)

For any finite group GG with irreducible representations ρ1,,ρh\rho_1, \ldots, \rho_h:

i=1h(dimρi)2=G\sum_{i=1}^{h} (\dim \rho_i)^2 = |G|

Proof. Consider the regular representation R:GGL(C[G])R: G \to GL(\mathbb{C}[G]). By Maschke’s theorem, RR decomposes into irreducibles: Ri=1h(dimρi)ρiR \cong \bigoplus_{i=1}^{h} (\dim \rho_i) \cdot \rho_i. Taking dimensions: G=dimR=(dimρi)2|G| = \dim R = \sum (\dim \rho_i)^2. \square

Theorem 2 (Number of Irreducibles)

hh = number of conjugacy classes of GG.

Proof. The center of the group algebra Z(C[G])Z(\mathbb{C}[G]) has dimension equal to the number of conjugacy classes, and also equal to hh since the Wedderburn decomposition gives hh simple summands. \square

Theorem 3 (Orthogonality Relations)

For irreducible characters χi,χj\chi_i, \chi_j:

1GgGχi(g)χj(g)=δij\frac{1}{|G|}\sum_{g \in G} \chi_i(g) \overline{\chi_j(g)} = \delta_{ij}

Theorem 4 (Divisibility)

dimρiG\dim \rho_i \mid |G| for each irreducible representation.

Concrete Examples

Cyclic Group Z/nZ\mathbb{Z}/n\mathbb{Z}

All irreducible representations are 1-dimensional: ρk(g)=e2πikg/n\rho_k(g) = e^{2\pi i k g / n} for k=0,,n1k = 0, \ldots, n-1.

Check: k=0n112=n=Z/nZ\sum_{k=0}^{n-1} 1^2 = n = |\mathbb{Z}/n\mathbb{Z}|. \checkmark

Symmetric Group S3S_3

S3=6|S_3| = 6, conjugacy classes: {e},{(12),(13),(23)},{(123),(132)}\{e\}, \{(12),(13),(23)\}, \{(123),(132)\}. So h=3h = 3.

Dimensions: d1=1,d2=1,d3=2d_1 = 1, d_2 = 1, d_3 = 2.

Check: 12+12+22=1+1+4=6=S31^2 + 1^2 + 2^2 = 1 + 1 + 4 = 6 = |S_3|. \checkmark

The character table:

ee(12)(12)(123)(123)
χ1\chi_1 (trivial)111
χ2\chi_2 (sign)11-11
χ3\chi_3 (standard)201-1

Symmetric Group S4S_4

S4=24|S_4| = 24, h=5h = 5 conjugacy classes. Dimensions: 1,1,2,3,31, 1, 2, 3, 3.

Check: 1+1+4+9+9=241 + 1 + 4 + 9 + 9 = 24. \checkmark

Dihedral Group DnD_n (nn odd)

Dn=2n|D_n| = 2n, (n+3)/2(n+3)/2 conjugacy classes. Dimensions: two 1-dimensional, (n1)/2(n-1)/2 of dimension 2.

Check: 21+n124=2+2(n1)=2n2 \cdot 1 + \frac{n-1}{2} \cdot 4 = 2 + 2(n-1) = 2n. \checkmark

Verification Table

| Group | G|G| | Dimensions | di2\sum d_i^2 | Match | |:—|:-:|:—|:-:|:-:| | Z/4\mathbb{Z}/4 | 4 | 1,1,1,1 | 4 | Yes | | S3S_3 | 6 | 1,1,2 | 6 | Yes | | D4D_4 | 8 | 1,1,1,1,2 | 8 | Yes | | Q8Q_8 | 8 | 1,1,1,1,2 | 8 | Yes | | A4A_4 | 12 | 1,1,1,3 | 12 | Yes | | S4S_4 | 24 | 1,1,2,3,3 | 24 | Yes |

Finding All Solutions to di2=n\sum d_i^2 = n

This is equivalent to representing nn as a sum of perfect squares where each dind_i \mid n.

Burnside’s Lemma Connection

The number of orbits of a group GG acting on a set XX:

X/G=1GgGXg|X/G| = \frac{1}{|G|}\sum_{g \in G} |X^g|

This uses the character of the permutation representation, connecting representation theory to counting problems.

Schur Orthogonality (Column Version)

ρχρ(g)χρ(h)=GCg[gh]\sum_{\rho} \chi_\rho(g)\overline{\chi_\rho(h)} = \frac{|G|}{|C_g|}[g \sim h]

where CgC_g is the conjugacy class of gg and [gh][g \sim h] means gg and hh are conjugate.

Complexity Analysis

OperationTime
Compute character tableO(h3)O(h^3) where hh = conjugacy classes
Verify sum of squaresO(h)O(h)
Burnside orbit counting$O(

Answer

14854003484704\boxed{14854003484704}

Code

Each problem page includes the exact C++ and Python source files from the local archive.

C++ project_euler/problem_883/solution.cpp
/*
 * Problem 883: Remarkable Representations
 * sum(dim rho_i)^2 = |G| for irreducible representations.
 */
#include <bits/stdc++.h>
using namespace std;

bool verify(int order, vector<int> dims) {
    int s = 0;
    for (int d : dims) { s += d * d; if (order % d != 0) return false; }
    return s == order;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    // Known groups
    cout << "=== Sum of Squares ===" << endl;
    struct Group { string name; int order; vector<int> dims; };
    vector<Group> groups = {
        {"Z/4", 4, {1,1,1,1}},
        {"S_3", 6, {1,1,2}},
        {"D_4", 8, {1,1,1,1,2}},
        {"Q_8", 8, {1,1,1,1,2}},
        {"A_4", 12, {1,1,1,3}},
        {"S_4", 24, {1,1,2,3,3}},
        {"S_5", 120, {1,1,4,4,5,5,6}},
    };
    for (auto& g : groups) {
        int s = 0;
        for (int d : g.dims) s += d * d;
        bool ok = verify(g.order, g.dims);
        cout << g.name << ": |G|=" << g.order << ", sum=" << s
             << (ok ? " OK" : " FAIL") << endl;
        assert(ok);
    }

    // Dihedral groups
    cout << "\n=== Dihedral Groups ===" << endl;
    for (int n = 3; n <= 10; n++) {
        int order = 2 * n;
        vector<int> dims;
        if (n % 2 == 1) {
            dims = {1, 1};
            for (int i = 0; i < (n - 1) / 2; i++) dims.push_back(2);
        } else {
            dims = {1, 1, 1, 1};
            for (int i = 0; i < (n - 2) / 2; i++) dims.push_back(2);
        }
        int s = 0;
        for (int d : dims) s += d * d;
        cout << "D_" << n << ": |D|=" << order << ", sum=" << s
             << (s == order ? " OK" : " FAIL") << endl;
        assert(s == order);
    }

    cout << "\nAnswer: sum d_i^2 = |G| (verified for all test groups)" << endl;
    return 0;
}