Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to NotSure,csearle,brightncheerful,Dormouse,Silverstar64, for Donating to support the site

Remainder

cinelli
Lemon Slice
Posts: 367
Joined: November 9th, 2016, 11:33 am
Has thanked: 124 times
Been thanked: 70 times

Remainder

#378292

Postby cinelli » January 18th, 2021, 11:42 am

A mathematical challenge.

What is the remainder when 2021 factorial is divided by 2017 squared? And what is the connection between your answer and the Grand National?

Cinelli

Gengulphus
Lemon Quarter
Posts: 3783
Joined: November 4th, 2016, 1:17 am
Been thanked: 2156 times

Re: Remainder

#378380

Postby Gengulphus » January 18th, 2021, 4:24 pm

cinelli wrote:A mathematical challenge.

What is the remainder when 2021 factorial is divided by 2017 squared? ...

A spoiler for that part, though it includes a reference to a mathematical theorem that I'm not going to try to prove here - look it up on Wikipedia and research the mathematics used there if you feel you need to know full details!

Taking out the common factor 2017, and using the expression x rmdr y for the positive remainder of x when divided by y:

(2021!) rmdr (2017^2) = 2017 * ((2016! * 2018 * 2019 * 2020 * 2021) rmdr 2017)

= (((2016!) rmdr 2017) * (2018 rmdr 2017) * (2019 rmdr 2017) * (2020 rmdr 2017) * (2021 rmdr 2017)) rmdr 2017

= (((2016!) rmdr 2017) * 1 * 2 * 3 * 4) rmdr 2017

= (24 * ((2016!) rmdr 2017)) rmdr 2017

2017 is prime, which allows me to use Wilson's theorem, which says that (p-1)! is congruent to -1 modulo p for any prime p (i.e. p divides the difference between (p-1)! and -1). That implies that it's also congruent to p-1 modulo p, so (2016!) rmdr 2017 = 2016, and so the answer is (24 * 2016) mod 2017 = 1993.

cinelli wrote:... And what is the connection between your answer and the Grand National?

And a spoiler for that part as well, though obtained by guessing and checking my guess is correct - my knowledge of the Grand National was almost non-existent (and only slightly better now!):

It seemed likely that there was something special about the 1993 Grand National, and looking up "1993 Grand National" on Wikipedia confirms that guess: 1993 was the year that the Grand National was declared void.

Gengulphus

cinelli
Lemon Slice
Posts: 367
Joined: November 9th, 2016, 11:33 am
Has thanked: 124 times
Been thanked: 70 times

Re: Remainder

#378858

Postby cinelli » January 20th, 2021, 11:47 am

Reply to spoiler.

Well solved, Gengulphus. An elegant solution. This is a problem set by Michael Penn and is, I think, a nice use of Wilson's theorem.

1993 was the year when they bungled the start of the Grand National. A few horses completed the course but the result didn't count. The Wikipedia article goes into extraordinary detail.


Cinelli


Return to “Games, Puzzles and Riddles”

Who is online

Users browsing this forum: No registered users and 4 guests