Solution:
Let n=2023. If P(x)=xn+an−1xn−1+⋯+a0, then let
R(x)=xnP(1−x1)=(x−1)n+an−1(x−1)nx+⋯+a0xn
Then, note that Q(x)=P(x)−R(x) is a polynomial of degree at most n, and it has roots 1,2,…,n, so we have Q(x)=k(x−1)⋯(x−n) for some real constant k. Now we determine P(x) in terms of Q(x). If g(x)=1−1/x, then g(g(x))=1−x1 and g(g(g(x)))=x. Therefore, we have
P(x)−xnP(1−x1)P(1−x1)−(1−x1)nP(1−x1)P(1−x1)−(1−x1)nP(x)=Q(x)=Q(1−x1)=Q(1−x1).
Adding the first equation, xn times the second, and (x−1)n times the third yields
2P(x)=Q(x)+xnQ(xx−1)+(x−1)nQ(1−x1),
so
P(x)=2k((x−1)(x−2)⋯(x−n)+(0x−1)(−1x−1)⋯(−(n−1)x−1)+(−1x+0)(−2x+1)⋯(−nx+(n−1))).
Therefore,
P(−1)=2k(−(n+1)!+0+(2n+1)!!)
Also, since P is monic, we know that
1=2k(1+0−n!)
so
P(−1)=1−n!(2n−1)!!−(n+1)!
Modulo 2027, (n+1)!=2024!≡−1 and n!=2023!≡1 (by Wilson's theorem and properties of factorials mod prime). Also, (2n+1)!!≡0. So our answer is
1−1/61/2=53≡52030=406