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

Home > Just Math
Duplicate Digit Determination III (Posted on 2010-12-23) Difficulty: 3 of 5
(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?

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

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
DEFDBL A-Z
DIM had%(999)
v = 1
FOR i = 1 TO 10000
  v = (v * 1978) MOD 1000
  IF had%(v) > 0 THEN
    PRINT had%(v), i, v
    END
  END IF
  had%(v) = i
NEXT
and the similar program for part 2:
DEFDBL A-Z
DIM had%(9999)
v = 1
FOR i = 1 TO 10000
  v = (v * 1978) MOD 10000
  IF had%(v) > 0 THEN
    PRINT had%(v), i, v
    END
  END IF
  had%(v) = i
NEXT
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
 3245694113774954778728642579697330790826430286814377973924914348349172177691212
79076930026268559981026671174729744239538869554334713311205332387497964129735391
53680996433088962095381891334668508919559378196254716165970487625352298927149996
78772716316673743259286605339715498711285462611923097914966231058794697896139243
678438050112682852352
1978^4 is 15307531050256
1978^504 is
 1986318006551934437321500018572911612678989504269854977289342175488477447142983
68599780343219575999273862189077054397060229198922510771313880830316036174065804
62123301586622025420153294015088626614363950413168113673773170032913569522478078
18303018431678135190432033399907655952048789565678105895507520244524987926427847
39491014131199426035041457022351592453507588504578138734401208639115342695509850
27880501753440193625318393579465508035661139891889472710216838592094352706393415
06304127353284188669617211950239477949114035780089750733292769994729981862309524
58178233705955701219621871828398977936908978130918931136562497081376732260341236
02673440771330928461237750587612681712708168371413395189554008331203040344988934
03029336067114628613056640395745571485664081891691404373869323458071037605829492
62769290187221635822400730117872558265200131893956805150569297035782117458015526
05746576431165930177482549529465954456974379817872797630667214815917873206358544
58220473596693785929252977071358348895726984701281759252366114763448457444107829
20716817053795768097294698240471377282408267898161876627088388330782828570547247
51838427761016448566694085913826427250038726433658760246366760840757680010918150
84746457589546682004082883445007180752485500516477007745310500260543528722352640
03674733033306624226642606063877743500997878447391081590407690537731099078321173
92728894658588242692494149857893143997020443220504981699316884921676204616899903
00932018895963018898283224837848362851531740672950508037443738280422031089516089
63549387594854931773850419698710633973036564867498806736915756982449386616567527
455348736133950487858847994280874992538456499916365590750560256

 

  Posted by Charlie on 2010-12-23 15:29:58
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

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