A number is formed by writing all the natural numbers upto n as follow...
If the number is divisible by 3, then the sum of its digits should be divisible by 3.
n should be such that (1 + 2 + 3 + ... + n) is divisible by 3.
∴ n(n + 1) / 2 is divisible by 3.
Either n or n + 1 should be divisible by 3.
If n is divisible by 3, then n should give a remainder of 0 or if n + 1 is divisible by 3, then n should give a remainder of 2 when divided by 3.
Hence, option 4.
View all questions of this test
A number is formed by writing all the natural numbers upto n as follow...
To solve this problem, let's analyze the pattern formed when we write all the natural numbers up to n as a single number.
Pattern Analysis:
When we write the natural numbers up to n, we can observe that the first digit will be 1 for numbers up to 9, and 2 for numbers from 10 to 99. Similarly, the first digit will be 3 for numbers from 100 to 999, and so on.
Therefore, the number of digits formed by the natural numbers up to n can be calculated using the following formula:
Number of digits = number of 1-digit numbers (9) + number of 2-digit numbers (90 * 2) + number of 3-digit numbers (900 * 3) + ... + number of k-digit numbers (9 * 10^(k-1) * k)
This can be simplified as:
Number of digits = 9 + 2 * 90 + 3 * 900 + ... + k * 9 * 10^(k-1)
The sum of the coefficients in this pattern can be written as:
Sum of coefficients = 1 + 2 + 3 + ... + k
This sum can be calculated using the formula for the sum of an arithmetic series:
Sum of coefficients = (k * (k + 1)) / 2
Divisibility by 3:
To determine if the number formed is divisible by 3, we need to check if the sum of its digits is divisible by 3. Let's consider the sum of the digits in each place value.
For the units place, the sum of digits will be 1 + 2 + 3 + ... + 9 = 45, which is divisible by 3.
For the tens place, the sum of digits will be 1 + 2 + 3 + ... + 9 + 1 + 0 + 1 + 1 + ... + 1 + 9 = 45 + 10 + 10 + ... + 10 + 45 = 45 * 11 = 495, which is divisible by 3.
Similarly, for each subsequent place value, the sum of digits will be a multiple of 3.
Therefore, regardless of the value of n, the number formed will always be divisible by 3.
Remainder when n is divided by 3:
Since the number formed is always divisible by 3, the remainder when n is divided by 3 will also be divisible by 3. Hence, the remainder can either be 0 or 2, depending on the value of n.
Therefore, the correct answer is option D) Either 0 or 2.
A number is formed by writing all the natural numbers upto n as follow...
D
To make sure you are not studying endlessly, EduRev has designed CAT study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in CAT.