3

This is the table in my messy handwriting.

This is what I've ended up with so far. It would also be really nice if someone could help me inserting the 2^2x5 and the 2x11 in-between the existing columns please.

\setlength{\tabcolsep}{12pt}
\paragraph{}
\begin{tabular}{c c c c}
$n\mod19=3$ & $n\equiv3\pmod{19}$ & $n\equiv3\pmod{19}$ & $19$\\[0.25cm]
$n\mod20=1$ & $n\equiv1\pmod{20}$ & $n\equiv2\pmod{21}$ & $3\cdot7$\\[0.25cm]   
$n\mod21=2$ & $n\equiv2\pmod{21}$ & $n\equiv1\pmod{220}$ & $2^2\cdot5\cdot11$      \\[0.25cm] 
$n\mod22=1$ & $n\equiv1\pmod{22}$ & $n\equiv0\pmod{23}$ & $23$\\[0.25cm] 
$n\mod23=0$ & $n\equiv0\pmod{23}$ & 
\end{tabular}
\paragraph{}

3 Answers3

3
\documentclass{report}
\usepackage{amsmath}
\usepackage[a4paper]{geometry}
\begin{document}

{\setlength{\tabcolsep}{12pt}
$\left.
\begin{tabular}{c c c c}
    $n\mod19=3$ & $n\equiv3\pmod{19}$ & $n\equiv3\pmod{19}$ & $19$\\[0.25cm]
    $n\mod20=1$ & $n\equiv1\pmod{20}$ & $n\equiv2\pmod{21}$ & $3\cdot7$\\[0.25cm]   
    $n\mod21=2$ & $n\equiv2\pmod{21}$ & $n\equiv1\pmod{220}$ & $2^2\cdot5\cdot11$      \\[0.25cm] 
    $n\mod22=1$ & $n\equiv1\pmod{22}$ & $n\equiv0\pmod{23}$ & $23$\\[0.25cm] 
    $n\mod23=0$ & $n\equiv0\pmod{23}$ & 
\end{tabular}
\right\}$ 
text
}


\bigskip
{\setlength{\arraycolsep}{12pt}
    $\left.
    \begin{array}{c c c c}
        n\mod19=3 & n\equiv3\pmod{19} & n\equiv3\pmod{19} & 19\\[0.25cm]
        n\mod20=1 & n\equiv1\pmod{20} & n\equiv2\pmod{21} & 3\cdot7\\[0.25cm]   
        n\mod21=2 & n\equiv2\pmod{21} & n\equiv1\pmod{220} & 2^2\cdot5\cdot11      \\[0.25cm] 
        n\mod22=1 & n\equiv1\pmod{22} & n\equiv0\pmod{23} & 23\\[0.25cm] 
        n\mod23=0 & n\equiv0\pmod{23} & 
    \end{array}
    \right\}$ 
    text
}

\end{document}

enter image description here

user187802
  • 16,850
1

With {NiceTabular} of nicematrix.

\documentclass{article}
\usepackage{nicematrix}

\begin{document}

\setlength{\tabcolsep}{12pt}

\begin{NiceTabular}{c c c c} $n\mod19=3$ & $n\equiv3\pmod{19}$ & $n\equiv3\pmod{19}$ & $19$\[0.25cm] $n\mod20=1$ & $n\equiv1\pmod{20}$ & $n\equiv2\pmod{21}$ & $3\cdot7$\[0.25cm]
$n\mod21=2$ & $n\equiv2\pmod{21}$ & $n\equiv1\pmod{220}$ & $2^2\cdot5\cdot11$ \[0.25cm] $n\mod22=1$ & $n\equiv1\pmod{22}$ & $n\equiv0\pmod{23}$ & $23$\[0.25cm] $n\mod23=0$ & $n\equiv0\pmod{23}$ & \CodeAfter \SubMatrix{.}{1-1}{4-4}{}} \end{NiceTabular}

\end{document}

Output of the above code

F. Pantigny
  • 40,250
1

If you're not concerned about the vertical alignment of the components of the construction, a simple nested align-aligned will deliver:

enter image description here

\documentclass{article}

\usepackage{amsmath,eqparbox}

\usepackage[margin=1in]{geometry}% Just for this example

% https://tex.stackexchange.com/a/34412/5764 \makeatletter \NewDocumentCommand{\eqmathbox}{o O{c} m}{% \IfValueTF{#1} {\def\eqmathbox@##1##2{\eqmakebox[#1][#2]{$##1##2$}}} {\def\eqmathbox@##1##2{\eqmakebox{$##1##2$}}} \mathpalette\eqmathbox@{#3} } \makeatother

\begin{document}

\begin{align} & \begin{aligned} n \mod 19 &= 3 \ n \mod 20 &= 1 \ n \mod 21 &= 2 \ n \mod 22 &= 1 \ n \mod 23 &= 0 \end{aligned} & & \begin{aligned} n &\equiv 3 \pmod{19} \ n &\equiv 1 \pmod{20} & \eqmathbox[prp1]{2^2 \cdot 5} \ n &\equiv 2 \pmod{21} \ n &\equiv 1 \pmod{22} & \eqmathbox[prp1]{2 \cdot 11} \ n &\equiv 0 \pmod{23} \end{aligned} & &\left.\kern-\nulldelimiterspace\begin{aligned} n &\equiv 3 \pmod{19} & \eqmathbox[prp2]{19} \ n &\equiv 2 \pmod{21} & \eqmathbox[prp2]{3 \cdot 7} \ n &\equiv 1 \pmod{220} & \eqmathbox[prp2]{2^2 \cdot 5 \cdot 11} \ n &\equiv 0 \pmod{23} & \eqmathbox[prp2]{23} \end{aligned} \right} \end{align}

\end{document}

Werner
  • 603,163