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. /A farmer counts the eggs in a basket. Taken two, three, four, five or six at a time, one egg is…
HardMathematicsHigh School (11–12)Number TheoryNumericalOlympiad

A farmer counts the eggs in a basket. Taken two, three, four, five or six at a time, one egg is…

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.

A farmer counts the eggs in a basket. Taken two, three, four, five or six at a time, one egg is always left over. Taken seven at a time, none is left. The basket holds fewer than 100010001000 eggs. Find the least possible number of eggs and the only other possible number. Explain why the first five conditions collapse into one congruence.

Check your answer

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

Need a reminder? The key ideaShowHide

With pairwise coprime moduli, a system x≡ai(modmi)x \equiv a_i \pmod{m_i}x≡ai​(modmi​) has one solution modulo M=m1m2⋯mkM = m_1 m_2 \cdots m_kM=m1​m2​⋯mk​. Lift one congruence at a time:

x=a1+m1t,then reduce modulo m2.\displaystyle x = a_1 + m_1 t, \quad \text{then reduce modulo } m_2.x=a1​+m1​t,then reduce modulo m2​.

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.

Given. N≡1N \equiv 1N≡1 modulo 2,3,4,5,62, 3, 4, 5, 62,3,4,5,6, and N≡0(mod7)N \equiv 0 \pmod 7N≡0(mod7).

Plan. Turn the first five into one congruence, then lift.

Step 1. One congruence. N−1N - 1N−1 is a multiple of each of 2,3,4,5,62, 3, 4, 5, 62,3,4,5,6, so of their lcm, 606060. So N=60k+1N = 60k + 1N=60k+1.

Step 2. Modulo 7. 60≡4(mod7)60 \equiv 4 \pmod 760≡4(mod7), so 4k+1≡04k + 1 \equiv 04k+1≡0, that is 4k≡6≡−14k \equiv 6 \equiv -14k≡6≡−1. The inverse of 444 modulo 777 is 222, so k≡−2≡5(mod7)k \equiv -2 \equiv 5 \pmod 7k≡−2≡5(mod7).

Step 3. The numbers. k=5k = 5k=5 gives N=301N = 301N=301. The next is k=12k = 12k=12, which gives N=721N = 721N=721.

Step 4. The bound. The next value, k=19k = 19k=19, gives 114111411141, which is too many. So exactly two numbers fit.

Check. 301=43×7301 = 43 \times 7301=43×7, and 301−1=5×60301 - 1 = 5 \times 60301−1=5×60.

Answer: the least number is 301301301, and the only other possible number is 721721721.

Watch out. The answers repeat every 7×607 \times 607×60 eggs, the lcm of all six moduli. Read the bound in the question before you list answers.

Log in to save this for later
← All Problems
← Prove the cancellation rule: if ac ≡ bc pmod m and d = gcd(c, m), then a ≡ b pmodm/d…The square of 376 is 141 376, which ends in 376 again… →
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 →