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

Home > Just Math
Find the remainder (Posted on 2015-01-09) Difficulty: 3 of 5
A. Determine the remainder when 5^(5^5) is divided by 13.
B. Determine the remainder when 9^(9^9) is divided by 41.

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 re: possible solution (spoiler) -- computer confirmation | Comment 2 of 3 |
(In reply to possible solution (spoiler) by broll)

Part A done two ways. Part B only the second way, as full evaluation results in overflow on 9^(9^9), and only modular arithmetic would work.

a=5^(5^5)
OK
?a @ 13
 5
OK
inner=modpow(5,5,13)
OK
outer=modpow(5,inner,13)
OK
?outer
 5
OK
inner=modpow(9,9,41)
OK
outer=modpow(9,inner,41)
OK
?outer
 9
OK

BTW, 5^(5^5) is

 1911012597945477520356404559703964599198081048990094337139512789246520530242615
80301205938651973985026558644015579446223535921278867380697228841014691598660208
79618967571957018392816603380476112259755336261010014826511234131477682524114930
94447176965282756285196737514395357542479093219206641883011787169122552421070050
70906467438287085144995025658619446154318351137984913369177992812743384043154923
68555267835963741021053315460313537253257486369091597786903282664591829838152302
86936572873691422648131291743762136325730321645282979486862576245362218017673224
94056764281936007872071383707235530544635615394640118534849379271951459450550823
27492216058489129109451899599486861995431476669380130371761635925944797461642200
50885079469804487133205133160739134230540198872570038329801246050197013467397175
90902738949392381731578699684589979478106804282243609378394633526542281570430283
24423855150823164909672857121717081232327904818172683275101127467823174109858886
83708522000711733492253913322300756147180429007527677793352306200618286012455254
24306100689480544658470482065098266431936096038873625851074707434063628697657670
26992586499535579763181739025508913312232947439303439561613283340728316634982581
45226862004307799084688103804187368324800903873596212919633602583120781673673742
53332287929690720549059562140688882599124458184237959786347648431567376092362509
03715117989414242622702200662864868678687101829808728025606931019492808308250441
98424796792058908817112327192301455582916746795197430548026404646854002733993860
79859446596150175258696581144756851004156868773090371248253534383928539759874945
84970500382250124892840018265900562512861876299380444073401423470620557853053250
34918189589707199305662188512963187501743535960282201038211616048545121039313312
25633226076643623668829685020883949614283048473911399166962264994856368523471287
32947966808845094058939511046509441379095022765456531330186706335213230284605194
34381399810561400652595300731790772711065783494174642684720956134647327748584238
27489966875505250439421823219135722305406671537337424854364566378204570165459321
81540535483936142506644985854033074664685418901481343477146503150379541757786228
11776585876941680908203125

and when divided by 13 is this:

 1470009690727290400274157353618434307075446960761611028568855991728092715571242
92539389183578441526943506649242753420171950708676051831305560646934378152815545
22783821209197706456012771831135470969042566354623088328085564716521294249319177
64959366896371350988612875011073351955753148630158955294624451668555809554669269
77620359567913142419226942814322650887937193183065317976290763702110295417811479
75811744489202877708502550354087336348659604899301229066848678972762946029347925
28412748364378017421639455187509335635177170496371522682201981727201706167440942
26197510986104621440054910544027331188181242611261629642191830209193430346577556
36532473891145483930347615076528355381101135899523177209047412250726767278186308
08373138053695759333234717815953180177338614517361567946000958500151548821074750
69925183807224909024291307449684599598543695601725853367995871943494062746484833
26479888577556280699748351632090062486406080629363602519308559590633210853737605
25929632308239794994041471786385197036292637698098213687194081692783296932657887
87927769761138880506515755434690974178412381568364327577749774949279714382813592
51532758845796599817832106942699164086333036491771876585856371800560243565371216
50174509234082922372837002926297975634462233748920163784333540448554447441287494
25640221484377477345430432415914525076249583218644584451036652639667212378740391
56703936914934032786694000509896052829759309099852867712005331553456006390961878
44942151378506852936240251686385735063782112919382638883097234343733848256918354
46045728150884750198997370111351423849351437517761824037118103372252722892211496
80746538755577019148338475589154278856047597153369572364154941131246582963887115
65321684299774768696663221933048605770571950738678616183239704652727016184087163
27410173905110479745253603862218422780217729595316460897663280765274129633439451
79190743699111610814568854651161108753150017511889639484759004873240946372773226
41831846008124154348150231332146748239281371918595878988246889334344098268141721
74992282211927115722632171707027478696466670413336480657203512598618900127276401
39646565756873955774342296810794672818988783770370264213189617807984262890604790
8598198913610898531400240.3846153846153846153


  Posted by Charlie on 2015-01-09 10:45:34
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 (13)
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