source("http://macosa.dima.unige.it/r.R") # If I have not already loaded the library ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ## 105! n = 105; y = 0;z = 1;j = 1; while(j<=n){y<- add(y,1); z<- pro(z,y); j<-j+1} z # "108139675824029090050410130580032964972064610777490257914417663657322 # 653190990515332698453652680824033977639893487202965799387290781343681 # 6097280000000000000000000000000" nchar(z) # 169 # n = 105; y = 0;z = 1;j = 1; while(j<=n){y<- add(y,1); z<- pro(z,y); j<-j+1} n=1;k=0;h=35; while(n<nchar(z)) {cat(char(" ",h),substr(z,n,n+k),"\n"); k=k+2;n=n+k-1;h=h-1}; for(i in 1:3) cat( char(" ",34),"###","\n") # 1 # 081 # 39675 # 8240290 # 900504101 # 30580032964 # 9720646107774 # 902579144176636 # 57322653190990515 # 3326984536526808240 # 339776398934872029657 # 99387290781343681609728 # 0000000000000000000000000 # ### # ### # ### # # If you wait a minute ... n = 508; y = 0;z = 1;j = 1; while(j<=n){y<- add(y,1); z<- pro(z,y); j<-j+1} nchar(z) # 1156 n=1;k=0;h=35; while(n<nchar(z)) {cat(char(" ",h),substr(z,n,n+k),"\n"); k=k+2;n=n+k-1;h=h-1} # This tree (obviously) does not have "0" only in the base. # 5 # 119 # 90692 # 7755879 # 266003615 # 25819185379 # 7984360677298 # 470133958906714 # 46011174633964398 # 5839112233165772956 # 548496166254935516795 # 14565079522588677608012 # 6423489045662147453126349 # 825790036437158643266482002 # 88113505694916924243929121639 # 7995123320680205388149829536720 # 697546589338105120020005674705145 # 28641409978978956631664608452253922 # 2182139322091260889711710217500934598 # 659546487929459214735007200769105667735 # 54074289548655659977226200540160335058131 # 8365384235510714071491098835812736588922795 # 511456461421254773804907853073384484888784090 # 75030962875912509521999525292598359880846423952 # 3931204111818280979213544777644751538435208774603 # 088477116032223651164439419220002073567325180151958 # 35354728897604905269289015307797618984464654042934912 # 7882733479825616955531216107050271401259459875249508169 # 440013327395316887000833911764483284987619075088343797786 # 47371945157918046252226969546616811434035461815792968273198 # 2545625613705049834238544557702694536385292145346080336071424 # 289160111720849018903249047529128422886467764267877861568498090 # 42964480000000000000000000000000000000000000000000000000000000000 # 0000000000000000000000000000000000000000000000000000000000000000000 # # Try to get this representation of a particular factorial number as a hexagon with # 17-digit sides. # 17108972589718074 # 1439528307936299026 # 080765545554532458183 # 43255130543516432376912 # 4663791911119657860822050 # 367340495642348613717749611 # 38104459104482535212494659899 # 5225079402598873366451131040234 # 240130493689852679573590918519290 # 66647636392705738600295487428650940 # 0535103538524596394743595531728001643 # 083783948745781956212836911156587085000 # 40781396853030778257813849856692950471963 # 5089328018573725755534194119396813233357487 # 709737509271413007324171020350516977549843435 # 61187933295519151457453789138048055187827977590 # 7750007855795139817496078270462761613125177420579 # 97170554688538703689036095806399241086011592997 # 020790226888203087101533653915806041722653430 # 0377642434651424325601245917031000886439794 # 86942002854170097571338930915447098888372 # 333024657251637441276280296188483408232 # 2723195014038951851520634322622612616 # 12431271509190879459978732133255390 # 601413833379281814639023615443036 # 2338368861798856260050552801204 # 22598617062894203619648023806 # 809643832836096000000000000 # 0000000000000000000000000 # 00000000000000000000000 # 000000000000000000000 # 0000000000000000000 # 00000000000000000 # [ see here ] # These examples are taken from the column that Martin Gardner held on Scientific American.