This number is a prime.
The 987th prime is the smallest prime such that it and the next 5 primes are all equal to 5 (mod 6): 7793, 7817, 7823, 7829, 7841. [Post]