When a number is divided by 8, a remainder of 7 can be thought of as a remainder of -1. This idea is very useful in a bunch of questions. So,
N = 5a - 1 or N + 1 = 5a
N = 6b - 1 or N + 1 = 6b
N = 7c - 1 or N + 1 = 7c
N = 8d - 1 or N + 1 = 8d
N = 9e - 1 or N + 1 = 9e
N + 1 can be expressed as a multiple of (5, 6, 7, 8, 9)
N + 1 = 5a×6b×7c×8d×9e
or N = (5a×6b×7c×8d×9e) - 1
Smallest value of N will be when we find the smallest common multiple of (5, 6, 7, 8, 9)
or LCM of (5, 6, 7, 8, 9)
N = LCM (5, 6, 7, 8, 9) - 1
= 2520 - 1
= 2519.
Hence, the correct option is (C).