Last 10000 digits of Graham's number

So, if you didn't know, it's possible to compute the last nn digits of the Graham's number quite easily, by observing the fact that

33=...73\uparrow3=...7,

333=...873\uparrow3\uparrow3=...87,

3333=...3873\uparrow3\uparrow3\uparrow3=...387,

33333=...53873\uparrow3\uparrow3\uparrow3\uparrow3=...5387, and so on.

In fact, if you search on the internet you'll find several people that computed up to 200200 digits, 400400 digits, or 500500 digits.

Now, I admit I was pretty disappointed with this results. I couldn't find anyone that pushed up the calculations! (I may be wrong, in that case show me if anyone else actually calculated more than that)

So, I developed an algorithm that is sufficiently efficient to compute the first 500500 digits in only approximately 22 seconds. With this algorithm, I was able to compute the last 1000010000 digits of Graham's number on my computer, in 16316.516316.5 seconds (approximately 2.22.2 hours).

I'm not entirely sure how, but I'm pretty sure it's possible to make the algorithm much more efficient than that, so that even calculating these digits should happen in a matter of few seconds. If you have any good ideas, tell me below (try it first, if possible).

Either way, here they are (new line every 70 digits):

g64=...3078726077030301309631860565499591166728394144521822940211684925744690830316086262130785618226100420312968346787242002533570716504288288603815278905831777347434889993632217093771887053021613400826231041652609872469522381180520893701095105746695201447806881045566940953003050207963025108931458177782068496837757322945657846959175109945261571525815313383171441763572462779809715173494067855792793530636179937522573612820301473864489406090828511196812234883812826536412935235758505566522273299851386708985575844764837111577945400718863148653461185413076846495408383358058416954122807660380207115535268270916958794751064250768903277826708848390877435531688133831988779505683625673270427786212688069705881027617402863937895213427659682817417461057075479776076397517703824469120630243109151731515546720207203298057792145699917956905186596024469027274217279141430415867319657287140268008652315291316261820652195021921091461070451907392628396743433966206832681974497464193534150297618059752197469899167905539512407496240223067753651132002278170502842273671497491794032802699070161003317178855043208655046184676579497958334888729380961765982723506737351365624129933561592420403366586026376463513644509019651699124680317010358130680488712325198535829916206382631701477832698324585503287762867838791720029901423547073086007824609234282758224908436213000920393765646265795808696449402378032391693584514586845743500193087499932962375893178562196090339426243848085176276584372829470728254599948415970659821958864982353541909598033354078979538256357245359747368737720544909862394110578904843360397740815782128903796684805343101612454474591654101650693961377271882775445851973967815729796266594738946097169571922151724219229759670392571616731391424780277194256133384190907030138393942902314563283858812497613727950277408609617924467961860253763582154973363203811166858264982706857348079908854558691236991819878323695993552951130721247635787520841764173839071101104122258672751922892887196430745328215426144487175008095242123636376813961077749523532016833501424281091368978529043131788135333355110889022359477210715849496037260619984908856098462387682166967457951388588832356929998573679542011111185463440443504567679401356765457595958899512304618723436035217938891962050267508864234897311954162655416856563460135194869521209403751415314099407271948277374441254695053697070411390864858720859625554195903023806062913716913872285547779439802507677323967059172076874746728446540634181380341294304360976602155423367112057390817423461175744118240134002338774237104408010940301648706232749183781478765763754598101538214087714922326451525832690110799166775443442353837481547403100880637946597552737840758546298403351731162182383124376404468239965615920828447876334410730503146643034564958892386400206720157774336643971046097191339778671192707610935976126970111864008832421411157351854252317530184373336024446785108592281094794328081763872749469924679447544621513505367844082852088230997958080227897832298874619826542016735413058821008184742832774323554162170468091396741777275954763659384746126135206252864936155799330878658837275030231698460626243816863158237685462668066944052359344981816230189301309354006700248433587219900315863936527371581966011826743819385582719223648840620249884709395919441012031404522773151579351525369364934250530932709877378035492327740781679794020867401382441063153368792024085513096521839198783970159526194524749783176345096613835421534080777992741043623054920589996619189747939500280803206850527988771449843650854426749054486992798433092391599973744959029957588363427364161563026748153852589303542350028921428192299937990553925840346317974076455080900183501257672002542134775436857784125821479348208852835284734463951445497740069154757001473626293563964115997450637632591207602085065331518191297627524916528283327470445487220431209794181800837524288180786740953625707023916128625574340099420494628683883364612475194501407401023508584105029555399601882357799580811904419558955154139962907362641416032599108674402147606737302706859009869989241966114092477240778997675158599361406185035698654419625238203492758967623899121555785944392474204282770185404329679131806504016165468217196445509364500595583090752015617577969861470976788938740200600298288287888330891308863372281972862545180083840021672484219663987467329507766983318084471821793411710053202996739234042899808568275434578072780336225074554635303452502047026773318085940276837031308524437227254648631365299090852540852736811700598925661498015963926725007451760685374013593406210074607565408138965932473526208240166197001865513821872977219498463169007490827378094264056082839271636552848839603826288292359895120699259424392975074982181643783346324645455176373275765527676059058269397249692453299809233801905518318024634168876185410488177562238555312340229579691441224836406466849925916755964304671002296817244339224792182135995868969341492369077624305677016482250204198347030671629689692261860404690895448588913482752746673155208558714166435817616783248930807373477715001480131315872093173217027881014846523723198056977435033203823397583204572679056665163384206828154569492848663342244546199583745072045676450877888344038541732328611318923259392425497244540048622306304473613061603090378715800584480793579521136958705250576661572845777934961160672813467687918246821951810114282166618678554397096161000939829549388243328046746880694137645419312656040579178637117177943045842310215962335897648040548118226228812074485140806951381912453398593093071760684032101862850540079764837136338089159372055047109287218709931600616189089797830303044417074536501316198946986109934586683395543640840200233990670516429669348600027570319308957395061221345848777985085039705997484485916440720079353674931755601598637467305207478401560537634591003869599679216664024850651519721782927340114931774981619427610553953412145738543869601423476151064120816786711566627026981412394927353467365863136279136411085250120502902295784555371008798209690210670931196912640116890994860631661623029239021952996755265559863920683308147116960714352791663526018457510911413391101513558310051637274156744456218580403883246348766716791121059664036154409810814273381439412995270298928267705768198331834845115763234457634615885581807239488377317241718209142178274565054302349046931657016237345668584450386474453301178678720075637289970867637583657220506249130161043345591395584106522592920559466932557108762130987118532321051966997047256380645130282550404472977237528501803314810564049681573539061785278598760313140865068530080919200003079350549373708348792972286867057375582099597996062271093129807288803111878482656433147839454451681498037635809482736192155807152035358264556188899967678109346697302435416969251647217062623523969036088524240889973797522976568651221236460670088273555025280516268871774300224243017815309613987922755709702214430577903293355670516509347032488336712112602154912437814560556321802522593943710111389180996687955300606304861015768885793044484950849027511010602980361947596378086608486386212232453863272334219615985103607065836952513044125835448079245512173283491219776451454938504120412712653864611628171304512992288612473168928694708607916093810579534245595047488661792705805611638691121214173755533293177242180435450268974174513646191492581846088732360736839010752753812404027329846296602107713217785935317908316720145478172167767818370069254396358778477381821832282338662955759766576352603746962388273497026171846050804164396744639482222660472628009221300684690371447933831170282623828411960337825891780755617449686306276313945559616369461957875659406855496062664521105020034463607863915217661284127324675506287267614824307979892824427531202777481868872501095207565901819379684389119728682001429268365256203155353160310546891685301933822474738169794305170907203165619769535061113213915856256182466140044804883540045325701170695182626343479358841347458693854591319135956029460349123757195642622853715860812551645089626134600907984857847797205307145186514675412317888384738009343344165376733605639874152683883713570219486507495966616743619293364588499805610069710479310067941520844536138309110216300174376549196848839204372584196015037847845160671512017198801157547084883939593053650556078872159994750221442214834826814478727073100136553738357774609850586601264007612942335232625531330739420520078395477497625541118998597728808159458657528099886346722334769804780146302789353612329312586963866559329949214911489134763214665431430327265694776188950386753837203350803435869003867421136731651723621132562479975067702942357050569113050659743526552565536542768895266360391135992668989734244822601493574507744556050638326609473542254360350867485534248461062730568553479479128201952057764356476946631666382295000482800518276153635138000943232486790210617024259440292094849419545367418064519308105163357496871638118822504114501587037019405680648005022576853380553030518336809127181149081753948430026808410437955614810483158354472108503840767238233753543331110316978901699965907036875647695714199517294684058268271081207938885760678089057660597351282040660918730710848399211311795791808916067302977686873493263803825518970122110534818861415848748519200985261065252039482322073711493410839168737854403798603368448472052729248390757866617805529414157119366603081892881936678774148231780172812693498573578327095075857659197494703919315296759666923404880302362447049103531780908226116746950774641912877282443305832395092525499355092526168572459565741317934416750148502425950695064738395657479136519351798334535362521430035401260267716226721604198106522631693551887803881448314065252616878509555264605107117200099709291249544378887496062882911725063001303622934916080254594614945788714278323508292421020918258967535604308699380168924988926809951016905591995119502788717830837018340236474548882222161573228010132974509273445945043433009010969280253527518332898844615089404248265018193851562535796399618993967905496638003222348723967018485186439059104575627262464195387g_{64} = ...3078726077030301309631860565499591166728394144521822940211684925744690\\ 8303160862621307856182261004203129683467872420025335707165042882886038\\ 1527890583177734743488999363221709377188705302161340082623104165260987\\ 2469522381180520893701095105746695201447806881045566940953003050207963\\ 0251089314581777820684968377573229456578469591751099452615715258153133\\ 8317144176357246277980971517349406785579279353063617993752257361282030\\ 1473864489406090828511196812234883812826536412935235758505566522273299\\ 8513867089855758447648371115779454007188631486534611854130768464954083\\ 8335805841695412280766038020711553526827091695879475106425076890327782\\ 6708848390877435531688133831988779505683625673270427786212688069705881\\ 0276174028639378952134276596828174174610570754797760763975177038244691\\ 2063024310915173151554672020720329805779214569991795690518659602446902\\ 7274217279141430415867319657287140268008652315291316261820652195021921\\ 0914610704519073926283967434339662068326819744974641935341502976180597\\ 5219746989916790553951240749624022306775365113200227817050284227367149\\ 7491794032802699070161003317178855043208655046184676579497958334888729\\ 3809617659827235067373513656241299335615924204033665860263764635136445\\ 0901965169912468031701035813068048871232519853582991620638263170147783\\ 2698324585503287762867838791720029901423547073086007824609234282758224\\ 9084362130009203937656462657958086964494023780323916935845145868457435\\ 0019308749993296237589317856219609033942624384808517627658437282947072\\ 8254599948415970659821958864982353541909598033354078979538256357245359\\ 7473687377205449098623941105789048433603977408157821289037966848053431\\ 0161245447459165410165069396137727188277544585197396781572979626659473\\ 8946097169571922151724219229759670392571616731391424780277194256133384\\ 1909070301383939429023145632838588124976137279502774086096179244679618\\ 6025376358215497336320381116685826498270685734807990885455869123699181\\ 9878323695993552951130721247635787520841764173839071101104122258672751\\ 9228928871964307453282154261444871750080952421236363768139610777495235\\ 3201683350142428109136897852904313178813533335511088902235947721071584\\ 9496037260619984908856098462387682166967457951388588832356929998573679\\ 5420111111854634404435045676794013567654575959588995123046187234360352\\ 1793889196205026750886423489731195416265541685656346013519486952120940\\ 3751415314099407271948277374441254695053697070411390864858720859625554\\ 1959030238060629137169138722855477794398025076773239670591720768747467\\ 2844654063418138034129430436097660215542336711205739081742346117574411\\ 8240134002338774237104408010940301648706232749183781478765763754598101\\ 5382140877149223264515258326901107991667754434423538374815474031008806\\ 3794659755273784075854629840335173116218238312437640446823996561592082\\ 8447876334410730503146643034564958892386400206720157774336643971046097\\ 1913397786711927076109359761269701118640088324214111573518542523175301\\ 8437333602444678510859228109479432808176387274946992467944754462151350\\ 5367844082852088230997958080227897832298874619826542016735413058821008\\ 1847428327743235541621704680913967417772759547636593847461261352062528\\ 6493615579933087865883727503023169846062624381686315823768546266806694\\ 4052359344981816230189301309354006700248433587219900315863936527371581\\ 9660118267438193855827192236488406202498847093959194410120314045227731\\ 5157935152536936493425053093270987737803549232774078167979402086740138\\ 2441063153368792024085513096521839198783970159526194524749783176345096\\ 6138354215340807779927410436230549205899966191897479395002808032068505\\ 2798877144984365085442674905448699279843309239159997374495902995758836\\ 3427364161563026748153852589303542350028921428192299937990553925840346\\ 3179740764550809001835012576720025421347754368577841258214793482088528\\ 3528473446395144549774006915475700147362629356396411599745063763259120\\ 7602085065331518191297627524916528283327470445487220431209794181800837\\ 5242881807867409536257070239161286255743400994204946286838833646124751\\ 9450140740102350858410502955539960188235779958081190441955895515413996\\ 2907362641416032599108674402147606737302706859009869989241966114092477\\ 2407789976751585993614061850356986544196252382034927589676238991215557\\ 8594439247420428277018540432967913180650401616546821719644550936450059\\ 5583090752015617577969861470976788938740200600298288287888330891308863\\ 3722819728625451800838400216724842196639874673295077669833180844718217\\ 9341171005320299673923404289980856827543457807278033622507455463530345\\ 2502047026773318085940276837031308524437227254648631365299090852540852\\ 7368117005989256614980159639267250074517606853740135934062100746075654\\ 0813896593247352620824016619700186551382187297721949846316900749082737\\ 8094264056082839271636552848839603826288292359895120699259424392975074\\ 9821816437833463246454551763732757655276760590582693972496924532998092\\ 3380190551831802463416887618541048817756223855531234022957969144122483\\ 6406466849925916755964304671002296817244339224792182135995868969341492\\ 3690776243056770164822502041983470306716296896922618604046908954485889\\ 1348275274667315520855871416643581761678324893080737347771500148013131\\ 5872093173217027881014846523723198056977435033203823397583204572679056\\ 6651633842068281545694928486633422445461995837450720456764508778883440\\ 3854173232861131892325939242549724454004862230630447361306160309037871\\ 5800584480793579521136958705250576661572845777934961160672813467687918\\ 2468219518101142821666186785543970961610009398295493882433280467468806\\ 9413764541931265604057917863711717794304584231021596233589764804054811\\ 8226228812074485140806951381912453398593093071760684032101862850540079\\ 7648371363380891593720550471092872187099316006161890897978303030444170\\ 7453650131619894698610993458668339554364084020023399067051642966934860\\ 0027570319308957395061221345848777985085039705997484485916440720079353\\ 6749317556015986374673052074784015605376345910038695996792166640248506\\ 5151972178292734011493177498161942761055395341214573854386960142347615\\ 1064120816786711566627026981412394927353467365863136279136411085250120\\ 5029022957845553710087982096902106709311969126401168909948606316616230\\ 2923902195299675526555986392068330814711696071435279166352601845751091\\ 1413391101513558310051637274156744456218580403883246348766716791121059\\ 6640361544098108142733814394129952702989282677057681983318348451157632\\ 3445763461588558180723948837731724171820914217827456505430234904693165\\ 7016237345668584450386474453301178678720075637289970867637583657220506\\ 2491301610433455913955841065225929205594669325571087621309871185323210\\ 5196699704725638064513028255040447297723752850180331481056404968157353\\ 9061785278598760313140865068530080919200003079350549373708348792972286\\ 8670573755820995979960622710931298072888031118784826564331478394544516\\ 8149803763580948273619215580715203535826455618889996767810934669730243\\ 5416969251647217062623523969036088524240889973797522976568651221236460\\ 6700882735550252805162688717743002242430178153096139879227557097022144\\ 3057790329335567051650934703248833671211260215491243781456055632180252\\ 2593943710111389180996687955300606304861015768885793044484950849027511\\ 0106029803619475963780866084863862122324538632723342196159851036070658\\ 3695251304412583544807924551217328349121977645145493850412041271265386\\ 4611628171304512992288612473168928694708607916093810579534245595047488\\ 6617927058056116386911212141737555332931772421804354502689741745136461\\ 9149258184608873236073683901075275381240402732984629660210771321778593\\ 5317908316720145478172167767818370069254396358778477381821832282338662\\ 9557597665763526037469623882734970261718460508041643967446394822226604\\ 7262800922130068469037144793383117028262382841196033782589178075561744\\ 9686306276313945559616369461957875659406855496062664521105020034463607\\ 8639152176612841273246755062872676148243079798928244275312027774818688\\ 7250109520756590181937968438911972868200142926836525620315535316031054\\ 6891685301933822474738169794305170907203165619769535061113213915856256\\ 1824661400448048835400453257011706951826263434793588413474586938545913\\ 1913595602946034912375719564262285371586081255164508962613460090798485\\ 7847797205307145186514675412317888384738009343344165376733605639874152\\ 6838837135702194865074959666167436192933645884998056100697104793100679\\ 4152084453613830911021630017437654919684883920437258419601503784784516\\ 0671512017198801157547084883939593053650556078872159994750221442214834\\ 8268144787270731001365537383577746098505866012640076129423352326255313\\ 3073942052007839547749762554111899859772880815945865752809988634672233\\ 4769804780146302789353612329312586963866559329949214911489134763214665\\ 4314303272656947761889503867538372033508034358690038674211367316517236\\ 2113256247997506770294235705056911305065974352655256553654276889526636\\ 0391135992668989734244822601493574507744556050638326609473542254360350\\ 8674855342484610627305685534794791282019520577643564769466316663822950\\ 0048280051827615363513800094323248679021061702425944029209484941954536\\ 7418064519308105163357496871638118822504114501587037019405680648005022\\ 5768533805530305183368091271811490817539484300268084104379556148104831\\ 5835447210850384076723823375354333111031697890169996590703687564769571\\ 4199517294684058268271081207938885760678089057660597351282040660918730\\ 7108483992113117957918089160673029776868734932638038255189701221105348\\ 1886141584874851920098526106525203948232207371149341083916873785440379\\ 8603368448472052729248390757866617805529414157119366603081892881936678\\ 7741482317801728126934985735783270950758576591974947039193152967596669\\ 2340488030236244704910353178090822611674695077464191287728244330583239\\ 5092525499355092526168572459565741317934416750148502425950695064738395\\ 6574791365193517983345353625214300354012602677162267216041981065226316\\ 9355188780388144831406525261687850955526460510711720009970929124954437\\ 8887496062882911725063001303622934916080254594614945788714278323508292\\ 4210209182589675356043086993801689249889268099510169055919951195027887\\ 1783083701834023647454888222216157322801013297450927344594504343300901\\ 0969280253527518332898844615089404248265018193851562535796399618993967\\ 905496638003222348723967018485186439059104575627262464195387

Note by Aldo Roberto Pessolano
6 months, 3 weeks ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Sort by:

Top Newest

Update: I just found a site that lists exactly the same digits, so I'm definitely not the first to have calculated this digits. Still, the efficiency question remains.

Aldo Roberto Pessolano - 6 months, 3 weeks ago

Log in to reply

what's the algorithm?

Jaydev Singh - 6 months, 1 week ago

Log in to reply

The most efficient algorithm I thought for now is just one line on Mathematica:

calc = 3; Do[calc = PowerMod[3, calc, 10^i], {i, 1, 500}]; calc

This computes the latest 500 digits correctly in roughly 0.7 seconds on my computer. For 1000 digits, it takes 6.2 seconds. The main problem with this algorithm is that it gets progressively much slower since it computes all the already computed digits with every calculation. There must be a way to avoid recomputing all the digits every time, for example to get the 1001st digit pretty much instantly just by knowing the latest 1000 digits, but I can't quite figure out how.

Aldo Roberto Pessolano - 6 months, 1 week ago

Log in to reply

Testing Math Editor: π \pi

Brett Washbrook - 5 months, 2 weeks ago

Log in to reply

Booya! eiπ+1=0e^{i \pi} +1 = 0

Brett Washbrook - 5 months, 2 weeks ago

Log in to reply

hi

Irina Richards - 6 months, 1 week ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...