Menu Close

This-question-is-posted-on-the-request-of-mrW1-See-comments-of-my-answer-to-Q-15543-Find-the-last-last-non-zero-digit-of-the-expansion-of-2000-




Question Number 15742 by RasheedSoomro last updated on 14/Jun/17
This question is posted on the request of mrW1                          (See comments of my answer to Q#15543).    Find the last last  non-zero digit of the expansion  of  2000!
ThisquestionispostedontherequestofmrW1You can't use 'macro parameter character #' in math modeFindthelastlastnonzerodigitoftheexpansionof2000!
Commented by mrW1 last updated on 13/Jun/17
Thank you Mr Rasheed for solving  the question!
ThankyouMrRasheedforsolvingthequestion!
Answered by RasheedSoomro last updated on 13/Jun/17
^• 2000!  has as many ending zeros      as  many times 10 is factor of it.  ^• 10 is as many times factor of 2000!      as many times 5 is factor of  of  it.  ^• 5 is               ( ⌊((2000)/5)⌋+⌊((2000)/(25))⌋+⌊((2000)/(125))⌋+⌊((2000)/(625))⌋ )            =400+80+16+3=499 times                        factor of  2000!  That all means 2000! has 499 ending  0′s  and if p=((2000!)/(10^(499) )) then p has no ending 0.  And how is this related to last non-zero digit  of  2000!  ?  It′s as that          Last non-zero digit of 2000!(say d)                                         =unit digit of p=2000!/10^(499)      Hence p≡d(mod 10)    Now,       2000!=(1...4)(6...9)...(1996...1999)(5.10...2000)                   =5^(400) (1...4)(6...9)...(1996...1999)^(−400 brackets−) .400!        400!=(1...4)(6...9)...(396...399)(5.10...400)                  =5^(80) (1...4)(6...9)...(396...399)^(−80 brackets−) .80!       80!=(1...4)(6...9)...(76...79)(5.10..80)               =5^(16) (1...4)(6...9)...(76...79)^(16 brackets) .16!      16!=(1...4)(6...9)(11...14)(16)(5.10.15)               =5^3 (1...4)(6...9)(11...14){(16).3!}               =5^3 (1...4)(6...9)(11...14)^(3 brackets) (96)  Total 499 brackets(as many as there are zeros)  2000!=5^(499) {(1...4)(6...9)...(1996...1999)}                       ×{(1...4)(6...9)...(396...399)}                             ×{(1...4)(6...9)...(76...79)}                                   ×{(1...4)(6...9)(11...14)}(96)    p=((2000!)/(2^(499) .5^(499) ))=((1/2^(499) )){(1...4)(6...9)...(1996...1999)}                                        ×{(1...4)(6...9)...(396...399)}                                             ×{(1...4)(6...9)...(76...79)}                                                 ×{(1...4)(6...9)(11...14)}(96)   p={(((1...4)/2))(((6...9)/2))...(((1996...1999)/2))}               ×{(((1...4)/2))(((6...9)/2))...(((396...399)/2))}                     ×{(((1...4)/2))(((6...9)/2))...(((76...79)/2))}                            ×{(((1...4)/2))(((6...9)/2))(((11...14)/2))}(96)    Now,  we know that or can prove that              (((5k+1)(5k+2)(5k+3)(5k+4))/2)≡2(mod 10)
2000!hasasmanyendingzerosasmanytimes10isfactorofit.10isasmanytimesfactorof2000!asmanytimes5isfactorofofit.5is(20005+200025+2000125+2000625)=400+80+16+3=499timesfactorof2000!Thatallmeans2000!has499ending0sandifp=2000!10499thenphasnoending0.Andhowisthisrelatedtolastnonzerodigitof2000!?ItsasthatLastnonzerodigitof2000!(sayd)=unitdigitofp=2000!/10499Hencepd(mod10)Now,2000!=(14)(69)(19961999)(5.102000)=5400(14)(69)(19961999)400brackets.400!400!=(14)(69)(396399)(5.10400)=580(14)(69)(396399)80brackets.80!80!=(14)(69)(7679)(5.10..80)=516(14)(69)(7679)16brackets.16!16!=(14)(69)(1114)(16)(5.10.15)=53(14)(69)(1114){(16).3!}=53(14)(69)(1114)3brackets(96)Total499brackets(asmanyastherearezeros)2000!=5499{(14)(69)(19961999)}×{(14)(69)(396399)}×{(14)(69)(7679)}×{(14)(69)(1114)}(96)p=2000!2499.5499=(12499){(14)(69)(19961999)}×{(14)(69)(396399)}×{(14)(69)(7679)}×{(14)(69)(1114)}(96)p={(142)(692)(199619992)}×{(142)(692)(3963992)}×{(142)(692)(76792)}×{(142)(692)(11142)}(96)Now,weknowthatorcanprovethat(5k+1)(5k+2)(5k+3)(5k+4)22(mod10)
Commented by Tinkutara last updated on 13/Jun/17
We have last non-zero digit of n!  = 2^A  × A! × B!  where A = [(n/5)] and B = remainder  when n is divided by 5.  Last non-zero digit of 2000!  = 2^(400)  × 400! × 0! = 2^(400)  × 400!  Last non-zero digit of 400!  = 2^(80)  × 80!  Last non-zero digit of 80!  = 2^(16)  × 16!  Last non-zero digit of 16!  = 2^3  × 3! × 1! = 48 ≡ 8  Last non-zero digit of 2000!  ≡ 6 × 400! = 6 × 6 × 80! ≡ 6 × 80!  ≡ 6 × 6 × 16! ≡ 6 × 16! ≡ 6 × 8 ≡ 8  Similarly last non-zero digit of 1000!  = 2^(200)  × 200!  Last non-zero digit of 200!  = 2^(40)  × 40!  Last non-zero digit of 40!  = 2^8  × 8!  Last non-zero digit of 8!  = 2^1  × 1! × 3! = 2 × 6 ≡ 2  Last non-zero digit of 1000!  = 6 × 200! = 6 × 6 × 6 × 2 ≡ 2
Wehavelastnonzerodigitofn!=2A×A!×B!whereA=[n5]andB=remainderwhennisdividedby5.Lastnonzerodigitof2000!=2400×400!×0!=2400×400!Lastnonzerodigitof400!=280×80!Lastnonzerodigitof80!=216×16!Lastnonzerodigitof16!=23×3!×1!=488Lastnonzerodigitof2000!6×400!=6×6×80!6×80!6×6×16!6×16!6×88Similarlylastnonzerodigitof1000!=2200×200!Lastnonzerodigitof200!=240×40!Lastnonzerodigitof40!=28×8!Lastnonzerodigitof8!=21×1!×3!=2×62Lastnonzerodigitof1000!=6×200!=6×6×6×22
Commented by RasheedSoomro last updated on 13/Jun/17
I don′t know that formula!
Idontknowthatformula!
Commented by RasheedSoomro last updated on 13/Jun/17
Continue from my  above answer  Sorry that there was no space and my few lines   couldn′t be included in the above answer.  I write them below             So each bracket is congruentto 2(mod 10):              ((∗.∗.∗.∗)/2)≡2(mod 10)   [499 congruences).....(i)                   96≡6(mod 10).......................................(ii)   (i)×(ii):  p≡2^(499) .6(mod 10)          p≡8.6(mod 10)   [∵ 2^(4k+3) ≡8]]          p≡8(mod 10)     Hence the last non-zero digit of 2000!=8
ContinuefrommyaboveanswerSorrythattherewasnospaceandmyfewlinescouldntbeincludedintheaboveanswer.IwritethembelowSoeachbracketiscongruentto2(mod10):...22(mod10)[499congruences)..(i)966(mod10)(ii)(i)×(ii):p2499.6(mod10)p8.6(mod10)[24k+38]]p8(mod10)Hencethelastnonzerodigitof2000!=8
Commented by mrW1 last updated on 13/Jun/17
Great job done!
Greatjobdone!
Commented by mrW1 last updated on 13/Jun/17
To tinkutara:  Your solution is fantastic!  How did you get the solution? Is it a  method developed by yourself? Can  you supply more details about the  method?
Totinkutara:Yoursolutionisfantastic!Howdidyougetthesolution?Isitamethoddevelopedbyyourself?Canyousupplymoredetailsaboutthemethod?
Commented by Tinkutara last updated on 14/Jun/17
I checked the method on internet. You  can type “last non-zero digit of a  factorial” on Google to get the formula  but I don′t know its proof.
Icheckedthemethodoninternet.YoucantypelastnonzerodigitofafactorialonGoogletogettheformulabutIdontknowitsproof.
Commented by mrW1 last updated on 14/Jun/17
thanks!
thanks!

Leave a Reply

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