Waste less time on Facebook — follow Brilliant.
×

Loops

When you need to do a repetitive task, like working through all elements in a list to find a prime or searching a map until you've found all of the gold, loops are a go-to tool.

Prime Testing

     

True or False

\(98402937\) is a prime number?

Statement

If an odd integer \(n>1\) satisfies \({ 2 }^{ n-1 }\equiv 1(mod\quad n)\), then \(n\) must be a prime?

What is the smallest number that doesn't satisfy the above statement?

What is the \(24\)th value of \(n\) such that \(2^{n}-3\) is a prime number?

×

Problem Loading...

Note Loading...

Set Loading...