Is 4,987 Prime?

Yes

4987  = 49871