Menu Close

a-challening-question-find-the-number-of-numbers-which-are-divisible-by-9-and-consist-of-distinct-digits-




Question Number 179420 by mr W last updated on 29/Oct/22
a challening question:  find the number of numbers which  are divisible by 9 and consist of  distinct digits.
$$\underline{{a}\:{challening}\:{question}:} \\ $$$${find}\:{the}\:{number}\:{of}\:{numbers}\:{which} \\ $$$${are}\:{divisible}\:{by}\:\mathrm{9}\:{and}\:{consist}\:{of} \\ $$$${distinct}\:{digits}. \\ $$
Commented by Frix last updated on 01/Nov/22
I get 59 “unique numbers” which consist  of ascending digits without 0  9  18 27 36 45  126 135 189 234 279 369 378 459 468 567  1269 1278 1359 1368 1458 1467 2349 2358     2367 2457 3456 3789 4689 5679  12348 12357 12456 12789 13689 14589     14679 15678 23589 23679 24579 24678     34569 34578  123489 123579 123678 124569 124578     134568 156789 234567 246789 345789  1236789 1245789 1345689 2345679  12345678  123456789    1 digit 1  2 digits 4  3 digits 10  4 digits 14  5 digits 14  6 digits 10  7 digits 4  8 digits 1  9 digits 1    with all permutations and 0 I get  4215386 numbers
$$\mathrm{I}\:\mathrm{get}\:\mathrm{59}\:“\mathrm{unique}\:\mathrm{numbers}''\:\mathrm{which}\:\mathrm{consist} \\ $$$$\mathrm{of}\:\mathrm{ascending}\:\mathrm{digits}\:\mathrm{without}\:\mathrm{0} \\ $$$$\mathrm{9} \\ $$$$\mathrm{18}\:\mathrm{27}\:\mathrm{36}\:\mathrm{45} \\ $$$$\mathrm{126}\:\mathrm{135}\:\mathrm{189}\:\mathrm{234}\:\mathrm{279}\:\mathrm{369}\:\mathrm{378}\:\mathrm{459}\:\mathrm{468}\:\mathrm{567} \\ $$$$\mathrm{1269}\:\mathrm{1278}\:\mathrm{1359}\:\mathrm{1368}\:\mathrm{1458}\:\mathrm{1467}\:\mathrm{2349}\:\mathrm{2358} \\ $$$$\:\:\:\mathrm{2367}\:\mathrm{2457}\:\mathrm{3456}\:\mathrm{3789}\:\mathrm{4689}\:\mathrm{5679} \\ $$$$\mathrm{12348}\:\mathrm{12357}\:\mathrm{12456}\:\mathrm{12789}\:\mathrm{13689}\:\mathrm{14589} \\ $$$$\:\:\:\mathrm{14679}\:\mathrm{15678}\:\mathrm{23589}\:\mathrm{23679}\:\mathrm{24579}\:\mathrm{24678} \\ $$$$\:\:\:\mathrm{34569}\:\mathrm{34578} \\ $$$$\mathrm{123489}\:\mathrm{123579}\:\mathrm{123678}\:\mathrm{124569}\:\mathrm{124578} \\ $$$$\:\:\:\mathrm{134568}\:\mathrm{156789}\:\mathrm{234567}\:\mathrm{246789}\:\mathrm{345789} \\ $$$$\mathrm{1236789}\:\mathrm{1245789}\:\mathrm{1345689}\:\mathrm{2345679} \\ $$$$\mathrm{12345678} \\ $$$$\mathrm{123456789} \\ $$$$ \\ $$$$\mathrm{1}\:\mathrm{digit}\:\mathrm{1} \\ $$$$\mathrm{2}\:\mathrm{digits}\:\mathrm{4} \\ $$$$\mathrm{3}\:\mathrm{digits}\:\mathrm{10} \\ $$$$\mathrm{4}\:\mathrm{digits}\:\mathrm{14} \\ $$$$\mathrm{5}\:\mathrm{digits}\:\mathrm{14} \\ $$$$\mathrm{6}\:\mathrm{digits}\:\mathrm{10} \\ $$$$\mathrm{7}\:\mathrm{digits}\:\mathrm{4} \\ $$$$\mathrm{8}\:\mathrm{digits}\:\mathrm{1} \\ $$$$\mathrm{9}\:\mathrm{digits}\:\mathrm{1} \\ $$$$ \\ $$$$\mathrm{with}\:\mathrm{all}\:\mathrm{permutations}\:\mathrm{and}\:\mathrm{0}\:\mathrm{I}\:\mathrm{get} \\ $$$$\mathrm{4215386}\:\mathrm{numbers} \\ $$
Commented by mr W last updated on 01/Nov/22
thanks sir!  how did you get all these numbers?  the numbers of 1 to 9 digit numbers  are correct, they correspond with my  table.
$${thanks}\:{sir}! \\ $$$${how}\:{did}\:{you}\:{get}\:{all}\:{these}\:{numbers}? \\ $$$${the}\:{numbers}\:{of}\:\mathrm{1}\:{to}\:\mathrm{9}\:{digit}\:{numbers} \\ $$$${are}\:{correct},\:{they}\:{correspond}\:{with}\:{my} \\ $$$${table}. \\ $$
Commented by Frix last updated on 01/Nov/22
I tried to find a system to get them:  start with  9  we can “split” it:  18 27 36 45  then we can add a 9:  189 279 369 459  now sometimes we can “shift” a 1:  i.e. 369 ⇒ 378  and so on  if we always stay with ascending digits it′s  a fast way
$$\mathrm{I}\:\mathrm{tried}\:\mathrm{to}\:\mathrm{find}\:\mathrm{a}\:\mathrm{system}\:\mathrm{to}\:\mathrm{get}\:\mathrm{them}: \\ $$$$\mathrm{start}\:\mathrm{with} \\ $$$$\mathrm{9} \\ $$$$\mathrm{we}\:\mathrm{can}\:“\mathrm{split}''\:\mathrm{it}: \\ $$$$\mathrm{18}\:\mathrm{27}\:\mathrm{36}\:\mathrm{45} \\ $$$$\mathrm{then}\:\mathrm{we}\:\mathrm{can}\:\mathrm{add}\:\mathrm{a}\:\mathrm{9}: \\ $$$$\mathrm{189}\:\mathrm{279}\:\mathrm{369}\:\mathrm{459} \\ $$$$\mathrm{now}\:\mathrm{sometimes}\:\mathrm{we}\:\mathrm{can}\:“\mathrm{shift}''\:\mathrm{a}\:\mathrm{1}: \\ $$$$\mathrm{i}.\mathrm{e}.\:\mathrm{369}\:\Rightarrow\:\mathrm{378} \\ $$$$\mathrm{and}\:\mathrm{so}\:\mathrm{on} \\ $$$$\mathrm{if}\:\mathrm{we}\:\mathrm{always}\:\mathrm{stay}\:\mathrm{with}\:\mathrm{ascending}\:\mathrm{digits}\:\mathrm{it}'\mathrm{s} \\ $$$$\mathrm{a}\:\mathrm{fast}\:\mathrm{way} \\ $$
Commented by mr W last updated on 01/Nov/22
thanks alot for explaining!
$${thanks}\:{alot}\:{for}\:{explaining}! \\ $$
Answered by Rasheed.Sindhi last updated on 29/Oct/22
  determinant (((A Try...)))  C-9: Sum of digits=9  All permutations of   partions of 9 consist of distinct digits  which are not starting with 0 from left.  a>b>c>d⇒3≤a≤9 ∧6≤ d≤0    0:1+8,2+7,3+6,4+5,...    1:    C-18: Sum of digits=18      C-27: Sum of digits=27      C-36: Sum of digits=36      C-45: Sum of digits=45    ...
$$\:\begin{array}{|c|}{\mathbb{A}\:\mathbb{T}\boldsymbol{\mathrm{ry}}…}\\\hline\end{array} \\ $$$$\mathbb{C}-\mathrm{9}:\:\mathrm{Sum}\:\mathrm{of}\:\mathrm{digits}=\mathrm{9} \\ $$$${All}\:{permutations}\:{of} \\ $$$$\:{partions}\:{of}\:\mathrm{9}\:{consist}\:{of}\:{distinct}\:{digits} \\ $$$${which}\:{are}\:{not}\:{starting}\:{with}\:\mathrm{0}\:{from}\:{left}. \\ $$$${a}>{b}>{c}>{d}\Rightarrow\mathrm{3}\leqslant{a}\leqslant\mathrm{9}\:\wedge\mathrm{6}\leqslant\:{d}\leqslant\mathrm{0} \\ $$$$ \\ $$$$\mathrm{0}:\mathrm{1}+\mathrm{8},\mathrm{2}+\mathrm{7},\mathrm{3}+\mathrm{6},\mathrm{4}+\mathrm{5},… \\ $$$$ \\ $$$$\mathrm{1}: \\ $$$$ \\ $$$$\mathbb{C}-\mathrm{18}:\:\mathrm{Sum}\:\mathrm{of}\:\mathrm{digits}=\mathrm{18} \\ $$$$ \\ $$$$ \\ $$$$\mathbb{C}-\mathrm{27}:\:\mathrm{Sum}\:\mathrm{of}\:\mathrm{digits}=\mathrm{27} \\ $$$$ \\ $$$$ \\ $$$$\mathbb{C}-\mathrm{36}:\:\mathrm{Sum}\:\mathrm{of}\:\mathrm{digits}=\mathrm{36} \\ $$$$ \\ $$$$ \\ $$$$\mathbb{C}-\mathrm{45}:\:\mathrm{Sum}\:\mathrm{of}\:\mathrm{digits}=\mathrm{45} \\ $$$$ \\ $$$$… \\ $$
Commented by mr W last updated on 30/Oct/22
it seems no one takes the challenge  except you. thanks for trying sir!  please continue sir!  i′ll alse give an attempt.
$${it}\:{seems}\:{no}\:{one}\:{takes}\:{the}\:{challenge} \\ $$$${except}\:{you}.\:{thanks}\:{for}\:{trying}\:{sir}! \\ $$$${please}\:{continue}\:{sir}! \\ $$$${i}'{ll}\:{alse}\:{give}\:{an}\:{attempt}. \\ $$
Commented by Rasheed.Sindhi last updated on 30/Oct/22
Sir actually at the moment I don′t  know formulas of number of partitions/  ∼ with some restrictions! Even I  am not sure of my approach to be  correct!  I think my approach is clear at least.  (i)Digit sum of such numbers is  between 9 & 45 inclusively and must  be divisible by 9 i-e it may be equal  to 9,18,27,36 or 45.So such numbers  must be partitions of these numbers  with two more restrictions: being  distinct and not beginning with 0  (from left).  Could you please say something  about this approach.( Of course there  may be better approaches) but is  this a wrong approach?
$$\boldsymbol{{Sir}}\:{actually}\:{at}\:{the}\:{moment}\:{I}\:{don}'{t} \\ $$$${know}\:{formulas}\:{of}\:{number}\:{of}\:{partitions}/ \\ $$$$\sim\:{with}\:{some}\:{restrictions}!\:{Even}\:{I} \\ $$$${am}\:{not}\:{sure}\:{of}\:{my}\:{approach}\:{to}\:{be} \\ $$$${correct}! \\ $$$${I}\:{think}\:{my}\:{approach}\:{is}\:{clear}\:{at}\:{least}. \\ $$$$\left({i}\right){Digit}\:{sum}\:{of}\:{such}\:{numbers}\:{is} \\ $$$${between}\:\mathrm{9}\:\&\:\mathrm{45}\:{inclusively}\:{and}\:{must} \\ $$$${be}\:{divisible}\:{by}\:\mathrm{9}\:{i}-{e}\:{it}\:{may}\:{be}\:{equal} \\ $$$${to}\:\mathrm{9},\mathrm{18},\mathrm{27},\mathrm{36}\:{or}\:\mathrm{45}.{So}\:{such}\:{numbers} \\ $$$${must}\:{be}\:{partitions}\:{of}\:{these}\:{numbers} \\ $$$${with}\:{two}\:{more}\:{restrictions}:\:{being} \\ $$$${distinct}\:{and}\:{not}\:{beginning}\:{with}\:\mathrm{0} \\ $$$$\left({from}\:{left}\right). \\ $$$${Could}\:{you}\:{please}\:{say}\:{something} \\ $$$${about}\:{this}\:{approach}.\left(\:{Of}\:{course}\:{there}\right. \\ $$$$\left.{may}\:{be}\:{better}\:{approaches}\right)\:{but}\:{is} \\ $$$${this}\:{a}\:{wrong}\:{approach}? \\ $$$$ \\ $$
Commented by mr W last updated on 30/Oct/22
your idea is absolutely correct. i think  there are no other shortcut methods   than this. so the task is to find the   number of ways to select r digits from  [1,9] such that their sum is a multiple   of 9, i.e. 9, 18, 27, 36, 45.   here r=2, 3, ...,9.
$${your}\:{idea}\:{is}\:{absolutely}\:{correct}.\:{i}\:{think} \\ $$$${there}\:{are}\:{no}\:{other}\:{shortcut}\:{methods}\: \\ $$$${than}\:{this}.\:{so}\:{the}\:{task}\:{is}\:{to}\:{find}\:{the}\: \\ $$$${number}\:{of}\:{ways}\:{to}\:{select}\:{r}\:{digits}\:{from} \\ $$$$\left[\mathrm{1},\mathrm{9}\right]\:{such}\:{that}\:{their}\:{sum}\:{is}\:{a}\:{multiple}\: \\ $$$${of}\:\mathrm{9},\:{i}.{e}.\:\mathrm{9},\:\mathrm{18},\:\mathrm{27},\:\mathrm{36},\:\mathrm{45}.\: \\ $$$${here}\:{r}=\mathrm{2},\:\mathrm{3},\:…,\mathrm{9}. \\ $$
Commented by Rasheed.Sindhi last updated on 30/Oct/22
Grateful sir!
$$\mathbb{G}\boldsymbol{\mathrm{rateful}}\:\boldsymbol{\mathrm{sir}}! \\ $$
Commented by Rasheed.Sindhi last updated on 30/Oct/22
Sorry sir,I′ve only rough idea.  Complete solution is beyond my  very limited capacity!
$${Sorry}\:{sir},{I}'{ve}\:{only}\:{rough}\:{idea}. \\ $$$${Complete}\:{solution}\:{is}\:{beyond}\:{my} \\ $$$${very}\:{limited}\:{capacity}! \\ $$
Commented by mr W last updated on 31/Oct/22
thanks for till now! please check my  answer sir!
$${thanks}\:{for}\:{till}\:{now}!\:{please}\:{check}\:{my} \\ $$$${answer}\:{sir}! \\ $$
Answered by mr W last updated on 31/Oct/22
an attempt  since such a number should consist  of distinct digits, it must have at  least two digits and at most 10 digits.  let′s consider at first only  numbers  without the digit “0”, since if we have  a r−digit−number which is divisible  by 9, but without “0”,  then we have   automatically r   (r+1)−digit−numbers which are  also divisible by 9. as example:  say d_1 d_2 ...d_r  is divisible by 9, with d_i ≠0,  then d_1 0d_2 ...d_r ,d_1 d_2 0...d_r ,...,d_1 d_2 ...d_r 0   are also divisible by 9.  we know a number is divisible by 9,  if the sum of its digits is divisible by  9. the sum of 9 different digits can  at most be   1+2+3+4+5+6+7+8+9=45.  therefore the sum of the digits from  a number with distinct digits and  divisible by 9 must be  9 or 18 or 27 or 36 or 45.  now we should find the number of  ways to select r digits from [1,9]   such that their sum is 9 or 18 or 27 or  36 or 45. here r=1,2,...,9.  say the r distinct digits are  d_1 ,d_2 ,...,d_r  with   d_1 <d_2 <...<d_r  and 1≤d_i ≤9  with them we can form r!   r−digit−numbers.  d_1 +d_2 +...+d_r =9 or 18 or 27 or 36 or 45.  the number of integer solutions of  this equation represents the number  of ways to select d_1 ,d_2 ,...,d_r  from [1,9].
$$\boldsymbol{{an}}\:\boldsymbol{{attempt}} \\ $$$${since}\:{such}\:{a}\:{number}\:{should}\:{consist} \\ $$$${of}\:{distinct}\:{digits},\:{it}\:{must}\:{have}\:{at} \\ $$$${least}\:{two}\:{digits}\:{and}\:{at}\:{most}\:\mathrm{10}\:{digits}. \\ $$$${let}'{s}\:{consider}\:{at}\:{first}\:{only}\:\:{numbers} \\ $$$${without}\:{the}\:{digit}\:“\mathrm{0}'',\:{since}\:{if}\:{we}\:{have} \\ $$$${a}\:{r}−{digit}−{number}\:{which}\:{is}\:{divisible} \\ $$$${by}\:\mathrm{9},\:{but}\:{without}\:“\mathrm{0}'',\:\:{then}\:{we}\:{have}\: \\ $$$${automatically}\:{r}\: \\ $$$$\left({r}+\mathrm{1}\right)−{digit}−{numbers}\:{which}\:{are} \\ $$$${also}\:{divisible}\:{by}\:\mathrm{9}.\:{as}\:{example}: \\ $$$${say}\:{d}_{\mathrm{1}} {d}_{\mathrm{2}} …{d}_{{r}} \:{is}\:{divisible}\:{by}\:\mathrm{9},\:{with}\:{d}_{{i}} \neq\mathrm{0}, \\ $$$${then}\:{d}_{\mathrm{1}} \mathrm{0}{d}_{\mathrm{2}} …{d}_{{r}} ,{d}_{\mathrm{1}} {d}_{\mathrm{2}} \mathrm{0}…{d}_{{r}} ,…,{d}_{\mathrm{1}} {d}_{\mathrm{2}} …{d}_{{r}} \mathrm{0}\: \\ $$$${are}\:{also}\:{divisible}\:{by}\:\mathrm{9}. \\ $$$${we}\:{know}\:{a}\:{number}\:{is}\:{divisible}\:{by}\:\mathrm{9}, \\ $$$${if}\:{the}\:{sum}\:{of}\:{its}\:{digits}\:{is}\:{divisible}\:{by} \\ $$$$\mathrm{9}.\:{the}\:{sum}\:{of}\:\mathrm{9}\:{different}\:{digits}\:{can} \\ $$$${at}\:{most}\:{be}\: \\ $$$$\mathrm{1}+\mathrm{2}+\mathrm{3}+\mathrm{4}+\mathrm{5}+\mathrm{6}+\mathrm{7}+\mathrm{8}+\mathrm{9}=\mathrm{45}. \\ $$$${therefore}\:{the}\:{sum}\:{of}\:{the}\:{digits}\:{from} \\ $$$${a}\:{number}\:{with}\:{distinct}\:{digits}\:{and} \\ $$$${divisible}\:{by}\:\mathrm{9}\:{must}\:{be} \\ $$$$\mathrm{9}\:{or}\:\mathrm{18}\:{or}\:\mathrm{27}\:{or}\:\mathrm{36}\:{or}\:\mathrm{45}. \\ $$$${now}\:{we}\:{should}\:{find}\:{the}\:{number}\:{of} \\ $$$${ways}\:{to}\:{select}\:{r}\:{digits}\:{from}\:\left[\mathrm{1},\mathrm{9}\right]\: \\ $$$${such}\:{that}\:{their}\:{sum}\:{is}\:\mathrm{9}\:{or}\:\mathrm{18}\:{or}\:\mathrm{27}\:{or} \\ $$$$\mathrm{36}\:{or}\:\mathrm{45}.\:{here}\:{r}=\mathrm{1},\mathrm{2},…,\mathrm{9}. \\ $$$${say}\:{the}\:{r}\:{distinct}\:{digits}\:{are} \\ $$$${d}_{\mathrm{1}} ,{d}_{\mathrm{2}} ,…,{d}_{{r}} \:{with}\: \\ $$$${d}_{\mathrm{1}} <{d}_{\mathrm{2}} <…<{d}_{{r}} \:{and}\:\mathrm{1}\leqslant{d}_{{i}} \leqslant\mathrm{9} \\ $$$${with}\:{them}\:{we}\:{can}\:{form}\:{r}!\: \\ $$$${r}−{digit}−{numbers}. \\ $$$${d}_{\mathrm{1}} +{d}_{\mathrm{2}} +…+{d}_{{r}} =\mathrm{9}\:{or}\:\mathrm{18}\:{or}\:\mathrm{27}\:{or}\:\mathrm{36}\:{or}\:\mathrm{45}. \\ $$$${the}\:{number}\:{of}\:{integer}\:{solutions}\:{of} \\ $$$${this}\:{equation}\:{represents}\:{the}\:{number} \\ $$$${of}\:{ways}\:{to}\:{select}\:{d}_{\mathrm{1}} ,{d}_{\mathrm{2}} ,…,{d}_{{r}} \:{from}\:\left[\mathrm{1},\mathrm{9}\right]. \\ $$
Commented by mr W last updated on 31/Oct/22
number of ways to select r digits from  [1,9] such that their sum is equal to...
$${number}\:{of}\:{ways}\:{to}\:{select}\:{r}\:{digits}\:{from} \\ $$$$\left[\mathrm{1},\mathrm{9}\right]\:{such}\:{that}\:{their}\:{sum}\:{is}\:{equal}\:{to}… \\ $$
Commented by mr W last updated on 01/Nov/22
Commented by mr W last updated on 01/Nov/22
2−digit numbers:    without “0”:   4×2!=8    with “0”:          1×1=1  3−digit numbers:    without “0”:   (3+7)×3!=60    with “0”:          8×2=16  4−digit numbers:    without “0”:   (11+3)×4!=336    with “0”:          60×3=180  5−digit numbers:    without “0”:   (3+11)×5!=1 680    with “0”:          336×4=1 344  6−digit numbers:    without “0”:   (7+3)×6!=7 200    with “0”:          1680×5=8 400  7−digit numbers:    without “0”:   4×7!=20 160    with “0”:          7200×6=43 200  8−digit numbers:    without “0”:   1×8!=40 320    with “0”:          20160×7=141 120  9−digit numbers:    without “0”:   1×9!=362 880    with “0”:          40320×8=322 560  10−digit numbers:    with “0”:          362880×9=3 265 920    totally:  4 215 385 numbers
$$\mathrm{2}−{digit}\:{numbers}: \\ $$$$\:\:{without}\:“\mathrm{0}'':\:\:\:\mathrm{4}×\mathrm{2}!=\mathrm{8} \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{1}×\mathrm{1}=\mathrm{1} \\ $$$$\mathrm{3}−{digit}\:{numbers}: \\ $$$$\:\:{without}\:“\mathrm{0}'':\:\:\:\left(\mathrm{3}+\mathrm{7}\right)×\mathrm{3}!=\mathrm{60} \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{8}×\mathrm{2}=\mathrm{16} \\ $$$$\mathrm{4}−{digit}\:{numbers}: \\ $$$$\:\:{without}\:“\mathrm{0}'':\:\:\:\left(\mathrm{11}+\mathrm{3}\right)×\mathrm{4}!=\mathrm{336} \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{60}×\mathrm{3}=\mathrm{180} \\ $$$$\mathrm{5}−{digit}\:{numbers}: \\ $$$$\:\:{without}\:“\mathrm{0}'':\:\:\:\left(\mathrm{3}+\mathrm{11}\right)×\mathrm{5}!=\mathrm{1}\:\mathrm{680} \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{336}×\mathrm{4}=\mathrm{1}\:\mathrm{344} \\ $$$$\mathrm{6}−{digit}\:{numbers}: \\ $$$$\:\:{without}\:“\mathrm{0}'':\:\:\:\left(\mathrm{7}+\mathrm{3}\right)×\mathrm{6}!=\mathrm{7}\:\mathrm{200} \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{1680}×\mathrm{5}=\mathrm{8}\:\mathrm{400} \\ $$$$\mathrm{7}−{digit}\:{numbers}: \\ $$$$\:\:{without}\:“\mathrm{0}'':\:\:\:\mathrm{4}×\mathrm{7}!=\mathrm{20}\:\mathrm{160} \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{7200}×\mathrm{6}=\mathrm{43}\:\mathrm{200} \\ $$$$\mathrm{8}−{digit}\:{numbers}: \\ $$$$\:\:{without}\:“\mathrm{0}'':\:\:\:\mathrm{1}×\mathrm{8}!=\mathrm{40}\:\mathrm{320} \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{20160}×\mathrm{7}=\mathrm{141}\:\mathrm{120} \\ $$$$\mathrm{9}−{digit}\:{numbers}: \\ $$$$\:\:{without}\:“\mathrm{0}'':\:\:\:\mathrm{1}×\mathrm{9}!=\mathrm{362}\:\mathrm{880} \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{40320}×\mathrm{8}=\mathrm{322}\:\mathrm{560} \\ $$$$\mathrm{10}−{digit}\:{numbers}: \\ $$$$\:\:{with}\:“\mathrm{0}'':\:\:\:\:\:\:\:\:\:\:\mathrm{362880}×\mathrm{9}=\mathrm{3}\:\mathrm{265}\:\mathrm{920} \\ $$$$ \\ $$$${totally}:\:\:\mathrm{4}\:\mathrm{215}\:\mathrm{385}\:{numbers} \\ $$
Commented by mr W last updated on 31/Oct/22
to check the table above we can   calculate the total number (Σ) of  ways to select 1,2,...,9 to get the sum k.  it is the coefficient of x^k  in the  expansion of   (1+x)(1+x^2 )(1+x^3 )...(1+x^9 ).  here we only need to look at the values  for k=9, 18, 27, 36, 45.
$${to}\:{check}\:{the}\:{table}\:{above}\:{we}\:{can}\: \\ $$$${calculate}\:{the}\:{total}\:{number}\:\left(\Sigma\right)\:{of} \\ $$$${ways}\:{to}\:{select}\:\mathrm{1},\mathrm{2},…,\mathrm{9}\:{to}\:{get}\:{the}\:{sum}\:{k}. \\ $$$${it}\:{is}\:{the}\:{coefficient}\:{of}\:{x}^{{k}} \:{in}\:{the} \\ $$$${expansion}\:{of}\: \\ $$$$\left(\mathrm{1}+{x}\right)\left(\mathrm{1}+{x}^{\mathrm{2}} \right)\left(\mathrm{1}+{x}^{\mathrm{3}} \right)…\left(\mathrm{1}+{x}^{\mathrm{9}} \right). \\ $$$${here}\:{we}\:{only}\:{need}\:{to}\:{look}\:{at}\:{the}\:{values} \\ $$$${for}\:{k}=\mathrm{9},\:\mathrm{18},\:\mathrm{27},\:\mathrm{36},\:\mathrm{45}. \\ $$
Commented by mr W last updated on 31/Oct/22

Leave a Reply

Your email address will not be published. Required fields are marked *