Menu Close

How-many-numbers-in-the-range-1-10-n-1-are-divisible-by-9-digit-repetitions-are-not-allowed-




Question Number 118043 by prakash jain last updated on 14/Oct/20
How many numbers in the range  [1,10^n −1] are divisible by 9?  digit repetitions are not allowed.
Howmanynumbersintherange[1,10n1]aredivisibleby9?digitrepetitionsarenotallowed.
Commented by mr W last updated on 15/Oct/20
without repetition means max.  10 digits are allowed, i.e. n≤10.    10 digit numbers:  0+1+2+..+9=45 ✓  ⇒(9/(10))×10!=9×9!    9 digit numbers:  1+2+..+9=45 ✓  ⇒9!  0+1+2+..+8=36 ✓  ⇒(8/9)×9!=8×8!  ⇒9!+8×8!=17×8!    8 digit numbers:  without 0+9 ⇒8!  without 1+8,2+7,3+6,4+5 ⇒4×(7/8)×8!=4×7×7!  ⇒8!+4×7×7!=36×7!    7 digit numbers:  without 0+1+8,0+2+7,0+3+6,0+4+5 ⇒4×7!  without 1+8+9,2+7+9,3+6+9,4+5+9 ⇒4×(6/7)×7!=4×6×6!  without 1+2+6,1+3+5 ⇒2×(6/7)×7!=2×6×6!  without 2+3+4 ⇒(6/7)×7!=6×6!  ⇒(4×7+4×6+2×6+6)6!=10×7!    6 digit numbers:  without 0+1+2+6,0+1+3+5,0+2+3+4 ⇒3×6!  without 1+2+6+8,1+3+5+9,2+3+4+9 ⇒3×(5/6)×6!=3×5×5!  ⇒3(6+5)5!=33×5!    5 digit numbers:  9+8+7+2+1  9+8+6+3+1  9+8+5+4+1  9+8+5+3+2  9+7+6+4+1  9+7+6+3+2  9+7+5+4+2  9+6+5+4+3    ......
withoutrepetitionmeansmax.10digitsareallowed,i.e.n10.10digitnumbers:0+1+2+..+9=45910×10!=9×9!9digitnumbers:1+2+..+9=459!0+1+2+..+8=3689×9!=8×8!9!+8×8!=17×8!8digitnumbers:without0+98!without1+8,2+7,3+6,4+54×78×8!=4×7×7!8!+4×7×7!=36×7!7digitnumbers:without0+1+8,0+2+7,0+3+6,0+4+54×7!without1+8+9,2+7+9,3+6+9,4+5+94×67×7!=4×6×6!without1+2+6,1+3+52×67×7!=2×6×6!without2+3+467×7!=6×6!(4×7+4×6+2×6+6)6!=10×7!6digitnumbers:without0+1+2+6,0+1+3+5,0+2+3+43×6!without1+2+6+8,1+3+5+9,2+3+4+93×56×6!=3×5×5!3(6+5)5!=33×5!5digitnumbers:9+8+7+2+19+8+6+3+19+8+5+4+19+8+5+3+29+7+6+4+19+7+6+3+29+7+5+4+29+6+5+4+3
Commented by prakash jain last updated on 15/Oct/20
Thanks sir.  It looks listing is the only possible way.  I thought I had seen a closed forum  expression somewhere but was not  able to derive.
Thankssir.Itlookslistingistheonlypossibleway.IthoughtIhadseenaclosedforumexpressionsomewherebutwasnotabletoderive.
Answered by floor(10²Eta[1]) last updated on 24/Dec/20
from 1 to 10^n −1 we have ((10^n −1)/9) multiples of 9  (considering the numbers with the same digits)  so let′s calculate how many numbers have   the same digits and are divisible by 9  [aa...a] (n digits)  a.n≡0(mod9), a∈[1,9] ∧ n≥2  a∈{1, 2, 4, 5, 7, 8}⇒n=9k, k≥1  a∈{3, 6}⇒n=3k, k≥1  a=9⇒n=k≥2  2 digits: (99)  3 digits: (333, 666, 999)  4 digits: (9999)  5 digits: (99999)  6 digits: (333333, 666666, 999999)  [...]  9 digits: (11...1, 22...2, 33...3, ..., 99..9)  2 digits to 9 digits: 5+3.2+9=20 cases  10 digits to 19: 7+3.2+9=22 cases  from 1 to x we have  x−⌊(x/3)⌋numbers that are coprime with 3  (because ⌊(x/3)⌋ is the number of multiples of 3, from 1 to x)  from 2 to x we have  (x−⌊(x/3)⌋−1)+3(⌊(x/3)⌋−⌊(x/9)⌋)+9⌊(x/9)⌋  x−1+2⌊(x/3)⌋+6⌊(x/9)⌋numbers that are divisible  by 9 and have the same digits  from 2 digits to n digits we have  n−1+2⌊(n/3)⌋+6⌊(n/9)⌋ numbers that have  the same digits and are divisible by 9    Ans:  ((10^n −1)/9)−(n−1+2⌊(n/3)⌋+6⌊(n/9)⌋)
from1to10n1wehave10n19multiplesof9(consideringthenumberswiththesamedigits)soletscalculatehowmanynumbershavethesamedigitsandaredivisibleby9[aaa](ndigits)a.n0(mod9),a[1,9]n2a{1,2,4,5,7,8}n=9k,k1a{3,6}n=3k,k1a=9n=k22digits:(99)3digits:(333,666,999)4digits:(9999)5digits:(99999)6digits:(333333,666666,999999)[]9digits:(111,222,333,,99..9)2digitsto9digits:5+3.2+9=20cases10digitsto19:7+3.2+9=22casesfrom1toxwehavexx3numbersthatarecoprimewith3(becausex3isthenumberofmultiplesof3,from1tox)from2toxwehave(xx31)+3(x3x9)+9x9x1+2x3+6x9numbersthataredivisibleby9andhavethesamedigitsfrom2digitstondigitswehaven1+2n3+6n9numbersthathavethesamedigitsandaredivisibleby9Ans:10n19(n1+2n3+6n9)

Leave a Reply

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