0
$\begingroup$

find sum of all $3$ digit numbers such that all digits are perfect square no digit being zero ?


i did this $\{1,4,9\}$

at units place $1 \to 2$ times $4 \to 2$ times $9 \to 2$ times hence sum of digits at one's place$= 2\cdot 1+2\cdot 4+2\cdot9=28$

at tens place $1 \to 2$ times $4 \to 2$ times $9 \to 2$ times hence sum of digits at ten's place$= 2\cdot 1+2\cdot 4+2\cdot 9=28$

at hundreds place $1 \to 2$ times $4 \to 2$ times $9 \to 2$ times hence sum of digits at hundred's place$= 2\cdot 1+2\cdot 4+2\cdot 9=28$

therefore total sum is \begin{align}28100+28\cdot 10+28\cdot 1 &=28\cdot 111 \\&=3108 \end{align}

BUT THE ANSWER IS $13986$... please explain

$\endgroup$
  • 2
    $\begingroup$ 0 is a perfect square. $\endgroup$ – fleablood Apr 13 '18 at 5:06
  • $\begingroup$ @fleablood +1, yet I believe that still doesn't sum to what OP says it should. $\endgroup$ – Thomas Bladt Apr 13 '18 at 5:11
  • $\begingroup$ @fleablood the answer $13986$ suggests one only count those with digits $1, 4, 9$. When $0$ is allowed, the answer becomes $24248$ $\endgroup$ – achille hui Apr 13 '18 at 5:12
  • $\begingroup$ @fleablood sorry i forgot to mention that no digit must be zero $\endgroup$ – Vani Sharma Apr 13 '18 at 5:12
  • $\begingroup$ Hint: If only $1,4,9$ are allowed to form numbers, there are totally 27 numbers to sum. nine of them has the form 1xx, nine has the form 4xx, similar things happen to other digits and at different positions. $\endgroup$ – achille hui Apr 13 '18 at 5:13
2
$\begingroup$

\begin{align} \sum_{i \in \{1,4,9\}} \sum_{j\in \{1,4,9\}} \sum_{k \in \{1,4,9\}} (100i + 10j +k) &= \sum_{i \in \{1,4,9\}} \sum_{j\in \{1,4,9\}}(300i + 30j+14)\\ &=\sum_{i \in \{ 1,4,9\}} (900 i+30(14)+14(3))\\ &=900(14)+99(14) \\ &=999(14)\\ &=14000-14\\ &= 13986\end{align}

$\endgroup$
2
$\begingroup$

You are only counting numbers that are a permutation of $1,4,9$. You have not counted numbers like $444$ or $441$ which have a matching pair of digits. You should have $1$ in the units place counted $3^2=9$ times because each other place has $3$ choices, so the answer is $(1+4+9)999=14(1000-1)=13986$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.