HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /The formula f(n) = n² + n + 41 gives a prime for n = 0, 1, 2, … for a long time…
AdvancedMathematicsHigh School (11–12)Mathematical ReasoningNumericalBoard Exam
+2 more exams
A-LevelIB
A-LevelIB

The formula f(n) = n² + n + 41 gives a prime for n = 0, 1, 2, … for a long time…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

The formula f(n)=n2+n+41f(n) = n^2 + n + 41f(n)=n2+n+41 gives a prime for n=0,1,2,…n = 0, 1, 2, \dotsn=0,1,2,… for a long time. A student checks the first ten values and claims that f(n)f(n)f(n) is prime for every whole number nnn. Explain why ten checks do not prove the claim. Then find, without a computer, a value of nnn for which f(n)f(n)f(n) is clearly not prime. Hint: make every term share a factor. The smallest counterexample is the one you find first this way. Give it, and the value of fff there.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

Direct proof: assume ppp, reach qqq. Contrapositive: assume ∼q\sim q∼q, reach ∼p\sim p∼p. Exhaustion: check every one of finitely many cases. One counterexample disproves a for-all claim.

The worked solution

Check an answer or open a hint to unlock the worked solution.

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. Why examples are not enough. The claim is about every whole number. Ten cases leave infinitely many unchecked. One failure would make it false.

Step 2. A clear counterexample. At n=41n = 41n=41: f(41)=412+41+41=41×43f(41) = 41^2 + 41 + 41 = 41 \times 43f(41)=412+41+41=41×43, not prime.

Step 3. A smaller one. At n=40n = 40n=40: f(40)=40×41+41=41×41=1681f(40) = 40 \times 41 + 41 = 41 \times 41 = 1681f(40)=40×41+41=41×41=1681. Not prime.

Step 4. Is it the smallest? Checking n=0n = 0n=0 to 393939 (the lesson's program does this) shows every value is prime. So n=40n = 40n=40 is the smallest counterexample.

Check. 412=168141^2 = 1681412=1681, and 402+40+41=1600+81=168140^2 + 40 + 41 = 1600 + 81 = 1681402+40+41=1600+81=1681.

Answer: n=40n = 40n=40, with f(40)=1681=412f(40) = 1681 = 41^2f(40)=1681=412.

Log in to save this for later
← All Problems
← For integers a and b, prove that if a + b ≥ 15, then a ≥ 8 or b ≥ 8…Prove by exhaustion that no perfect square ends in the digit 2, 3, 7 or 8… →
More onMathematical Reasoning

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Direct proof, contrapositive and counterexampleValid Arguments and Methods of Proof

More on this topic

  1. Prove by cases that for every integer n, n² leaves remainder 0 or 1 when divided by 3…Advanced
  2. Prove by contradiction that there are no integers a and b with 6a + 9b = 100…Advanced
  3. Prove by contradiction that √3 is irrational…Hard
Prove by exhaustion that no perfect square ends in the digit 2, 3, 7 or 8…Advanced
  • For integers a and b, prove that if a + b ≥ 15, then a ≥ 8 or b ≥ 8…Hard
  • All problems on this topic →