Menu Close

How-many-numbers-with-a-maximum-of-5-digits-greater-than-4000-can-be-formed-with-the-digits-2-3-4-5-6-if-repetition-is-allowed-for-2-and-3-only-




Question Number 198576 by mr W last updated on 22/Oct/23
How many numbers with a maximum of 5 digits, greater than 4000, can be formed with the digits 2, 3, 4, 5, 6; if repetition is allowed for 2 and 3 only?
How many numbers with a maximum of 5 digits, greater than 4000, can be formed with the digits 2, 3, 4, 5, 6; if repetition is allowed for 2 and 3 only?

Commented by mr W last updated on 22/Oct/23
Q198242 reposted for alternative  solutions
$${Q}\mathrm{198242}\:{reposted}\:{for}\:{alternative} \\ $$$${solutions} \\ $$
Commented by MM42 last updated on 22/Oct/23
Sir W  you are right.i was not careful.  thank you for your consideration.
$${Sir}\:{W} \\ $$$${you}\:{are}\:{right}.{i}\:{was}\:{not}\:{careful}. \\ $$$${thank}\:{you}\:{for}\:{your}\:{consideration}. \\ $$
Commented by mr W last updated on 22/Oct/23
you are welcome sir!
$${you}\:{are}\:{welcome}\:{sir}! \\ $$
Commented by nikif99 last updated on 23/Oct/23
  A more complicated solution    I. four digit numbers   determinant (((1st),(                        2nd),(        3rd),( 4th),(      cases^★ )))  4or5or6^★  { ((2or3    { ((2or3 { ((2or3       (3×2×2×2=24))),((5or6       (24))) :})),((5or6 { ((2or3       (24))),((6              (12))) :})) :})),((5or6^★  { ((2or3 { ((2or3       (24))),((6^★            (12))) :})),((6         { ((2or3      (12))),((  ×          (0))) :})) :})) :}  ★: the product of all possible cases through a routing of digits.  Subtotal 132    II. five digit numbers   determinant (((1st),(                                   2nd),(                          3rd),(             4th),(         5th),(    cases)))   determinant (((2or3 { ((2or3            { ((2or3        { ((2or3        { ((2or3         (32))),((4or5or6  (48))) :})),((4or5or6 { ((2or3         (48))),((5or6         (48))) :})) :})),((4or5or6 { ((2or3        { ((2or3          (48))),((5or6          (48))) :})),((5or6        { ((2or3           (48))),((6                  (24))) :})) :})) :})),((4or5or6^★  { ((2or3         { ((2or3       { ((2or3           (48))),((5or6           (48))) :})),((5or6       { ((2or3           (48))),((6                  (24))) :})) :})),((5or6^★       { ((2or3       { ((2or3          (48))),((6^★               (24))) :})),((6               { ((2                  (12))),((3                  (12))) :})) :})) :})) :})))  Subtotal 608  4or5or6^★  { ((2or3       { ((2or3 { ((2or3             { ((2or3       (48))),((5or6       (48))) :})),((5or6             { ((2or3       (48))),((6              (24))) :})) :})),((5or6 { ((2or3             { ((2or3       (48))),((6              (24))) :})),((6                     { ((2             (12))),((3             (12))) :})) :})) :})),((5or6^★        { ((2or3 { ((2or3             { ((2or3      (48))),((6             (24))) :})),((6^★                     { ((2              (8))),((3              (8))) :})) :})),((6        { ((2                     { ((2              (8))),((3              (8))) :})),((3                     { ((2              (8))),((3              (8))) :})) :})) :})) :}  Subtotal 384  Total 1124    ★: if for exemple 4 is selected initialy, then one of {5,6} is selected next,  and finally the last one.
$$ \\ $$$${A}\:{more}\:{complicated}\:{solution} \\ $$$$ \\ $$$$\boldsymbol{{I}}.\:\boldsymbol{{four}}\:\boldsymbol{{digit}}\:\boldsymbol{{numbers}} \\ $$$$\begin{matrix}{\mathrm{1}{st}}&{\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\mathrm{2}{nd}}&{\:\:\:\:\:\:\:\:\mathrm{3}{rd}}&{\:\mathrm{4}{th}}&{\:\:\:\:\:\:{cases}^{\bigstar} }\end{matrix} \\ $$$$\mathrm{4}{or}\mathrm{5}{or}\mathrm{6}^{\bigstar} \begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\left(\mathrm{3}×\mathrm{2}×\mathrm{2}×\mathrm{2}=\mathrm{24}\right)}\\{\mathrm{5}{or}\mathrm{6}\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\end{cases}}}\\{\mathrm{5}{or}\mathrm{6\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\\{\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{12}\right)}\end{cases}}}\end{cases}}\\{\mathrm{5}{or}\mathrm{6}^{\bigstar} \begin{cases}{\mathrm{2}{or}\mathrm{3\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\\{\mathrm{6}^{\bigstar} \:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{12}\right)}\end{cases}}}\\{\mathrm{6}\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\left(\mathrm{12}\right)}\\{\:\:×\:\:\:\:\:\:\:\:\:\:\left(\mathrm{0}\right)}\end{cases}}\end{cases}}\end{cases} \\ $$$$\bigstar:\:{the}\:{product}\:{of}\:{all}\:{possible}\:{cases}\:{through}\:{a}\:{routing}\:{of}\:{digits}. \\ $$$${Subtotal}\:\mathrm{132} \\ $$$$ \\ $$$$\boldsymbol{{II}}.\:\boldsymbol{{five}}\:\boldsymbol{{digit}}\:\boldsymbol{{numbers}} \\ $$$$\begin{matrix}{\mathrm{1}{st}}&{\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\mathrm{2}{nd}}&{\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\mathrm{3}{rd}}&{\:\:\:\:\:\:\:\:\:\:\:\:\:\mathrm{4}{th}}&{\:\:\:\:\:\:\:\:\:\mathrm{5}{th}}&{\:\:\:\:{cases}}\end{matrix} \\ $$$$\begin{matrix}{\mathrm{2}{or}\mathrm{3\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\left(\mathrm{32}\right)}\\{\mathrm{4}{or}\mathrm{5}{or}\mathrm{6}\:\:\left(\mathrm{48}\right)}\end{cases}}\\{\mathrm{4}{or}\mathrm{5}{or}\mathrm{6\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{5}{or}\mathrm{6}\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\end{cases}}}\end{cases}}\\{\mathrm{4}{or}\mathrm{5}{or}\mathrm{6\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{5}{or}\mathrm{6}\:\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\end{cases}}\\{\mathrm{5}{or}\mathrm{6}\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\end{cases}}\end{cases}}}\end{cases}}\\{\mathrm{4}{or}\mathrm{5}{or}\mathrm{6}^{\bigstar} \begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{5}{or}\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\end{cases}}\\{\mathrm{5}{or}\mathrm{6}\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\end{cases}}\end{cases}}\\{\mathrm{5}{or}\mathrm{6}^{\bigstar} \:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{6}^{\bigstar} \:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\end{cases}}\\{\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{12}\right)}\\{\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{12}\right)}\end{cases}}\end{cases}}\end{cases}}\end{cases}}}\end{matrix} \\ $$$${Subtotal}\:\mathrm{608} \\ $$$$\mathrm{4}{or}\mathrm{5}{or}\mathrm{6}^{\bigstar} \begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{5}{or}\mathrm{6}\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\end{cases}}\\{\mathrm{5}{or}\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\end{cases}}\end{cases}}}\\{\mathrm{5}{or}\mathrm{6\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\end{cases}}\\{\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{12}\right)}\\{\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{12}\right)}\end{cases}}\end{cases}}}\end{cases}}\\{\mathrm{5}{or}\mathrm{6}^{\bigstar} \:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}{or}\mathrm{3}\:\:\:\:\:\:\left(\mathrm{48}\right)}\\{\mathrm{6}\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{24}\right)}\end{cases}}\\{\mathrm{6}^{\bigstar} \:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{8}\right)}\\{\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{8}\right)}\end{cases}}\end{cases}}}\\{\mathrm{6}\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{8}\right)}\\{\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{8}\right)}\end{cases}}\\{\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\begin{cases}{\mathrm{2}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{8}\right)}\\{\mathrm{3}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\left(\mathrm{8}\right)}\end{cases}}\end{cases}}\end{cases}}\end{cases} \\ $$$${Subtotal}\:\mathrm{384} \\ $$$${Total}\:\mathrm{1124} \\ $$$$ \\ $$$$\bigstar:\:{if}\:{for}\:{exemple}\:\mathrm{4}\:{is}\:{selected}\:{initialy},\:{then}\:{one}\:{of}\:\left\{\mathrm{5},\mathrm{6}\right\}\:{is}\:{selected}\:{next}, \\ $$$${and}\:{finally}\:{the}\:{last}\:{one}. \\ $$
Commented by mr W last updated on 23/Oct/23
method using generating function  seems to be camplicated at first  glance, but actually this solution  method  is general and thus very  powerful. try to find the number  of 7−digit numbers with exactly  the same conditions. can you give  a solution for this case?
$${method}\:{using}\:{generating}\:{function} \\ $$$${seems}\:{to}\:{be}\:{camplicated}\:{at}\:{first} \\ $$$${glance},\:{but}\:{actually}\:{this}\:{solution} \\ $$$${method}\:\:{is}\:{general}\:{and}\:{thus}\:{very} \\ $$$${powerful}.\:{try}\:{to}\:{find}\:{the}\:{number} \\ $$$${of}\:\mathrm{7}−{digit}\:{numbers}\:{with}\:{exactly} \\ $$$${the}\:{same}\:{conditions}.\:{can}\:{you}\:{give} \\ $$$${a}\:{solution}\:{for}\:{this}\:{case}? \\ $$
Commented by mr W last updated on 23/Oct/23
Commented by nikif99 last updated on 23/Oct/23
It is quite difficult to manage manually  such a tree with 7 levels.  Trying another approach, I used   self−developped software via Fortran  and I found 8.864 cases for 7−digit   numbers (and 3.040 for 6−digit).  P.S. I do not know what other members  see on my solution comment;   I personally see only the title in bold  (“4−digit numbers”) without analysis  with opening curly braces.
$${It}\:{is}\:{quite}\:{difficult}\:{to}\:{manage}\:{manually} \\ $$$${such}\:{a}\:{tree}\:{with}\:\mathrm{7}\:{levels}. \\ $$$${Trying}\:{another}\:{approach},\:{I}\:{used}\: \\ $$$${self}−{developped}\:{software}\:{via}\:{Fortran} \\ $$$${and}\:{I}\:{found}\:\mathrm{8}.\mathrm{864}\:{cases}\:{for}\:\mathrm{7}−{digit}\: \\ $$$${numbers}\:\left({and}\:\mathrm{3}.\mathrm{040}\:{for}\:\mathrm{6}−{digit}\right). \\ $$$${P}.{S}.\:{I}\:{do}\:{not}\:{know}\:{what}\:{other}\:{members} \\ $$$${see}\:{on}\:{my}\:{solution}\:{comment};\: \\ $$$${I}\:{personally}\:{see}\:{only}\:{the}\:{title}\:{in}\:{bold} \\ $$$$\left(“\mathrm{4}−{digit}\:{numbers}''\right)\:{without}\:{analysis} \\ $$$${with}\:{opening}\:{curly}\:{braces}. \\ $$
Commented by mr W last updated on 23/Oct/23
i can also only see the title in bold,  nothing follows.
$${i}\:{can}\:{also}\:{only}\:{see}\:{the}\:{title}\:{in}\:{bold}, \\ $$$${nothing}\:{follows}. \\ $$
Commented by mr W last updated on 23/Oct/23
8864 numbers with 7 digits, this is  correct, thanks alot! i also got this  result, very easily with my method  applying generating function. the  result is the coefficient of x^7  term  in 7!e^(2x) (1+x)^3 , which is 8864.  similarly for 6−digit numbers it is  the coefficient of x^6  term in   6!e^(2x) (1+x)^3 , which is 3040.
$$\mathrm{8864}\:{numbers}\:{with}\:\mathrm{7}\:{digits},\:{this}\:{is} \\ $$$${correct},\:{thanks}\:{alot}!\:{i}\:{also}\:{got}\:{this} \\ $$$${result},\:{very}\:{easily}\:{with}\:{my}\:{method} \\ $$$${applying}\:{generating}\:{function}.\:{the} \\ $$$${result}\:{is}\:{the}\:{coefficient}\:{of}\:{x}^{\mathrm{7}} \:{term} \\ $$$${in}\:\mathrm{7}!{e}^{\mathrm{2}{x}} \left(\mathrm{1}+{x}\right)^{\mathrm{3}} ,\:{which}\:{is}\:\mathrm{8864}. \\ $$$${similarly}\:{for}\:\mathrm{6}−{digit}\:{numbers}\:{it}\:{is} \\ $$$${the}\:{coefficient}\:{of}\:{x}^{\mathrm{6}} \:{term}\:{in}\: \\ $$$$\mathrm{6}!{e}^{\mathrm{2}{x}} \left(\mathrm{1}+{x}\right)^{\mathrm{3}} ,\:{which}\:{is}\:\mathrm{3040}. \\ $$
Commented by nikif99 last updated on 23/Oct/23
Commented by mr W last updated on 23/Oct/23
nice prepared!
$${nice}\:{prepared}! \\ $$
Answered by mr W last updated on 23/Oct/23
2 and 3 can be used zero time, one  time or any times ⇒(1+x+x^2 +x^3 +...)  4, 5 and 6 can only be used zero time   or one time ⇒(1+x)    5−digit numbers:  number of such numbers is the  coefficient of x^5  term in  5!(1+x+(x^2 /(2!))+(x^3 /(3!))+...)^2 (1+x)^3   =5!e^(2x) (1+x)^3   which is 992.   that means we can form 992 such   5−digit numbers.
$$\mathrm{2}\:{and}\:\mathrm{3}\:{can}\:{be}\:{used}\:{zero}\:{time},\:{one} \\ $$$${time}\:{or}\:{any}\:{times}\:\Rightarrow\left(\mathrm{1}+{x}+{x}^{\mathrm{2}} +{x}^{\mathrm{3}} +…\right) \\ $$$$\mathrm{4},\:\mathrm{5}\:{and}\:\mathrm{6}\:{can}\:{only}\:{be}\:{used}\:{zero}\:{time}\: \\ $$$${or}\:{one}\:{time}\:\Rightarrow\left(\mathrm{1}+{x}\right) \\ $$$$ \\ $$$$\underline{\mathrm{5}−\boldsymbol{{digit}}\:\boldsymbol{{numbers}}:} \\ $$$${number}\:{of}\:{such}\:{numbers}\:{is}\:{the} \\ $$$${coefficient}\:{of}\:{x}^{\mathrm{5}} \:{term}\:{in} \\ $$$$\mathrm{5}!\left(\mathrm{1}+{x}+\frac{{x}^{\mathrm{2}} }{\mathrm{2}!}+\frac{{x}^{\mathrm{3}} }{\mathrm{3}!}+…\right)^{\mathrm{2}} \left(\mathrm{1}+{x}\right)^{\mathrm{3}} \\ $$$$=\mathrm{5}!{e}^{\mathrm{2}{x}} \left(\mathrm{1}+{x}\right)^{\mathrm{3}} \\ $$$${which}\:{is}\:\mathrm{992}.\: \\ $$$${that}\:{means}\:{we}\:{can}\:{form}\:\mathrm{992}\:{such}\: \\ $$$$\mathrm{5}−{digit}\:{numbers}. \\ $$
Commented by Tawa11 last updated on 23/Oct/23
Thanks sir.  I appreciate your time, God bless you sir.
$$\mathrm{Thanks}\:\mathrm{sir}. \\ $$$$\mathrm{I}\:\mathrm{appreciate}\:\mathrm{your}\:\mathrm{time},\:\mathrm{God}\:\mathrm{bless}\:\mathrm{you}\:\mathrm{sir}. \\ $$
Commented by mr W last updated on 22/Oct/23
Commented by mr W last updated on 22/Oct/23
4−digit numbers:  the first digit must be 4, 5 or 6.  we select at first the first digit,  there are 3 ways. then we form   3−digit numbers with the other 4  digits. similarly to above, the number  of such numbers is the coefficient  of x^3  term in 3!e^(2x) (1+x)^2 , which is  44. so totally we can form   3×44=132 valid 4−digit numbers.
$$\underline{\mathrm{4}−\boldsymbol{{digit}}\:\boldsymbol{{numbers}}:} \\ $$$${the}\:{first}\:{digit}\:{must}\:{be}\:\mathrm{4},\:\mathrm{5}\:{or}\:\mathrm{6}. \\ $$$${we}\:{select}\:{at}\:{first}\:{the}\:{first}\:{digit}, \\ $$$${there}\:{are}\:\mathrm{3}\:{ways}.\:{then}\:{we}\:{form}\: \\ $$$$\mathrm{3}−{digit}\:{numbers}\:{with}\:{the}\:{other}\:\mathrm{4} \\ $$$${digits}.\:{similarly}\:{to}\:{above},\:{the}\:{number} \\ $$$${of}\:{such}\:{numbers}\:{is}\:{the}\:{coefficient} \\ $$$${of}\:{x}^{\mathrm{3}} \:{term}\:{in}\:\mathrm{3}!{e}^{\mathrm{2}{x}} \left(\mathrm{1}+{x}\right)^{\mathrm{2}} ,\:{which}\:{is} \\ $$$$\mathrm{44}.\:{so}\:{totally}\:{we}\:{can}\:{form}\: \\ $$$$\mathrm{3}×\mathrm{44}=\mathrm{132}\:{valid}\:\mathrm{4}−{digit}\:{numbers}. \\ $$
Commented by mr W last updated on 22/Oct/23
Commented by mr W last updated on 22/Oct/23
all together: 992+132=1124 ✓
$${all}\:{together}:\:\mathrm{992}+\mathrm{132}=\mathrm{1124}\:\checkmark \\ $$

Leave a Reply

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