If I want to test whether a page is odd/even (i.e. modulo 2) then I can use the following:
\ifthenelse{\isodd{\thepage}}{}{}
What can I do if I want to test whether a page is modulo 4?
A minimal example:
\documentclass{article}
\usepackage{ifthen}
\newcommand{\ismodfour}{???}
\begin{document}
Page 1: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage
Page 2: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage
Page 3: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage
Page 4: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage
Page 5: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage
\end{document}

intcalcand managed to solve the problem:\newcommand{\ismodfour}[1]{\equal{\intcalcMod{#1}{4}}{0}}. Many thanks! – Geoff Oct 06 '13 at 12:43\clearpage– David Carlisle Oct 06 '13 at 12:52\pageref{...}? – A.Ellett Oct 06 '13 at 15:16\pagerefreturns the print form (and with hyperref link information) and not a pure number that you can pass to the mod 4 or numeric test. – David Carlisle Oct 06 '13 at 17:05