This puzzle is a variant on
Sawtooth Crossed Ratio Resolution
Determine the value of {(2021!)/2027}
Where the operator {x} is defined as {x} = x - ⌊x⌋
Note: ⌊x⌋ denotes the floor function - that is, the greatest integer less than or equal to x.
*** A computer program will only be trivially different from one used in Sawtooth Crossed Ratio Resolution, so I request an analytic solution.
I hope there's an easier way, but here's what I did:
Again the wording of the problem is strange. We really just want the remainder of 2021!/2027
Also again the divisor is prime, so we can use Wilson's theorem and start with the known remainder of 2026!/2027
r(2026!/2027)=2026
This means r(2025!/2027)=1
From here I worked back the hard way: using tables of remainders until I found the right number
If r(2024!/2027)=n then r(n*2025/2027)=1 so n=1013
If r(2023!/2026)=n then r(n*2024/2027)=1013 so n=338
If r(2022!/2026)=n then r(n*2023/2027)=338 so n=929
If r(2021!/2026)=n then r(n*2022/2027)=929 so n=625
So the solution is 625
-----------------------------------
I was about to hit Post Comment when I realized I could do the above four steps in one single step:
r(2025*2024*2023*2022/2027)=2*3*4*5=120
so I really just need
r(120n/2027)=1
and searching through the remainders gives n=625
|
Posted by Jer
on 2023-03-30 12:54:09 |