0

How do I combine the congruences $p=\pm 1\mod 8$ and $p=\pm 1\mod 5$ into a congruence $\mod 40$ where $p$ is an odd prime? I can see by writing out values the answer is $p=\pm 1\mod 40$ and $p=\pm 9\mod 40$

nonuser
  • 90,026
Loobear23
  • 1,162

2 Answers2

1

1. case

If $p=5a+1$ and $p=8b-1$ then $5a+1=8b-1$ so $$5\mid 8b-2\implies 5\mid 16b-4\implies 5\mid b+1$$

so $b+1=5c$ and thus $$p= 8(5c-1)-1 = 40c-9$$ i.e. $$ p\equiv-9 \pmod{40}$$

Similary you do the other cases...

nonuser
  • 90,026
1

Using Chinese Remainder Theorem, you can prove that since $\gcd(8, 5) = 1$, for each value $a \mod 8$ and $b \mod 5$, you will always have unique $c\mod 40$.

1) $p = 1 \mod 8, p = 1 \mod 5$ yields $p = 1 \mod 40$
2) $p = 7 \mod 8, p = 1 \mod 5$ yields $p = 31 \mod 40$
3) $p = 1 \mod 8, p = 4 \mod 5$ yields $p = 9 \mod 40$
4) $p = 7 \mod 8, p = 4 \mod 5$ yields $p = 39 \mod 40$

Gratus
  • 169