Skip to main content
2 of 3
added 8 characters in body
Tony Huynh
  • 32.1k
  • 11
  • 112
  • 187

If the coefficients are non-negative then you can always do it with at most two integer evaluations.

That is, $P$ and $Q$ are equal if and only if

  1. $P(1)=Q(1)$, and
  2. $P(P(1)+1)=Q(Q(1)+1)$.
Tony Huynh
  • 32.1k
  • 11
  • 112
  • 187