Let P(x)=anxn+⋯+a0x0 with an=0. Comparing the coefficients of xn+1 on both sides gives an(n−2m)(n−1)=0, so n=1 or n=2m. If n=1, one easily verifies that P(x)=x is a solution, while P(x)=1 is not. Since the given condition is linear in P, this means that the linear solutions are precisely P(x)=tx for t∈R. Now assume that n=2m. The polynomial xP(x+1)−(x+1)P(x)=(n−1)anxn+⋯ has degree n, and therefore it has at least one (possibly complex) root r. If r∈/{0,−1}, define k=P(r)/r=P(r+1)/(r+1). If r=0, let k=P(1). If r=−1, let k=−P(−1). We now consider the polynomial S(x)=P(x)−kx. It also satisfies (1) because P(x) and kx satisfy it. Additionally, it has the useful property that r and r+1 are roots. Let A(x)=x3−mx2+1 and B(x)=x3+mx2+1. Plugging in x=s into (1) implies that: If s−1 and s are roots of S and s is not a root of A, then s+1 is a root of S. If s and s+1 are roots of S and s is not a root of B, then s−1 is a root of S. Let a⩾0 and b⩾1 be such that r−a,r−a+1,…,r,r+1,…,r+b−1,r+b are roots of S, while r−a−1 and r+b+1 are not. The two statements above imply that r−a is a root of B and r+b is a root of A. Since r−a is a root of B(x) and of A(x+a+b), it is also a root of their greatest common divisor C(x) as integer polynomials. If C(x) was a non-trivial divisor of B(x), then B would have a rational root α. Since the first and last coefficients of B are 1,α can only be 1 or -1 ; but B(−1)=m>0 and B(1)=m+2>0 since n=2m. Therefore B(x)=A(x+a+b). Writing c=a+b⩾1 we compute 0=A(x+c)−B(x)=(3c−2m)x2+c(3c−2m)x+c2(c−m). Then we must have 3c−2m=c−m=0, which gives m=0, a contradiction. We conclude that f(x)=tx is the only solution.