QlarIITy

MathematicsJEE Main 2022 · 24 JuneInteger

The sum of all the elements of the set{α∈{1,2,…,100}:HCF(α,24)=1}\{\alpha \in \{1, 2, \ldots, 100\} : HCF(\alpha, 24) = 1\}is

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. A sum over numbers coprime to a given number is found by inclusion and exclusion on its prime factors.

Concept refresher. The multiples of dd up to nn are d,2d,…,qdd, 2d, \ldots, qd, where qq is the whole part of nd\dfrac{n}{d}, and their sum is

S=d⋅q(q+1)2S = d \cdot \dfrac{q(q + 1)}{2}

Picture the situation. Since 24=23×324 = 2^3 \times 3, a number has HCF 1 with 24 exactly when it is divisible by neither 2 nor 3. So the required sum is the sum of 1 to 100 with the multiples of 2 and of 3 taken out. The multiples of 6 belong to both groups.

Approach. Subtract the sums of the multiples of 2 and of 3 from the total, and add back the multiples of 6.

  1. Step 1: The sums

    The numbers 1 to 100 add to 5050. The multiples of 2 add to 2×1275=25502 \times 1275 = 2550, the multiples of 3 to 3×561=16833 \times 561 = 1683 and the multiples of 6 to 6×136=8166 \times 136 = 816.

  2. Step 2: The required sum

    The multiples of 6 are removed twice, so they are added back once: 5050−2550−1683+816=16335050 - 2550 - 1683 + 816 = 1633.

Answer. 1633

Sanity check. These numbers are 1, 7, ..., 97, which are 17 terms adding to 833, and 5, 11, ..., 95, which are 16 terms adding to 800.

Common wrong answers

  • 817: Forgetting to add back the multiples of 6 gives 817.

Key takeaway

The trap. Multiples of the product of two primes are removed twice and must be restored once.

How toppers think. They check with the two arithmetic progressions of numbers one and five more than multiples of six.

Remember. 833+800=1633833 + 800 = 1633

More on Set Operations & Venn Diagrams