<?php
$ns = [61,62,63,64];
printf("\\begin{aligned}\n");
foreach ($ns as $n) {
for ($x = 0; $x < $n; ++$x) {
if (($x*$x*$x) % $n == 1) {
printf("%d^3 &\\equiv 1 \mod %d\\\\", $x, $n);
}
}
}
printf("\\end{aligned}\n");
\(\begin{aligned} 1^3 &\equiv 1 \mod 61\\13^3 &\equiv 1 \mod 61\\47^3 &\equiv 1 \mod 61\\1^3 &\equiv 1 \mod 62\\5^3 &\equiv 1 \mod 62\\25^3 &\equiv 1 \mod 62\\1^3 &\equiv 1 \mod 63\\4^3 &\equiv 1 \mod 63\\16^3 &\equiv 1 \mod 63\\22^3 &\equiv 1 \mod 63\\25^3 &\equiv 1 \mod 63\\37^3 &\equiv 1 \mod 63\\43^3 &\equiv 1 \mod 63\\46^3 &\equiv 1 \mod 63\\58^3 &\equiv 1 \mod 63\\1^3 &\equiv 1 \mod 64\\\end{aligned}\)