I ask a few beginner level questions here frequently, not only because I am a beginner in Mathematica but sometimes these concepts are just as important as the large concepts.
I am trying to find the smallest prime number greater than 5000. here is my code:
PrimeQ[Range[5000, 5050]]
I could test each term if I wanted, like this PrimeQ[5000], PrimeQ[5001].. ok that's tedious
I could also produce a list of True, False(like I have in my code above) which correspond to the numbers in my range but I would still need to count to find what smallest number that is.. Is it possible to list both the number along with true or false? Does this make sense? my code only produces a list of true and falses.