TITLE: Determining Whether the Number $11111$ is Prime. Used Divisibility Tests.
QUESTION [9 upvotes]: I am asked to determine whether the number $11111$ is prime. Upon using the divisibility tests for the numbers 1 to 11, I couldn't find anything that divides it, so I assumed that it is prime. However, it apparently isn't prime. So what is the procedure to determine whether $11111$ is prime?
Thank you for any help.

REPLY [3 votes]: If an integer is all $1$s, then it's of the form $$\frac{10^n - 1}{9},$$ which we notate $R_n$ either for convenience or to be dull, take your pick. For your number, then, we have $n = 5$. Since $5$ is prime, $11111$ could be prime.
Notice that $R_n$ is divisible by $11$ if $n$ is even. Also notice that $R_n$ is divisible by $3$ if $n$ is a multiple of $3$. And $R_n$ is divisible by $41$ is $n$ is a multiple of $5$.
How am I coming up with those? I just know, I'm a demon, and if I don't know, I ask a wood nymph. But if I was just a mere mortal like you, I would look in Sloane's OEIS and notice the remark "These indices $p$ must also be prime." Meaning that if $R_n$ is prime, then so is $n$.
Wait, there's another way a mere mortal like you could have figured this one out: simple trial division. Since $\sqrt{11111} \approx 105.4$, you only need to try dividing $11111$ by each prime from $3$ to $103$.
If you had just kept going in ascending order, you would have hit upon $41$.
Betsy DeVos is doing a great job. Mwahahahahahahahahahaha!