summation of all $n$ digit number containing with digits?

107 Views Asked by At

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

2

There are 2 best solutions below

0
On BEST ANSWER

\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}

0
On

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$