Skip to content

AdditionTable ​

The addition table of ℤ/n, R = QuotientRing(Integers, n): the matrix whose (i, j) entry is aᵢ + aⱼ, its rows and columns ℤ/n's elements in the order ElementOrder lists them.

AdditionTable(R)the n × n matrix of sums, as ResidueClass entries, for 2 ≤ n ≤ 64
AdditionTable(R, ElementOrder -> order)rows and columns listed Natural (0, 1, …), by their ChineseRemainder residues, or by their p-adic digits (Adic)
Typed signatures
TypePackageApplies
(value, value*) -> listresiduesalways

Domain: Modular arithmetic

Details
  • A circulant: each row is the one above shifted by one place, so every value appears once in each row and column
  • Listed by Chinese remainders, ℤ/mn's table (m, n coprime) is ℤ/m's with a copy of ℤ/n's in each cell; listed by digits, ℤ/pᵏ's is p × p blocks of ℤ/pᵏ⁻¹'s
  • A Show draws it at any size as ArrayPlot(AdditionTable(R)), its cells colored by their values; as a value it stops at n = 64

Examples

1 more kept as data, checked against the oracles
Basic #

ℤ/3: each row the one above, shifted

live ↗
InAdditionTable(Z/3Z)\mathrm{AdditionTable}(ℤ/3ℤ)Out(0‾31‾32‾31‾32‾30‾32‾30‾31‾3)\begin{pmatrix}\overline{0}_{3} & \overline{1}_{3} & \overline{2}_{3}\\ \overline{1}_{3} & \overline{2}_{3} & \overline{0}_{3}\\ \overline{2}_{3} & \overline{0}_{3} & \overline{1}_{3}\end{pmatrix}

listed by binary digits, 0, 2, 1, 3: two blocks by parity, each a copy of ℤ/2's table

live ↗
InAdditionTable(Z/4Z,Rule(ElementOrder,Adic))\mathrm{AdditionTable}(ℤ/4ℤ, \mathrm{Rule}(\mathrm{ElementOrder}, \mathrm{Adic}))Out(0‾42‾41‾43‾42‾40‾43‾41‾41‾43‾42‾40‾43‾41‾40‾42‾4)\begin{pmatrix}\overline{0}_{4} & \overline{2}_{4} & \overline{1}_{4} & \overline{3}_{4}\\ \overline{2}_{4} & \overline{0}_{4} & \overline{3}_{4} & \overline{1}_{4}\\ \overline{1}_{4} & \overline{3}_{4} & \overline{2}_{4} & \overline{0}_{4}\\ \overline{3}_{4} & \overline{1}_{4} & \overline{0}_{4} & \overline{2}_{4}\end{pmatrix}
About
Examples3

Implementation

mappedwolframpackages/oracle/src/mappings.ts

Wolfram's GroupMultiplicationTable[CyclicGroup[n]] tabulates the same group, by element indices in GroupElements' order rather than by residues.

See also: MultiplicationTable, QuotientRing, ResidueClass