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
  • 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. /Every odd prime leaves remainder 1 or 3 on division by 4…
AdvancedMathematicsHigh School (11–12)Number TheoryConceptualNumericalOlympiad

Every odd prime leaves remainder 1 or 3 on division by 4…

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.

Every odd prime leaves remainder 111 or 333 on division by 444. Euclid's argument can be changed to prove that there are infinitely many primes of the form 4k+34k + 34k+3.

  1. Show that a product of numbers of the form 4k+14k + 14k+1 is again of the form 4k+14k + 14k+1.
  1. Suppose p1,p2,…,prp_1, p_2, \dots, p_rp1​,p2​,…,pr​ are all the primes of the form 4k+34k + 34k+3 other than 333. Prove that N=4p1p2⋯pr−1N = 4p_1 p_2 \cdots p_r - 1N=4p1​p2​⋯pr​−1 has a prime factor of the form 4k+34k + 34k+3 that is not on the list. Explain why the factor is not 333 either.
  1. Test the method on the list 3,7,113, 7, 113,7,11: factorise N=4×3×7×11−1N = 4 \times 3 \times 7 \times 11 - 1N=4×3×7×11−1 and find its prime factor of the form 4k+34k + 34k+3.

Check your answer

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

Need a reminder? The key ideaShowHide

Every n>1n > 1n>1 is a product of primes in one way only. A composite nnn has a prime factor at most n\sqrt{n}n​. If a prime divides ababab, it divides aaa or bbb. A perfect kkkth power has every exponent a multiple of kkk.

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. Part (a). (4a+1)(4b+1)=16ab+4a+4b+1=4(4ab+a+b)+1(4a + 1)(4b + 1) = 16ab + 4a + 4b + 1 = 4(4ab + a + b) + 1(4a+1)(4b+1)=16ab+4a+4b+1=4(4ab+a+b)+1. Repeat this for any number of factors.

Step 2. NNN leaves remainder 3. N=4p1⋯pr−1=4(p1⋯pr−1)+3N = 4p_1 \cdots p_r - 1 = 4(p_1 \cdots p_r - 1) + 3N=4p1​⋯pr​−1=4(p1​⋯pr​−1)+3. It is odd, so all its prime factors are odd.

Step 3. A factor of the form 4k+34k + 34k+3. If every prime factor of NNN had the form 4k+14k + 14k+1, then by part (a) so would NNN. It does not. So some prime q∣Nq \mid Nq∣N has the form 4k+34k + 34k+3.

Step 4. The factor is new. If q=piq = p_iq=pi​, then qqq divides 4p1⋯pr−N=14p_1 \cdots p_r - N = 14p1​⋯pr​−N=1, which is impossible. If q=3q = 3q=3, then 333 divides 4p1⋯pr4p_1 \cdots p_r4p1​⋯pr​, so 333 divides some pip_ipi​, which is impossible too. So the list was not complete, and there are infinitely many primes of the form 4k+34k + 34k+3.

Step 5. Part (c). In the proof the list leaves out 333. With the list 3,7,113, 7, 113,7,11 the number is still worth a test: N=4×231−1=923=13×71N = 4 \times 231 - 1 = 923 = 13 \times 71N=4×231−1=923=13×71. Here 13=4×3+113 = 4 \times 3 + 113=4×3+1 and 71=4×17+371 = 4 \times 17 + 371=4×17+3.

Answer: the prime factor of the form 4k+34k + 34k+3 is 717171, which is not on the list. Proof complete.

Watch out. The same trick fails for primes of the form 4k+14k + 14k+1: a product of numbers of the form 4k+34k + 34k+3 can be of the form 4k+14k + 14k+1, since 3×3=93 \times 3 = 93×3=9.

Log in to save this for later
← All Problems
← A machine can print only the digits 0 and 1…A student computes n⁴ + 4 for small n: 5, 20, 85, 260… →
More onNumber Theory

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. The triangular numbers are 1, 3, 6, 10, …, where the nth one is (n(n + 1))/2…Advanced
  2. Prove that the equation x³ + y³ + z³ = n has no solution in integers when n leaves remainder 4 or 5…Advanced
  3. Find every triple of positive integers a ≤ b ≤ c with 1/a + 1/b + 1/c = 1, and prove that there are…Advanced
  4. Find all pairs of positive integers (x, y) with x² - y² = 945…Hard
  5. A teacher wants a list of every primitive Pythagorean triple whose hypotenuse is less than 100…Advanced
All problems on this topic →