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. /A set of whole numbers is chosen from 1 to 100…
AdvancedMathematicsHigh School (11–12)Pigeonhole Principle, Recursion and Graph TheoryNumericalreasoningOlympiad

A set of whole numbers is chosen from 1 to 100…

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 set of whole numbers is chosen from 111 to 100100100. The rule is that no number in the set may be exactly twice another number in the set. For example, 333 and 666 cannot both be chosen.

What is the largest possible size of such a set? Split 111 to 100100100 into chains that start at an odd number and keep doubling, such as 3, 6, 12, 24, 48, 96. Find the most numbers you can take from each chain, and add them up. Also count how many chains there are.

Check your answer

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

Need a reminder? The key ideaShowHide

Remainders on division by mmm are mmm boxes. The prefix sums S0=0,S1,…,SmS_0 = 0, S_1, \dots, S_mS0​=0,S1​,…,Sm​ give a block with a sum divisible by mmm. Cut a figure into pieces: two points in one piece are close.

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.

Plan. Each chain is a path where neighbours are a number and its double. Take the most from each chain.

Step 1. The chains. Each number 2tq2^t q2tq with qqq odd lies in the chain that starts at qqq. There are 505050 odd numbers up to 100100100, so 505050 chains.

Step 2. The most from one chain. In a chain q,2q,4q,…q, 2q, 4q, \dotsq,2q,4q,… the forbidden pairs are neighbours. From a chain of length LLL we can take the 1st, 3rd, 5th, and so on, which is ⌈L/2⌉\lceil L/2 \rceil⌈L/2⌉ numbers. More than that would put two neighbours together, by the pigeonhole principle on the pairs (1st, 2nd), (3rd, 4th), and so on.

Step 3. Chain lengths. Odd qqq from 515151 to 999999 give chains of length 111 (252525 chains). From 272727 to 494949, length 222 (121212 chains). From 131313 to 252525, length 333 (777 chains). Then 7,9,117, 9, 117,9,11 have length 444; 555 has length 555; 333 has length 666; 111 has length 777.

Step 4. Add up. 25×1+12×1+7×2+3×2+3+3+4=25+12+14+6+3+3+4=6725 \times 1 + 12 \times 1 + 7 \times 2 + 3 \times 2 + 3 + 3 + 4 = 25 + 12 + 14 + 6 + 3 + 3 + 4 = 6725×1+12×1+7×2+3×2+3+3+4=25+12+14+6+3+3+4=67.

Check. A second way: take every number whose power of 222 is even, that is 20q2^0 q20q, 22q2^2 q22q, 24q2^4 q24q or 26q2^6 q26q. That gives 50+13+3+1=6750 + 13 + 3 + 1 = 6750+13+3+1=67 numbers, and no one of them is twice another.

Answer: 505050 chains, and the largest such set has 676767 numbers.

Log in to save this for later
← All Problems
← A metal plate is an equilateral triangle with sides of 4 cm…Ravi notices that 3⁴ = 81 ends in 1 and 3²⁰ = 3486784401 ends in 01… →
More onPigeonhole Principle, Recursion and Graph Theory

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Pigeonholes in numbers and geometryThe Pigeonhole Principle

More on this topic

  1. The 15 edges of K₆ are coloured red or blue…Advanced
  2. Three houses each need a path to each of three wells, nine paths in all, drawn on flat ground…Advanced
  3. A connected planar graph with 10 vertices is drawn without crossings, and every face of the…Hard
  4. The complete bipartite graph K_(m,n) joins each of m left vertices to each of n right vertices…
Advanced
  • A river town has five land areas, A, B, C, D and E, joined by ten bridges…Hard
  • All problems on this topic →