JEE MainMathematicsPermutation and Combination
The number of 5-digit palindromes that can be formed using the digits 1, 2, 3, 4, 5 , if the repetition of digits is allowed and the number is divisible by 3, is _ _ _ _
Correct answer
41
Step-by-step solution
Let the 5-digit palindrome be abcba . The sum of its digits is a + b + c + b + a = 2a + 2b + c . For the number to be divisible by 3, we must have 2a + 2b + c 0 3 , which simplifies to c a + b 3 (since 2 -1 3 ). The available digits modulo 3 are: 0 3 : 3 (1 digit) 1 3 : 1, 4 (2 digits) 2 3 : 2, 5 (2 digits) We first find the number of ways to choose a and b such that a+b k 3 , and then multiply by the number of choices for c . Case 1: a+b 0 3 This occurs when (a,b) 3 is (0,0), (1,2), (2,1) . Number of ways = (1 1)