Question Number 4540 by Yozzii last updated on 06/Feb/16
$${Let}\:{us}\:{define}\:{the}\:{positive}\:{number}\:{n}\:{with}\:{four} \\ $$$${digits}\:\boldsymbol{\mathrm{a}},\boldsymbol{\mathrm{b}},\boldsymbol{\mathrm{c}}\:{and}\:\boldsymbol{\mathrm{d}}\:{such}\:{that}\:{n}=\boldsymbol{\mathrm{abcd}} \\ $$$${with}\:\boldsymbol{\mathrm{a}},\boldsymbol{\mathrm{b}},\boldsymbol{\mathrm{c}},\boldsymbol{\mathrm{d}}\in\mathbb{Z},\:\mathrm{1}\leqslant\boldsymbol{\mathrm{a}}\leqslant\mathrm{9},\:\mathrm{0}\leqslant\boldsymbol{\mathrm{b}}\leqslant\mathrm{9}, \\ $$$$\mathrm{0}\leqslant\boldsymbol{\mathrm{c}}\leqslant\mathrm{9}\:{and}\:\mathrm{0}\leqslant\boldsymbol{\mathrm{d}}\leqslant\mathrm{9}.\:{Let}\:{us}\:{then}\:{say} \\ $$$${that}\:{a}\:{cool}\:{number}\:{is}\:{a}\:{four}\:{digit}\:{number}, \\ $$$${say}\:{n},\:{such}\:{that}\:{the}\:{two}\:{digit}\:{numbers}\:{written}\:{as} \\ $$$$\boldsymbol{\mathrm{ab}}\:{and}\:\boldsymbol{\mathrm{cd}}\:{are}\:{given}\:{by}\:\boldsymbol{\mathrm{ab}}={r}×{s}\:{and} \\ $$$$\boldsymbol{\mathrm{cd}}=\left({r}−\mathrm{1}\right)×\left({s}+\mathrm{1}\right)\:{for}\:{some}\:{non}−{negative}\:{integers} \\ $$$${r}\:{and}\:{s},\:{r}\neq{s}.\:{For}\:{example},\:\mathrm{8081}\:{has}\: \\ $$$$\boldsymbol{\mathrm{a}}=\mathrm{8},\boldsymbol{\mathrm{b}}=\mathrm{0}\:{and}\:\mathrm{80}=\mathrm{10}×\mathrm{8}=\:{while}\: \\ $$$$\boldsymbol{\mathrm{c}}=\mathrm{8},\boldsymbol{\mathrm{d}}=\mathrm{1}\:{and}\:\mathrm{81}=\mathrm{9}×\mathrm{9}=\left(\mathrm{10}−\mathrm{1}\right)\left(\mathrm{8}+\mathrm{1}\right). \\ $$$${So},\:{for}\:{n}=\mathrm{8081},\:{r}=\mathrm{10}\:{while}\:{s}=\mathrm{8}. \\ $$$${How}\:{many}\:{n},\:{for}\:\mathrm{1000}\leqslant{n}\leqslant\mathrm{9999},\:{are}\:{cool}? \\ $$$$ \\ $$$${For}\:{n}\in\left[\mathrm{1000},\mathrm{9999}\right],{n}\in\mathbb{Z},\:{how}\:{many}\:{n}\:{exist} \\ $$$${so}\:{that}\:\boldsymbol{\mathrm{ab}}={r}×{s}\:{and}\:\boldsymbol{\mathrm{cd}}={r}×{s}+\mathrm{1}?\:{Call} \\ $$$${such}\:{n}\:{warm}\:{numbers}.\:\: \\ $$$$ \\ $$
Commented by Rasheed Soomro last updated on 06/Feb/16
$$\:{For}\:{warm}\:{number}\:\:\:\boldsymbol{\mathrm{ab}}={r}×{s}\:{and}\:\boldsymbol{\mathrm{c}}\overset{?} {\boldsymbol{\mathrm{b}}}={r}×{s}+\mathrm{1}? \\ $$$${Or}\:\:\:\boldsymbol{\mathrm{ab}}={r}×{s}\:{and}\:\boldsymbol{\mathrm{c}}{d}={r}×{s}+\mathrm{1}?\:\:{Pl}\:\:\:{confirm}. \\ $$$$……………………………………………………… \\ $$$${How}\:{many}\:{numbers}\:{are}\:{there},{which}\:{are} \\ $$$${both}\:{warm}\:{and}\:{cool}\:{at}\:{the}\:{same}\:{time}? \\ $$$${For}\:{example}\: \\ $$$$\:\:\:\:\:\:\:\:\:\:\mathrm{4849}\:\:\:\mathrm{48}=\mathrm{8}×\mathrm{6}\:\:\&\:\mathrm{49}=\left(\mathrm{8}−\mathrm{1}\right)\left(\mathrm{6}+\mathrm{1}\right) \\ $$$$\:\:\:\:\:\:\:\:\:\:\mathrm{4849}\:\:\:\:\mathrm{48}=\mathrm{8}×\mathrm{6}\:\:\&\:\:\mathrm{49}=\mathrm{8}×\mathrm{6}+\mathrm{1} \\ $$$$ \\ $$
Commented by Yozzii last updated on 06/Feb/16
$${Sorry}\:{for}\:{the}\:{typo}!\:{It}'{s}\:\boldsymbol{\mathrm{cd}}=\mathrm{r}×\mathrm{s}+\mathrm{1}. \\ $$
Answered by Rasheed Soomro last updated on 08/Feb/16
$${Cool}\:{Numbers} \\ $$$${Let}'{s}\:{attack}\:{the}\:{problem}\:{from}\:{r}-{s}\:{side}. \\ $$$$\:\:\:\:\:\:{We}\:\:{have}\:{to}\:{find}\:{number}\:{of}\:\:{pairs}\:\left({r},{s}\right) \\ $$$$\:\:\:\:\:\:{with}\:{following}\:{restrictions}: \\ $$$$\:^{\bullet\:} {r}×{s}\:{makes}\:{first}\:{two}\:{digits}\:{from}\:{left}\:\left(\boldsymbol{\mathrm{ab}}\right) \\ $$$$\:\:\:{and}\:\:\boldsymbol{\mathrm{a}}\geqslant\mathrm{1},\:\: \\ $$$$\:\:\:\:\:{So},\:\:\:\:\:\:\:\:\mathrm{10}\leqslant\:{r}×{s}\leqslant\mathrm{99}……………………….\left({i}\right) \\ $$$$\:^{\bullet} \:\left({r}−\mathrm{1}\right)\left({s}+\mathrm{1}\right)\:{makes}\:{last}\:{two}\:{digits} \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\mathrm{00}\leqslant\:\left({r}−\mathrm{1}\right)\left({s}+\mathrm{1}\right)\:\leqslant\mathrm{99}……………..\left({ii}\right) \\ $$$$\:^{\bullet} {r}\:{and}\:{s}\:{are}\:{non}-{negative}\:{integers}\:{and}\:{r}\neq{s} \\ $$$$\:\:\:{but}\:{as}\:{r}×{s}\neq\mathrm{0}\:\left(\:{from}\:\left({i}\right)\:\right),{so}\:\:{r}\neq\mathrm{0}\:\wedge\:{s}\neq\mathrm{0}\:, \\ $$$$\:\:\:{i}-{e}\:{r}\:{and}\:{s}\:{are}\:{positve}\:{integers}. \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:{r},{s}\:\in\:\mathbb{Z}^{+} \:{with}\:{r}\neq{s}…………………..\left({iii}\right) \\ $$$${From}\:\left({i}\right) \\ $$$$\mathrm{10}\leqslant\:{r}×{s}\leqslant\mathrm{99}\Rightarrow\:\frac{\mathrm{10}}{{r}}\leqslant{s}\leqslant\frac{\mathrm{99}}{{r}} \\ $$$${But}\:{as}\:{r},{s}\in\mathbb{Z}^{+} ,\:{So} \\ $$$$\:\:\:\:\:\lceil\frac{\mathrm{10}}{{r}}\rceil\leqslant{s}\leqslant\lfloor\frac{\mathrm{99}}{{r}}\rfloor…………..\left({iv}\right) \\ $$$${From}\:\left({ii}\right) \\ $$$$\:\mathrm{00}\leqslant\:\left({r}−\mathrm{1}\right)\left({s}+\mathrm{1}\right)\:\leqslant\mathrm{99}\Rightarrow\mathrm{0}\leqslant{s}+\mathrm{1}\leqslant\frac{\mathrm{99}}{{r}−\mathrm{1}} \\ $$$$\:\:\:\:\:\:\:\Rightarrow−\mathrm{1}\leqslant{s}\leqslant\frac{\mathrm{99}}{{r}−\mathrm{1}}−\mathrm{1} \\ $$$$\:\:\:\:\:\:\:\Rightarrow\:−\mathrm{1}\leqslant{s}\leqslant\frac{\mathrm{100}−{r}}{{r}−\mathrm{1}} \\ $$$${But}\:{since}\:{r},{s}\in\mathbb{Z}^{+} ,{So}\: \\ $$$$\:\:\:\:\:\:\:\:−\mathrm{1}\leqslant{s}\leqslant\lfloor\frac{\mathrm{100}−{r}}{{r}−\mathrm{1}}\rfloor………….\left({v}\right) \\ $$$${From}\:\left({iv}\right)\:\&\left({v}\right) \\ $$$$\:\:\:\:\:\:\:{Max}\left[\lceil\frac{\mathrm{10}}{{r}}\rceil,−\mathrm{1}\right]\leqslant{s}\leqslant{Min}\left[\lfloor\frac{\mathrm{99}}{{r}}\rfloor,\lfloor\frac{\mathrm{100}−{r}}{{r}−\mathrm{1}}\rfloor\right] \\ $$$${Since}\:{r}>\mathrm{0}\:\:\frac{\mathrm{10}}{{r}}>−\mathrm{1},\:\:{Max}\left[\lceil\frac{\mathrm{10}}{{r}}\rceil,−\mathrm{1}\right]=\lceil\frac{\mathrm{10}}{{r}}\rceil \\ $$$$\:\:\:\:\:\lceil\frac{\mathrm{10}}{{r}}\rceil\leqslant{s}\leqslant{Min}\left[\lfloor\frac{\mathrm{99}}{{r}}\rfloor,\lfloor\frac{\mathrm{100}−{r}}{{r}−\mathrm{1}}\rfloor\right]….\left({vi}\right) \\ $$$$\:\:\:\:\:{s}\neq{r}……………….\:….{from}\:\left({iii}\right)…..\left({vii}\right) \\ $$$${From}\:\left({vi}\right)\:\&\:\left({vii}\right) \\ $$$$………………………………………………………………. \\ $$$$\:\lceil\frac{\mathrm{10}}{{r}}\rceil\leqslant{s}\leqslant{Min}\left[\lfloor\frac{\mathrm{99}}{{r}}\rfloor,\lfloor\frac{\mathrm{100}−{r}}{{r}−\mathrm{1}}\rfloor\right]\:\wedge\:{s}\neq{r}…\left({ix}\right) \\ $$$$………………………………………………………………. \\ $$$${Above}\:\:{condition}\:{determines}\:{s},{if}\:\:{we}\:{fix}\:{r}\:\:. \\ $$$${For}\:{r}=\mathrm{4},\:{s}\:{is}\:{given}\:{by} \\ $$$$\:\lceil\frac{\mathrm{10}}{\mathrm{4}}\rceil\leqslant{s}\leqslant{Min}\left[\lfloor\frac{\mathrm{99}}{\mathrm{4}}\rfloor,\lfloor\frac{\mathrm{100}−\mathrm{4}}{\mathrm{4}−\mathrm{1}}\rfloor\right] \\ $$$$\:\lceil\mathrm{2}.\mathrm{5}\rceil\leqslant{s}\leqslant{Min}\left[\lfloor\mathrm{24}.\mathrm{75}\rfloor,\lfloor\frac{\mathrm{96}}{\mathrm{3}}\rfloor\right] \\ $$$$\:\mathrm{3}\leqslant{s}\leqslant{Min}\left[\mathrm{24},\mathrm{32}\right] \\ $$$$\mathrm{3}\leqslant{s}\leqslant\mathrm{24}\:\:\wedge\:{s}\neq\mathrm{4} \\ $$$${s}=\mathrm{3},\mathrm{5},\mathrm{6},\mathrm{7},…\mathrm{24}\:\:\:{Total}\:\mathrm{21}\:{values} \\ $$$$…………………………………………… \\ $$$${r}=\mathrm{1};\:{s}=\mathrm{10},\mathrm{11},…..\mathrm{99}\:\:\:\:\:\:\mid\:{r}=\mathrm{31};{s}=\mathrm{1},\mathrm{2} \\ $$$${r}=\mathrm{2};{s}=\mathrm{5},\mathrm{6},…,\mathrm{49}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\mid\:{r}=\mathrm{32};{s}=\mathrm{1},\mathrm{2} \\ $$$${r}=\mathrm{3};{s}=\mathrm{4},\mathrm{5},…\mathrm{33}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\mid\:{r}=\mathrm{33};{s}=\mathrm{1},\mathrm{2} \\ $$$${r}=\mathrm{4};{s}=\mathrm{3},\overset{×} {\mathrm{4}},…\mathrm{24}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\mid\:{r}=\mathrm{34};{s}=\mathrm{1},\mathrm{2} \\ $$$${r}=\mathrm{5};{s}=\mathrm{2},\mathrm{3},\mathrm{4},\overset{×} {\mathrm{5}},…\mathrm{19}\:\:\:\:\:\:\mid\:{r}=\mathrm{35};{s}=\mathrm{1} \\ $$$${r}=\mathrm{6};{s}=\mathrm{2},\mathrm{3},\mathrm{4},\mathrm{5},\overset{×} {\mathrm{6}},…\mathrm{16}\:\:\mid{r}=\mathrm{36};{s}=\mathrm{1} \\ $$$${r}=\mathrm{7};{s}=\mathrm{2},\mathrm{3},..\overset{×} {\mathrm{7}},\mathrm{8},…\mathrm{14}\:\:\mid{r}=\mathrm{37};{s}=\mathrm{1} \\ $$$${r}=\mathrm{8};{s}=\mathrm{2},\mathrm{3},…\overset{×} {\mathrm{8}},…\mathrm{12}\:\:\:\:\left(\mathrm{38},\mathrm{1}\right),\left(\mathrm{39},\mathrm{1}\right)…\left(\mathrm{50},\mathrm{1}\right)\mid \\ $$$${r}=\mathrm{9};{s}=\mathrm{2},\mathrm{3},….\overset{×} {\mathrm{9}},\mathrm{10},\mathrm{11} \\ $$$${r}=\mathrm{10};{s}=\mathrm{1},\mathrm{2},…\mathrm{9} \\ $$$${r}=\mathrm{11};{s}=\mathrm{1},\mathrm{2},…\mathrm{8} \\ $$$${r}=\mathrm{12};{s}=\mathrm{1},\mathrm{2},…\mathrm{8} \\ $$$${r}=\mathrm{13};{s}=\mathrm{1},\mathrm{2},…\mathrm{7} \\ $$$${r}=\mathrm{14};{s}=\mathrm{1},\mathrm{2},…\mathrm{6} \\ $$$${r}=\mathrm{15};{s}=\mathrm{1},\mathrm{2},..,\mathrm{6} \\ $$$${r}=\mathrm{16};{s}=\mathrm{1},\mathrm{2}…\mathrm{5} \\ $$$${r}=\mathrm{17};{s}=\mathrm{1},\mathrm{2},…\mathrm{5} \\ $$$${Out}\:{of}\:{space} \\ $$
Commented by Yozzii last updated on 07/Feb/16
$${Isn}'{t}\:{it}\:\mathrm{10}\leqslant{rs}\leqslant\mathrm{99}\:{and}\:\mathrm{0}\leqslant\left({r}−\mathrm{1}\right)\left({s}+\mathrm{1}\right)\leqslant\mathrm{99}? \\ $$
Commented by Yozzii last updated on 07/Feb/16
$${Since}\:\boldsymbol{\mathrm{ab}}=\mathrm{r}×\mathrm{s}\:\mathrm{and}\:\boldsymbol{\mathrm{cd}}=\left(\mathrm{r}−\mathrm{1}\right)\left(\mathrm{s}+\mathrm{1}\right) \\ $$$$\Rightarrow\boldsymbol{\mathrm{cd}}=\mathrm{r}×\mathrm{s}+\mathrm{r}−\mathrm{s}−\mathrm{1}=\boldsymbol{\mathrm{ab}}+\mathrm{r}−\mathrm{s}−\mathrm{1} \\ $$$$\Rightarrow\boldsymbol{\mathrm{cd}}−\boldsymbol{\mathrm{ab}}=\mathrm{r}−\mathrm{s}−\mathrm{1} \\ $$$$\mathrm{10}\leqslant\boldsymbol{\mathrm{ab}}\leqslant\mathrm{99}\:{and}\:\mathrm{00}\leqslant\boldsymbol{\mathrm{cd}}\leqslant\mathrm{99} \\ $$$${min}\left(\boldsymbol{\mathrm{cd}}−\boldsymbol{\mathrm{ab}}\right)={min}\left(\boldsymbol{\mathrm{cd}}\right)−{min}\left(\boldsymbol{\mathrm{ab}}\right) \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:=\mathrm{00}−\mathrm{10} \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:=−\mathrm{10} \\ $$$${max}\left(\boldsymbol{\mathrm{cd}}−\boldsymbol{\mathrm{ab}}\right)={max}\left(\boldsymbol{\mathrm{cd}}\right)−{min}\left(\boldsymbol{\mathrm{ab}}\right) \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:=\mathrm{99}−\mathrm{10} \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:=\mathrm{89} \\ $$$$\Rightarrow\mathrm{00}−\mathrm{10}\leqslant\boldsymbol{\mathrm{cd}}−\boldsymbol{\mathrm{ab}}\leqslant\mathrm{99}−\mathrm{10} \\ $$$$−\mathrm{10}\leqslant\mathrm{r}−\mathrm{s}−\mathrm{1}\leqslant\mathrm{89} \\ $$$$−\mathrm{9}\leqslant\mathrm{r}−\mathrm{s}\leqslant\mathrm{90} \\ $$$$\mathrm{s}−\mathrm{9}\leqslant{r}\leqslant\mathrm{90}+{s} \\ $$$${From}\:{you}\:{we}\:{have}\:{also}\:\frac{\mathrm{10}}{{s}}\leqslant{r}\leqslant\frac{\mathrm{99}}{{s}}. \\ $$$${Could}\:{we}\:{plot}\:{these}\:{inequalities}\: \\ $$$${to}\:{get}\:{the}\:{common}\:{region}? \\ $$
Commented by Yozzii last updated on 07/Feb/16
Commented by Yozzii last updated on 07/Feb/16
Commented by Rasheed Soomro last updated on 07/Feb/16
$${Thanks}\:{to}\:{mention}\:{mistake},\:{I}\:{have}\:{corrected}\:{it}. \\ $$
Commented by Rasheed Soomro last updated on 07/Feb/16
$$\mathcal{NICE}\:\:\mathcal{APPROACH}! \\ $$
Commented by Rasheed Soomro last updated on 07/Feb/16
$${Pl}\:{do}\:{it}\:{manually}\:{also}.\:{I}\:{mean}\:{without} \\ $$$${the}\:{help}\:{of}\:{Wolfram}\:{Alpha}. \\ $$
Commented by Yozzii last updated on 07/Feb/16
$${The}\:{best}\:{thing}\:{I}\:{know}\:{to}\:{do} \\ $$$${is}\:{draw}\:{the}\:{graphs}\:{manually}\:{and}\:{count} \\ $$$${the}\:{valid}\:{integer}\:{pairs}…\: \\ $$$${I}\:{lack}\:{experience}\:{in}\:{solving}\:{such}\: \\ $$$${inequalities}\:{via}\:{a}\:{shorter}\:{method}. \\ $$
Commented by Rasheed Soomro last updated on 08/Feb/16
$${Thanks}\:{for}\:{reply}. \\ $$