MHB Find remainder when (2∗4∗6∗8⋯∗2016)−(1∗3∗5∗7⋯∗2015) is divided by 2017

  • Thread starter Thread starter kaliprasad
  • Start date Start date
  • Tags Tags
    2017 Remainder
kaliprasad
Gold Member
MHB
Messages
1,333
Reaction score
0
$ ( 2 * 4 * 6 * 8 \cdots * 2016) - ( 1 * 3 * 5 * 7 \cdots * 2015)$ is divided by 2017 what is the remainder
 
Last edited:
Mathematics news on Phys.org
Fun little problem.
First p=2017 is a prime congruent to 1 mod 4; i.e (p-1)/2 is even. Let $x=2\times4\times\cdots \times p-1$ and $y=1\times3\times5\cdots\times p-2$. Now there are (p-1)/2 factors in x. Write x in reverse order: $x=p-1\times p-3\times p-5\cdots p-(p-2)$. So mod p we see that $x=(-1)^{(p-1)/2}1\times3\times5\cdots\times p-2=y$. So x - y is 0 mod p. Notice the result is true for any prime that is 1 mod 4.
 
johng said:
Fun little problem.
First p=2017 is a prime congruent to 1 mod 4; i.e (p-1)/2 is even. Let $x=2\times4\times\cdots \times p-1$ and $y=1\times3\times5\cdots\times p-2$. Now there are (p-1)/2 factors in x. Write x in reverse order: $x=p-1\times p-3\times p-5\cdots p-(p-2)$. So mod p we see that $x=(-1)^{(p-1)/2}1\times3\times5\cdots\times p-2=y$. So x - y is 0 mod p. Notice the result is true for any prime that is 1 mod 4.

above is correct but p need not be prime. you have not used the fact. 2017 is incidentally prime but this fact is not used.