I'm putting together a collection of tables of orders of certain groups and there's a theorem that specifies that some of those groups are infinite. It is Theorem 3(5) of M. I. Prischepov, "Asphericity, atoricity, and symmetrically presented groups":
I've written a programme in GAP to capture $(a)-(c)$ and, luckily, I included $n=2$ by mistake (and it was a mistake because, as you can see, $n$ divides $4r, 4s$, and $2s$, so it does not satisfy any of $(a)-(c)$); however, values of $n=2$ appeared in the output.
Why? What do I do to correct this mistake?
Here is my code:
for n in [2..10] do
for r in [2..10] do
for s in [1..10] do
if
r>2*s and
(not (3*r=0 mod n or
4*r=0 mod n or
2*s=0 mod n or
s+r=0 mod n or
s-r=0 mod n or
s+2*r=0 mod n or
s-2*r=0 mod n or
s+3*r=0 mod n or
2*s+r=0 mod n) or
not (3*s=0 mod n or
4*s=0 mod n or
5*s=0 mod n or
2*r=0 mod n or
r+s=0 mod n or
r-s=0 mod n or
r+2*s=0 mod n or
r-2*s=0 mod n or
r+3*s=0 mod n or
2*r+s=0 mod n) or
not (2*r=0 mod n or
3*r=0 mod n or
2*s=0 mod n or
3*s=0 mod n or
r+s=0 mod n or
r-s=0 mod n or
r+2*s=0 mod n or
s+2*r=0 mod n))
then
H:=[r, n, s];
Print(H, "\n");
fi;
od;
od;
od;
Print("Done.\n");
Please help :)

You can't do modular equations like this in GAP.
0 mod nis0,2*ris whatever, they're unequal integers! You need to use((4*r) mod n) = 0and so on. The problem is that GAP, like lots of computer scientists, treatsmod nas a unary suffix operator that returns the canonical representative mod $n$ of its argument.For example,
Also, you missed out the $5r$ condition from (a).