This is an exploration involving prime numbers and divisibility tests. I have used it as part of my Infinity course (a high school post-Algebra 2 elective), but it is accessible to students at any level in middle school or high school.
I scripted a version of this worksheet for a TED-Ed animated riddle. I recommend only showing this to your students after doing the activities I shared above, because the video jumps quickly to the final question, thus not allowing for a full exploration of the ideas. On the other hand, after they have done and discussed the worksheet, students probably would enjoy the animation, and appreciate the explanations that follow the pause. (Note that there is an ad at the end, starting at 5:38.)