All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Curious Consecutive Cyphers (Posted on 2008-11-25) Difficulty: 2 of 5
Each of the last T digits in the decimal representation of the product of 1!*2!*3!.....99!*100! is zero, but the (T+1)th digit from the right is nonzero.

Determine the remainder when T is divided by 1000.

Note: Try to derive a non computer-assisted method, although computer program/spreadsheet solutions are welcome.

See The Solution Submitted by K Sengupta    
Rating: 2.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 3 of 5 |

The number of trailing zeros will equal the number of times 5 appears as a factor in the final product, as 2's will be more plentiful.

As a first stage, we'll consider how many times in a given factorial a multiple of 5 goes into that factorial, such as just 5, or 5 and 10, or 5,10 and 15, etc.

At the second stage we need to consider that some of the factorials will have multiples of 25.  As they are multiples of 5, they will have been counted once in the first stage, but need to be counted one more time each, as each accounts for two factors of 5 in the final answer.  We don't need a third stage, as 125 never comes up in factorials up to 100!.


Stage 1:

which #'s factorial  times in each   how many   total
5 - 9                    1              5         5
10 - 14                  2              5        10
15 - 19                  3              5        15

...

95 - 99                 19              5        95
100                     20              1        20

Lines 1 - 19 above account for 19*20/2 * 5 = 950, so the total for stage 1 is 970.


Stage 2:

which #'s factorial  times in each   how many   total
25 - 49                  1              25       25
50 - 74                  2              25       50
75 - 99                  3              25       75
100                      4               1        4

These add up to 154.

The total is therefore 970 + 154 = 1124, whose remainder mod 1000 is 124.

Computer verification:

 5   T=1:base=10^2000
10   for I=1 to 100
20    T=(T*!(I))@base
30   next

prints the last 2000 digits of the number:

 2814743846131301960729103356288516586256947902721520493879823498377803819225035
77826702544753164886750394867878359662355724507775936174257950055893717915843378
12875284631159728936756488778954210507600331311151494052761155957457646092003975
90716143404695331463672493236669492358660095676756617468815449875551824013133085
29277884051083168608395243891465920703527660132635548148553165604839302691611095
55115598599074606380419346706281687122756139236272334874636515742846732426249189
29529412607718318038653762807057730443195511367264496490819196690976438391589808
39673527659071144056255673631468678722277971141858693797768385127860748441368263
33346246190407373179258963078361749956016699370455403337036996087663326855986830
35025973316356315674895391841364636074082077313551770157761712951184766590075177
98131708995179264232977509204270289747005402242518037987807008294989723598848000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0

There are 14 rows of 80 zeros plus 3 on the line before and 1 on the next line, for a total of 1124.

Also, for the curious: MIRACL Calc gives the whole number as:

27031768576517499710558090027596232298558093274311372898878080715359180165112031
92430745615846524837281877965192519547242721319043018325169310301931868967540643
14636336565956356312445318234895459814650063457694775386003534187336458680650104
08042273812281857257966951771254299784907532174172675261042904443735033006827062
36778173493240290638006467655691485330011773845402913858411465364146099987929711
07248285578361460512735635185296745657732007210556786440256146238834812375648946
28859759852397473591728651044381377039700592548741212705965716337933203079627369
26209714294067025831911541041901708864208596321666458768752855221418838604709774
83413478260824926725758719163597242888329574231309601634465772012970300810368195
56978682525116845551863481353447203913609105954470434446731819716372893950027080
53776526038788649748707391188333733588816329612086059297012947441482071618624236
11135988518774306790531853022907113671006921381193655357496123978122118708954213
00661971739287030299385145794712666816403151658293555299062759180558560552120065
73335985642451371095025560051530906923476102408031508391293688005954319419696700
27750573911439325191780646449295619341707000177257947490657835366048695329722167
29771869515017257460764744205293736768850910844817317789760525673651462286969218
05191278304080317350286859334301998665192886284986617130635590172759039508366671
07086342982683979914172377198293527050000187166988831711208485886557984561887523
17306393075998430051287601872760427292416532717472158265481963073016090468249993
68688213299225131493184437781262532487305838868519552740773789186747335272711155
03361964542028872999048479776540103296507470121421437410170274533761468313384556
08413252873927221734647038025714766776152183177488678194636943158142340296086335
99174191164166761332146194363811254653942551220731704520312562726502005923544842
26488412926464250062010441856848621055747269953050315075415493705687224027918534
20112332280884916208713251458554365777660881201931186067005132165233655598425788
27753350118214224351849231891524367465109857971730903623200901737727610030131893
99204885905573045326790744617557179216123899953440718447397032345719199566328080
14778170148649586922770228743618307005560442586998801940863559279122530838019077
28033576990057498767073563782287469258373472899299682869394734246293245657368952
51504236909894050964735769846859410210914361235760266749562663433119996864692506
83711889792780188010000923545083693616512431299553430423319151799092729329012624
79194240848255121642293665462038958840930785647155325545917420948854172079772476
43928789402951531251394269178443480143247171017122399482759113314513506255030799
13906081322162453194924075795374300445602930241718494950581280344647070513379468
66001874966676677933798271430791857849065185862315553175343634193923031371621108
82056537588038562114245119424461786161239196321586812093407662648436079181907111
95995769497888074300126090980893407856203416039961905820434437338769169809988554
94051498494077188351066933592215965226094349540391408233590165480330071635742331
10076720709478569376146123344025455777316135455888751337560280022533926125250178
82998610886274897113627550258742450493613087049732151945364827840949182968966809
15760065909942083295976297734855640033279573335766887567170128208932374855044247
64124069323911108820627399626525024382875010796885736339986584989320120423860864
26239238190775121738551066893598665935774455519152157588419955426909632953255225
94414754686692674264643003599275535383376806354178268425133780941960260847711464
35066774964799840510519597652773438152490596634012188249819523969133086597657206
98334997196469642114605784797650509426457220495304067174165545766010632963921930
39492327562587891925104770131243101602386778121090770547039106437549341643107353
72104825239197655045027533293444926202961463847359407615889974303054554470962079
37391309074448688892666491670891709155822800892901929566779139684433502227476274
01951537089488766480892968651867475549208869007056385546152229481814724380376495
40053669840530068127131126032909944816787535722142055394929041165731570535386655
42029486197003757482662830062120635456960276391311596048447813899284882862556031
29826479768237355662844461964265332432885676789484830341406616197694815544922098
80758513751326398774755109237791432074048823410988991352369647941838207035070662
67800973792432111245784381086462014399154907268442765473783291278952434015025195
69958065946570342607659633790262993423968134302796490007265371032283229222743016
18581208301765561446392193493904232903108740309423206747998548157751484010320114
14853381341522616342671480892280541482672772691715237914427732529513973227685560
10242419477530056566052252015919704031525621127308176552011886893502395670009792
55537747478112682709916534868954877256632775752861030509773615848960062886356692
10151264444972709370572481075509070029875071185160529111621252142202673338305550
36019207093303065134403780316668192566918466894459285904966942814743846131301960
72910335628851658625694790272152049387982349837780381922503577826702544753164886
75039486787835966235572450777593617425795005589371791584337812875284631159728936
75648877895421050760033131115149405276115595745764609200397590716143404695331463
67249323666949235866009567675661746881544987555182401313308529277884051083168608
39524389146592070352766013263554814855316560483930269161109555115598599074606380
41934670628168712275613923627233487463651574284673242624918929529412607718318038
65376280705773044319551136726449649081919669097643839158980839673527659071144056
25567363146867872227797114185869379776838512786074844136826333346246190407373179
25896307836174995601669937045540333703699608766332685598683035025973316356315674
89539184136463607408207731355177015776171295118476659007517798131708995179264232
97750920427028974700540224251803798780700829498972359884800000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000

a 6941-digit number.


  Posted by Charlie on 2008-11-25 16:44:29
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information