Lagmental Vicfred

Math and Code Test by Vicfred

Math test

Inline math:

\(e^{i\pi} + 1 = 0\)

Display math:

$$ q = p^n $$

A slightly more interesting one:

$$ \mathbf{F}_{p^n}^{\times} \cong C_{p^n - 1}. $$

And:

$$ \int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}. $$

C++ syntax highlighting

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#include <cstdint>
#include <iostream>
#include <vector>

using namespace std;

int main() {
  vector<int64_t> primes = {2, 3, 5, 7, 11};

  for (int64_t p : primes) {
    cout << "F_" << p
         << " has " << p
         << " elements." << endl;
  }

  return 0;
}

Haskell syntax highlighting

1
2
3
4
5
primes :: [Integer]
primes = [2, 3, 5, 7, 11]

main :: IO ()
main = mapM_ print primes

Shell syntax highlighting

1
2
pelican content
pelican --listen

Finite Fields up to Order 128

Let \(\zeta_n\) denote a primitive \(n\)th root of unity.

For every finite field \(\mathbf F_q\),

$$ \mathbf F_q^\times \cong C_{q-1}=\mu_{q-1}. $$

In particular, if \(q=p^d\), then

$$ \mathbf F_q=\mathbf F_p(\zeta_{q-1}), $$

although a root of unity of much smaller order often already generates the extension.

Field Units Cyclotomic realizations Why it is beautiful
\(\mathbf F_2\) \(\mathbf F_2^\times\cong C_1\) \(\mathbf F_2=\mathbf F_2(\zeta_1)\) The atom. Its entire multiplicative group is trivial and \(-1=1\). Characteristic \(2\) begins its campaign against ordinary intuition.
\(\mathbf F_3\) \(\mathbf F_3^\times\cong C_2\) \(\mathbf F_3=\mathbf F_3(\zeta_2)\) The smallest field where \(1\neq-1\). The familiar pair \(\{\pm1\}\) finally exists.
\(\mathbf F_4\) \(\mathbf F_4^\times\cong C_3\) \(\mathbf F_4=\mathbf F_2(\zeta_3)\) The first genuine finite-field extension. Its three nonzero elements are exactly the cube roots of unity. Tiny perfection.
\(\mathbf F_5\) \(\mathbf F_5^\times\cong C_4\) \(\mathbf F_5=\mathbf F_5(\zeta_4)\) Already contains a primitive fourth root of unity: \(2^2=-1\). An \(i\)-like element appears inside the prime field itself.
\(\mathbf F_7\) \(\mathbf F_7^\times\cong C_6\) \(\mathbf F_7=\mathbf F_7(\zeta_6)\) Contains primitive \(3\)rd and \(6\)th roots of unity. The factorization \(6=2\cdot3\) gives a surprisingly rich tiny multiplicative world.
\(\mathbf F_8\) \(\mathbf F_8^\times\cong C_7\) \(\mathbf F_8=\mathbf F_2(\zeta_7)\) The first cubic extension. Since \(7\) is prime, every nonzero element except \(1\) is a primitive \(7\)th root of unity.
\(\mathbf F_9\) \(\mathbf F_9^\times\cong C_8\) \(\mathbf F_9=\mathbf F_3(\zeta_4)=\mathbf F_3(\zeta_8)\) The finite-field analogue of adjoining \(i\): \(\mathbf F_9=\mathbf F_3(i)\). Its entire unit group is \(\mu_8\).
\(\mathbf F_{11}\) \(\mathbf F_{11}^\times\cong C_{10}\) \(\mathbf F_{11}=\mathbf F_{11}(\zeta_{10})\) Primitive fifth roots of unity already live in the prime field because \(5\mid10\).
\(\mathbf F_{13}\) \(\mathbf F_{13}^\times\cong C_{12}\) \(\mathbf F_{13}=\mathbf F_{13}(\zeta_{12})\) Contains primitive roots of orders \(3,4,6,\) and \(12\). A very rich little cyclotomic playground.
\(\mathbf F_{16}\) \(\mathbf F_{16}^\times\cong C_{15}\) \(\mathbf F_{16}=\mathbf F_2(\zeta_5)=\mathbf F_2(\zeta_{15})\) The famous counterintuitive step: \(\zeta_3\) gives \(\mathbf F_4\), \(\zeta_7\) gives \(\mathbf F_8\), but the smaller \(\zeta_5\) needs degree \(4\). It also contains \(\mathbf F_4\).
\(\mathbf F_{17}\) \(\mathbf F_{17}^\times\cong C_{16}\) \(\mathbf F_{17}=\mathbf F_{17}(\zeta_{16})\) Pure \(2\)-power cyclotomy: \(\mathbf F_{17}^\times\) has order \(2^4\). Fermat-prime elegance appears here.
\(\mathbf F_{19}\) \(\mathbf F_{19}^\times\cong C_{18}\) \(\mathbf F_{19}=\mathbf F_{19}(\zeta_{18})\) Since \(18=2\cdot3^2\), primitive \(9\)th and \(18\)th roots of unity occur naturally.
\(\mathbf F_{23}\) \(\mathbf F_{23}^\times\cong C_{22}\) \(\mathbf F_{23}=\mathbf F_{23}(\zeta_{22})\) Its multiplicative group contains the large prime-order subgroup \(\mu_{11}\). Clean and almost prime-order.
\(\mathbf F_{25}\) \(\mathbf F_{25}^\times\cong C_{24}\) \(\mathbf F_{25}=\mathbf F_5(\zeta_3)=\mathbf F_5(\zeta_{24})\) A lovely surprise: merely adjoining a primitive cube root of unity to \(\mathbf F_5\) produces the quadratic extension \(\mathbf F_{25}\).
\(\mathbf F_{27}\) \(\mathbf F_{27}^\times\cong C_{26}\) \(\mathbf F_{27}=\mathbf F_3(\zeta_{13})=\mathbf F_3(\zeta_{26})\) A primitive \(13\)th root creates a cubic extension because \(\operatorname{ord}_{13}(3)=3\). There are no intermediate fields.
\(\mathbf F_{29}\) \(\mathbf F_{29}^\times\cong C_{28}\) \(\mathbf F_{29}=\mathbf F_{29}(\zeta_{28})\) Since \(28=2^2\cdot7\), fourth and seventh roots of unity coexist naturally.
\(\mathbf F_{31}\) \(\mathbf F_{31}^\times\cong C_{30}\) \(\mathbf F_{31}=\mathbf F_{31}(\zeta_{30})\) The factorization \(30=2\cdot3\cdot5\) gives elements of orders \(2,3,5,6,10,15,\) and \(30\).
\(\mathbf F_{32}\) \(\mathbf F_{32}^\times\cong C_{31}\) \(\mathbf F_{32}=\mathbf F_2(\zeta_{31})\) An absolute jewel. Since \(31\) is prime, every element of \(\mathbf F_{32}\setminus\{0,1\}\) is a primitive \(31\)st root of unity.
\(\mathbf F_{37}\) \(\mathbf F_{37}^\times\cong C_{36}\) \(\mathbf F_{37}=\mathbf F_{37}(\zeta_{36})\) The unit group has order \(36=2^2\cdot3^2\), giving a rich mixture of \(2\)-power and \(3\)-power cyclotomy.
\(\mathbf F_{41}\) \(\mathbf F_{41}^\times\cong C_{40}\) \(\mathbf F_{41}=\mathbf F_{41}(\zeta_{40})\) Since \(40=2^3\cdot5\), eighth roots and fifth roots of unity coexist inside one prime field.
\(\mathbf F_{43}\) \(\mathbf F_{43}^\times\cong C_{42}\) \(\mathbf F_{43}=\mathbf F_{43}(\zeta_{42})\) \(42=2\cdot3\cdot7\): quadratic, cubic, and seventh-root cyclotomy all coexist.
\(\mathbf F_{47}\) \(\mathbf F_{47}^\times\cong C_{46}\) \(\mathbf F_{47}=\mathbf F_{47}(\zeta_{46})\) Its multiplicative structure is dominated by the large prime-order subgroup \(\mu_{23}\).
\(\mathbf F_{49}\) \(\mathbf F_{49}^\times\cong C_{48}\) \(\mathbf F_{49}=\mathbf F_7(\zeta_4)=\mathbf F_7(\zeta_{48})\) Beautifully simple: adjoining \(i\) to \(\mathbf F_7\) produces \(\mathbf F_{49}\). Its unit group has order \(48=2^4\cdot3\).
\(\mathbf F_{53}\) \(\mathbf F_{53}^\times\cong C_{52}\) \(\mathbf F_{53}=\mathbf F_{53}(\zeta_{52})\) Since \(52=2^2\cdot13\), it is a natural home for primitive \(13\)th roots of unity.
\(\mathbf F_{59}\) \(\mathbf F_{59}^\times\cong C_{58}\) \(\mathbf F_{59}=\mathbf F_{59}(\zeta_{58})\) Its cyclotomic structure is dominated by the large prime \(29\).
\(\mathbf F_{61}\) \(\mathbf F_{61}^\times\cong C_{60}\) \(\mathbf F_{61}=\mathbf F_{61}(\zeta_{60})\) One of the richest prime-field playgrounds in this range: \(60=2^2\cdot3\cdot5\) has many divisors and therefore many root orders.
\(\mathbf F_{64}\) \(\mathbf F_{64}^\times\cong C_{63}\) \(\mathbf F_{64}=\mathbf F_2(\zeta_9)=\mathbf F_2(\zeta_{21})=\mathbf F_2(\zeta_{63})\) A primitive \(9\)th root already generates the sextic extension. It contains both the \(\zeta_3\) world \(\mathbf F_4\) and the \(\zeta_7\) world \(\mathbf F_8\).
\(\mathbf F_{67}\) \(\mathbf F_{67}^\times\cong C_{66}\) \(\mathbf F_{67}=\mathbf F_{67}(\zeta_{66})\) Since \(66=2\cdot3\cdot11\), it simultaneously contains primitive \(3\)rd, \(6\)th, \(11\)th, \(22\)nd, \(33\)rd, and \(66\)th roots.
\(\mathbf F_{71}\) \(\mathbf F_{71}^\times\cong C_{70}\) \(\mathbf F_{71}=\mathbf F_{71}(\zeta_{70})\) \(70=2\cdot5\cdot7\), so fifth- and seventh-root cyclotomy meet naturally.
\(\mathbf F_{73}\) \(\mathbf F_{73}^\times\cong C_{72}\) \(\mathbf F_{73}=\mathbf F_{73}(\zeta_{72})\) \(72=2^3\cdot3^2\) gives unusually rich simultaneous \(2\)-power and \(3\)-power root-of-unity structure.
\(\mathbf F_{79}\) \(\mathbf F_{79}^\times\cong C_{78}\) \(\mathbf F_{79}=\mathbf F_{79}(\zeta_{78})\) Since \(78=2\cdot3\cdot13\), primitive \(13\)th roots coexist with cubic structure.
\(\mathbf F_{81}\) \(\mathbf F_{81}^\times\cong C_{80}\) \(\mathbf F_{81}=\mathbf F_3(\zeta_5)=\mathbf F_3(\zeta_{16})=\mathbf F_3(\zeta_{80})\) A primitive fifth root already generates the quartic extension because \(\operatorname{ord}_5(3)=4\). It also contains \(\mathbf F_9\) as a proper subfield.
\(\mathbf F_{83}\) \(\mathbf F_{83}^\times\cong C_{82}\) \(\mathbf F_{83}=\mathbf F_{83}(\zeta_{82})\) Its unit group has order \(82=2\cdot41\), dominated by the large prime cyclotomic subgroup \(\mu_{41}\).
\(\mathbf F_{89}\) \(\mathbf F_{89}^\times\cong C_{88}\) \(\mathbf F_{89}=\mathbf F_{89}(\zeta_{88})\) \(88=2^3\cdot11\) combines substantial \(2\)-power structure with primitive \(11\)th roots.
\(\mathbf F_{97}\) \(\mathbf F_{97}^\times\cong C_{96}\) \(\mathbf F_{97}=\mathbf F_{97}(\zeta_{96})\) \(96=2^5\cdot3\): a remarkable amount of \(2\)-power cyclotomy occurs inside a prime field of fewer than \(100\) elements.
\(\mathbf F_{101}\) \(\mathbf F_{101}^\times\cong C_{100}\) \(\mathbf F_{101}=\mathbf F_{101}(\zeta_{100})\) The particularly tidy factorization \(100=2^2\cdot5^2\) gives rich fifth-power cyclotomic structure.
\(\mathbf F_{103}\) \(\mathbf F_{103}^\times\cong C_{102}\) \(\mathbf F_{103}=\mathbf F_{103}(\zeta_{102})\) Since \(102=2\cdot3\cdot17\), primitive \(17\)th roots sit alongside cubic and sixth-root structure.
\(\mathbf F_{107}\) \(\mathbf F_{107}^\times\cong C_{106}\) \(\mathbf F_{107}=\mathbf F_{107}(\zeta_{106})\) Its multiplicative group has the simple shape \(C_{2\cdot53}\), with a large prime-order subgroup \(\mu_{53}\).
\(\mathbf F_{109}\) \(\mathbf F_{109}^\times\cong C_{108}\) \(\mathbf F_{109}=\mathbf F_{109}(\zeta_{108})\) \(108=2^2\cdot3^3\), so this field is especially rich in \(3\)-power roots of unity, including primitive \(27\)th roots.
\(\mathbf F_{113}\) \(\mathbf F_{113}^\times\cong C_{112}\) \(\mathbf F_{113}=\mathbf F_{113}(\zeta_{112})\) \(112=2^4\cdot7\) combines deep \(2\)-power cyclotomy with primitive seventh roots.
\(\mathbf F_{121}\) \(\mathbf F_{121}^\times\cong C_{120}\) \(\mathbf F_{121}=\mathbf F_{11}(\zeta_3)=\mathbf F_{11}(\zeta_{120})\) A primitive cube root already generates the quadratic extension of \(\mathbf F_{11}\). Meanwhile \(120=2^3\cdot3\cdot5\) makes its unit group spectacularly rich.
\(\mathbf F_{125}\) \(\mathbf F_{125}^\times\cong C_{124}\) \(\mathbf F_{125}=\mathbf F_5(\zeta_{31})=\mathbf F_5(\zeta_{124})\) A primitive \(31\)st root creates a cubic extension because \(\operatorname{ord}_{31}(5)=3\). Since the degree is prime, there are no intermediate fields.
\(\mathbf F_{127}\) \(\mathbf F_{127}^\times\cong C_{126}\) \(\mathbf F_{127}=\mathbf F_{127}(\zeta_{126})\) \(126=2\cdot3^2\cdot7\) gives a rich mixture of cubic, ninth-root, and seventh-root behavior. Also, \(127\) itself is a Mersenne prime.
\(\mathbf F_{128}\) \(\mathbf F_{128}^\times\cong C_{127}\) \(\mathbf F_{128}=\mathbf F_2(\zeta_{127})\) Peak tiny binary-field behavior. Since \(127\) is prime, every element of \(\mathbf F_{128}\setminus\{0,1\}\) is a primitive \(127\)th root of unity. The extension degree \(7\) is prime, so there are no intermediate fields.

This article was posted on Sat 29 August 2026. Facts and circumstances may have changed since publication.
Please contact me before jumping to conclusions if something seems wrong or unclear.