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

 Duplicate Digit Determination III (Posted on 2010-12-23)
(I) Each of x and y is a positive integer with x < y such that, reading from left to right, the last three digits in the base ten expansions of 1978x and 1978y are congruent.

Determine the minimum value of x+y.

(II) What is the minimum value of x+y - if, keeping all the other conditions in (I) unaltered, the last four digits in the base ten expansions of 1978x and 1978y are congruent?

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution Comment 1 of 1
`DEFDBL A-ZDIM had%(999)v = 1FOR i = 1 TO 10000  v = (v * 1978) MOD 1000  IF had%(v) > 0 THEN    PRINT had%(v), i, v    END  END IF  had%(v) = iNEXT`
`and the similar program for part 2:`
`DEFDBL A-ZDIM had%(9999)v = 1FOR i = 1 TO 10000  v = (v * 1978) MOD 10000  IF had%(v) > 0 THEN    PRINT had%(v), i, v    END  END IF  had%(v) = iNEXT`
`find, respectively,`
` 3             103           352 and   4             504           256`

Interpreted, this means that for part (I), the lowest x is 3 with y being 103, for a total of 106.  For part (II), the lowest x is 4 with y being 504, for a total of 508.  The matching digits in the first instance are 352, and in the second case 0256, with the zero not appearing in the program output as leading zeroes are not shown for numeric values by the basic interpreter.

Of course these are just the lowest, from 3 on and from 4 on, respectively the matches occur with any difference of y and x of 100 and 500 respectively, but of course with different sets of 3 or 4 trailing digits. That is there is a cycle of 100 in the first case and 500 in the second.

UBASIC confirms the above findings while giving the whole values of the powers:

`1978^3 is 7738893352`
`1978^103 is 3245694113774954778728642579697330790826430286814377973924914348349172177691212790769300262685599810266711747297442395388695543347133112053323874979641297353915368099643308896209538189133466850891955937819625471616597048762535229892714999678772716316673743259286605339715498711285462611923097914966231058794697896139243678438050112682852352`
`1978^4 is 15307531050256`
`1978^504 is 198631800655193443732150001857291161267898950426985497728934217548847744714298368599780343219575999273862189077054397060229198922510771313880830316036174065804621233015866220254201532940150886266143639504131681136737731700329135695224780781830301843167813519043203339990765595204878956567810589550752024452498792642784739491014131199426035041457022351592453507588504578138734401208639115342695509850278805017534401936253183935794655080356611398918894727102168385920943527063934150630412735328418866961721195023947794911403578008975073329276999472998186230952458178233705955701219621871828398977936908978130918931136562497081376732260341236026734407713309284612377505876126817127081683714133951895540083312030403449889340302933606711462861305664039574557148566408189169140437386932345807103760582949262769290187221635822400730117872558265200131893956805150569297035782117458015526057465764311659301774825495294659544569743798178727976306672148159178732063585445822047359669378592925297707135834889572698470128175925236611476344845744410782920716817053795768097294698240471377282408267898161876627088388330782828570547247518384277610164485666940859138264272500387264336587602463667608407576800109181508474645758954668200408288344500718075248550051647700774531050026054352872235264003674733033306624226642606063877743500997878447391081590407690537731099078321173927288946585882426924941498578931439970204432205049816993168849216762046168999030093201889596301889828322483784836285153174067295050803744373828042203108951608963549387594854931773850419698710633973036564867498806736915756982449386616567527455348736133950487858847994280874992538456499916365590750560256`
` `

 Posted by Charlie on 2010-12-23 15:29:58

 Search: Search body:
Forums (0)