<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass{article}
\usepackage{lisp-on-tex}
\lispinterp{%
  (\define \sq (\lambda (\n) (\* \n \n)))
  (\define \fact (\lambda (\n) (\lispif (\= \n :0) :1 (\* \n (\fact (\- \n :1))))))
  }
\newcommand\sq[1]{\lispinterp{(\texprint (\sq :#1))}}
\newcommand\fact[1]{\lispinterp{(\texprint (\fact :#1))}}

\begin{document}
\section{Factorials and Squares}
  \begin{center}
  \begin{tabular}{r||rr}\hline\hline
    $n$ &amp; $n!$ &amp; $n^2$ \\ 
    \hline
     1 &amp; \fact{1} &amp; \sq{1} \\
     2 &amp; \fact{2} &amp; \sq{2} \\
     3 &amp; \fact{3} &amp; \sq{3} \\
     4 &amp; \fact{4} &amp; \sq{4} \\
     5 &amp; \fact{5} &amp; \sq{5} \\
     6 &amp; \fact{6} &amp; \sq{6} \\
     7 &amp; \fact{7} &amp; \sq{7} \\
     8 &amp; \fact{8} &amp; \sq{8} \\
     9 &amp; \fact{9} &amp; \sq{9} \\
    10 &amp; \fact{10} &amp; \sq{10} \\
    11 &amp; \fact{11} &amp; \sq{11} \\
    \hline
  \end{tabular}
  \end{center}
\end{document}</pre></body></html>