JEE Main 2021 · 22 July · evening · Numerical answer · +4 / −0

The sum of all the elements in the set n∈ 1, 2, ....., 100 | H.C.F. of n and 2040 is 1 is equal to _____________.

Answer and solution

Answer 1251

Solution

Maths sir · 3 steps

Factor 2040 first. Then add the multiples of its primes with inclusion-exclusion and subtract from 5050.

  1. Factor 2040. 2040 = 2³ × 3 × 5 × 17. So gcd(n, 2040) = 1 exactly when n is not divisible by 2, 3, 5 or 17.
  2. Sum of multiples. The multiples of d up to 100 are d, 2d, …, md with m = ⌊ 100/d ⌋. This is an AP, so its sum is S(d) = d × m(m+1)/2. For example, S(17) = 17 × 15 = 255.
    Divisors usedTermsTotalSign
    All of 1 to 100(100 × 101)/25050+
    2, 3, 5, 172550 + 1683 + 1050 + 2555538-
    6, 10, 15, 34, 51, 85816 + 550 + 315 + 102 + 51 + 851919+
    30 (102, 170, 255, 510 exceed 100)30 × 6180-

    5050 - 5538 + 1919 - 180 = 1251

  3. So. The sum of all n from 1 to 100 that are coprime to 2040 is 1251.

The common slip: 1268. Forgetting the prime 17 in 2040 gives 1268. That total still wrongly includes n = 17.

The idea to keep. To find numbers coprime to N, list only the distinct primes of N. Then use inclusion-exclusion on the sums of their multiples. Each sum of multiples is an AP.

Answer from the NTA final answer key. Solution by PrepWiser.

Study Sequences & Series

Asked about 250 times in JEE Main since 2020. This question is from 2021.