JEE MainMathematicsPermutation and Combination
Consider the formation of palindromic numbers of lengths 5 , 6 , and 7 using the digits from the set 1, 2, 3, 4, 5, 6 . Repetition of digits is allowed. The total number of such palindromic numbers that contain at least one even digit and at least one odd digit is
Correct answer
1458
Step-by-step solution
The available digits are 1, 2, 3, 4, 5, 6 , which consist of 3 even digits and 3 odd digits. For a number to be a palindrome, its first half uniquely determines its second half. We need to find the number of independent digit choices for each length. For length 5 (format abcba ), there are 3 independent choices. The total number of palindromes is 6^3 = 216 . The number of palindromes formed entirely of even digits is 3^3 = 27 , and entirely of odd digits is 3^3 = 27 . Valid palindromes of length 5 = 216 - 27 - 27 =