Difference between revisions of "2023 SSMO Accuracy Round Problems/Problem 2"
(Created page with "==Problem== Suppose that the average of all <math>n</math>-digit palindromes is denoted by <math>P_{n}</math> and the average of all <math>n</math>-digit numbers is denoted by...") |
|||
Line 3: | Line 3: | ||
==Solution== | ==Solution== | ||
+ | The outermost digits of an <math>n</math>-digit palindrome can range from <math>1</math> to <math>9</math>, each with equal probability (notice that they must be equal due to being a palindrome, so the ones digit cannot be <math>0</math>), so the average is <math>5</math>. The inner digits can range from <math>0</math> to <math>9</math>, again with equal probability, so their average is <math>4.5</math>. Thus <math>P_n=5(10^{n-1}+1)+4.5(10+10^2+\ldots+10^{n-2})</math>. | ||
+ | |||
+ | However, the <math>n</math>-digit numbers range in the exact same way except that the ones digit can range from <math>0</math> to <math>9</math>. Thus <math>N_n=5(10^{n-1})+4.5(1+10+10^2+\ldots+10^{n-2})</math>. | ||
+ | |||
+ | Then, | ||
+ | \begin{align*} | ||
+ | P_n-N_n&=5(10^{n-1}+1)+4.5(10+10^2+\ldots+10^{n-2})-5(10^{n-1})-4.5(1+10+10^2+\ldots+10^{n-2})\\ | ||
+ | &=5(1)-4.5(1)\\ | ||
+ | &=0.5 | ||
+ | \end{align*} | ||
+ | |||
+ | However, we must consider one special case: <math>n=1</math>. Here, <math>0</math> is an <math>n</math>-digit number, so the difference between <math>P_1</math> and <math>N_1</math> is <math>0</math> (they are the same set). For all <math>n>1</math> the difference is <math>0.5</math>; therefore, | ||
+ | <cmath>\left\lfloor\sum_{n=1}^{100}(P_{n}-N_{n})\right\rfloor=\lfloor0+99\cdot0.5\rfloor=\lfloor49.5\rfloor=\boxed{49}</cmath> | ||
+ | |||
+ | ~ [https://artofproblemsolving.com/wiki/index.php/User:Eevee9406 eevee9406] |
Latest revision as of 22:54, 19 March 2025
Problem
Suppose that the average of all -digit palindromes is denoted by
and the average of all
-digit numbers is denoted by
Find
Solution
The outermost digits of an -digit palindrome can range from
to
, each with equal probability (notice that they must be equal due to being a palindrome, so the ones digit cannot be
), so the average is
. The inner digits can range from
to
, again with equal probability, so their average is
. Thus
.
However, the -digit numbers range in the exact same way except that the ones digit can range from
to
. Thus
.
Then, \begin{align*} P_n-N_n&=5(10^{n-1}+1)+4.5(10+10^2+\ldots+10^{n-2})-5(10^{n-1})-4.5(1+10+10^2+\ldots+10^{n-2})\\ &=5(1)-4.5(1)\\ &=0.5 \end{align*}
However, we must consider one special case: . Here,
is an
-digit number, so the difference between
and
is
(they are the same set). For all
the difference is
; therefore,