Determine the value of:
{(2021)!/(2017)2}
Where, {x} = x - ⌊x⌋
Note: ⌊x⌋ denotes the floor function - that is, the greatest integer less than or equal to x.
*** Computer program assisted solutions are welcome, but an analytic solution is preferred.
a=sym(1);
for i=2:2021
a=a*i;
end
m=mod(a,2017^2)
disp(m/2017^2)
gives
m =
4019881
1993/2017
The remainder of the factorial divided by 2017^2 is 4019881, and the reduced fraction portion of the quotient is 1993/2017, as the prime 2017 occurs only once in 2021!. The fraction is approximately 0.988101140307387.
Alternatively, without using extended precision:
a=1;
for i=2:2021
a=mod(a*i,2017^2);
end
disp(a)
disp(a/2017^2)
disp(sym(a)/2017^2)
producing
4019881
0.988101140307387
1993/2017
showing the remainder and the fractional part of the quotient in decimal approximation and rational form.
The decimal fraction has a period of 2016.
|
Posted by Charlie
on 2023-03-25 11:56:54 |