Question:

A six-digit code is to be formed using 6 distinct numbers. The number in the first place is the square of a prime number in the third place. The numbers in the \(4^{\text{th}}\), \(6^{\text{th}}\), \(2^{\text{nd}}\) and \(1^{\text{st}}\) place are consecutive numbers. If all odd digits except 1 are present in the code, what is the sum of all the digits?

Show Hint

Find which single-digit values can be a prime's square, then use the consecutive-number clue to fix four of the six digits.
Updated On: Jul 21, 2026
  • 17
  • 21
  • 34
  • 38
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Find the digit at the first place.
The first place holds the square of a prime digit that sits at the third place.
A single digit can only be the square of the primes 2 or 3, since \(5^2=25\) and \(7^2=49\) need two digits.
So the third place is 2 or 3, and the first place is 4 or 9.

Step 2: Use the consecutive-number clue.
The digits at the 4th, 6th, 2nd and 1st places, read in that order, form four consecutive numbers.
Call the smallest of these \(n\), so 4th place \(=n\), 6th place \(=n+1\), 2nd place \(=n+2\), 1st place \(=n+3\).

Step 3: Test first place \(=4\).
If the first place is 4, then \(n+3=4\), so \(n=1\), giving 4th place 1, 6th place 2, 2nd place 3.
But the third place must also be 2 here, which repeats the digit 2 at the 6th place.
Since all six digits must be distinct, this case is rejected.

Step 4: Test first place \(=9\).
If the first place is 9, then \(n+3=9\), so \(n=6\), giving 4th place 6, 6th place 7, 2nd place 8.
The third place is 3, since \(3^2=9\). The digits so far are 9, 8, 3, 6, 7, all distinct, so this case works.

Step 5: Fix the fifth place using the odd-digit clue.
All odd digits except 1, that is 3, 5, 7 and 9, must appear somewhere in the code.
The digits 3, 7 and 9 are already placed, so the missing odd digit 5 must go in the only open slot, the fifth place.

Final Answer:
The code reads 9, 8, 3, 6, 5, 7 and the digits sum to \(9+8+3+6+5+7=38\). \[ \boxed{38} \]
Was this answer helpful?
0
0