In this article, we will cover instances of large numbers in combinatorics.
Factorials
The number of ways of arranging a set of objects is equal to the factorial of the number objects in the set.
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
7! = 5040
8! = 40320
9! = 362880
10! = 3628800
Permutations and combinations
The number of ways of choosing m objects out of a set of n is equal to (n!)/(m!)((n-m)!), usually denoted mCn. For example, the number of ways of choosing 4 objects out of a set of 6 is (6!)/(4!)(2!) = 720/48 = 15. In fact, mCn is equal to the (m+1)-th number in the n-th row of Pascal's triangle not including the topmost 1.
0C1 = 1, 1C1 = 1
0C2 = 1, 1C2 = 2, 2C2 = 1
0C3 = 1, 1C3 = 3, 2C3 = 3, 3C3 = 1
0C4 = 1, 1C4 = 4, 2C4 = 6, 3C4 = 4, 4C4 = 1
0C5 = 1, 1C5 = 5, 2C5 = 10, 3C5 = 10, 4C5 = 5, 5C5 = 1
0C6 = 1, 1C6 = 6, 2C6 = 15, 3C6 = 20, 4C6 = 15, 5C6 = 6, 6C6 = 1
Partition function
The number of partitions of a number is equal to the number of ways that number can be written as a sum, each time with distinct addends. For example, p(4) is 5 since there are 5 ways that 4 can be so expressed: 3 + 1, 2 + 2, 2 + 1 + 1, 1 + 1 + 1 + 1, and simply 4. Below are the first values of p(n).
p(0) = 1
p(1) = 1
p(2) = 2
p(3) = 3
p(4) = 5
p(5) = 7
p(6) = 11
p(7) = 15
p(8) = 22
p(9) = 30
p(10) = 42
The sequence of partition numbers continues 56, 77, 101, 135, 176, 231, 297, 385, 490, 627, 792, 1002, 1255, 1575, 1958, 2436, .... For higher but still relatively small values, this function produces very large numbers. Below are selected larger values of the function.
p(50) = 204226
p(100) = 190569292
p(500) = 2300165032574323995027
p(1000) = 24061467864032622473692149727991
p(2000) = 4720819175619413888601432406799959512200344166
p(5000) = 169820168825442121851975101689306431361757683049829233322203824652329144349
p(10000) = 36167251325636293988820471890953695495016030339315650422081868605887952568754066420592310556052906916435144
p(100000) = 27493510569775696512677516320986352688173429315980054758203125984302147328114964173055050741660736621590157844774296248940493063070200461792764493033510116079342457190155718943509725312466108452006369558934464248716828789832182345009262853831404597021307130674510624419227311238999702284408609370935531629697851569569892196108480158600569421098519
p(1000000) = 1471684986358223398631004760609895943484030484439142125334612747351666117418918618276330148873983597555842015374130600288095929387347128232270327849578001932784396072064228659048713020170971840761025676479860846908142829356706929785991290519899445490672219997823452874982974022288229850136767566294781887494687879003824699988197729200632068668735996662273816798266213482417208446631027428001918132198177180646511234542595026728424452592296781193448139994664730105742564359154794989181485285351370551399476719981691459022015599101959601417474075715430750022184895815209339012481734469448319323280150665384042994054179587751761294916248142479998802936507195257074485047571662771763903391442495113823298195263008336489826045837712202455304996382144601028531832004519046591968302787537418118486000612016852593542741980215046267245473237321845833427512524227465399130174076941280847400831542217999286071108336303316298289102444649696805395416791875480010852636774022023128467646919775022348562520747741843343657801534130704761975530375169707999287040285677841619347472368171772154046664303121315630003467104673818
p(10000000) = 92027175502604546685596278166825605430729405281023979395328576351741298526232350197882291654710333933219876431112892669442996519201446933718057425885425510196566971369272243936886123704944390011846626724222935883880949646021554674211449712293631879438242092222979701858787035045131791561718499094276679781015502944193307504577212918898104161448934354538420643899518683659226259312517022343012768006249066347774384224200200491423135789948628712467862610060006610227873354093344771970346402912468019502617741296485750068965727678736574879683519236357061319134860914524427627076446580477740857594944050855144756641881148963046419111504530928013165254773178279374714115048498031936743061146399094602347281946619566715867818368113040887581799683872172944577575391666322871295451048112070492385908727524159239222366587691028630013147462129464573569940173628469758175515190001641345140899367093190859080267185611792170429465197857968117435299141079155705662249617336911859509285578584413441733816964914269258918743530174261522145886491433067881470395832647408578195566042566460494284912372612048505127243987254597660690323804252237148083121685300106473794690689801747504661946299472005981442948094926764563853171727831538610914056742150737497538427502124024964209080033657278768694168219946346309906686670220404292685540282106667661584147201155740243521818020629234011924167214100674819982674459329845176126920689181532303574746823885977198276651255478126323692431978852519785180336170541394768609366389114772406136683349412746708709224596935940110215929918473383014389065632764805267657590865513593978244244311680854217735536592823219001199569770431572718888108452817614295777255622715362408122265800848932276196267545354426556723347685735897551768373108977390874033016418618266068861412680046926417299574367992118065543824471964711585682146618651730116890773279227432137954488457335074000412015820488115033194548391813526724286716271750346470118187739995800431441608729698516332428256345862484406623639956273335472545741134762782834725659303362718667415197368798040219223371637134331256426629887430519590196027703231191899072357523708159719377437782971846471928181434133277347743728346062720786947891744911516248998265758156411629802345973249527007535170095624359891373084013345497111826508558570667664488643633183476426421938705419176750248730025527079093923132020478303851642054200888831310378483811088425548758508373324093873479730273437693679342081086702018520971877967092726990888474755041255077282275352308667980953624552474645295774554823817830271752015905175487656200680986962732503598211618667111264793583287147032328796244469851598884862190118775508811358918545701650113647140734902415801399931326365622784208807398682277421689531141855076998289838068746126554377321750652288128533274971246389513818051037817849704769088911818484659276794986806465634286299339344423718490667472287384981129496643999747556606122301402027411096367172771385437211572122448922846957076711812454645572143320128971630906382167345381586565940316748316082706877584540948496188398233399350019423833682423300814059493159013417591894979385650634324308841947277121816559279335938926911510683549043290690287102733571315222761846482615431786061813454633634415974179413942024706129986725734471552346167738613509470760758338637870579921007168514417341548481513953296373455058614174692678013759737246724696931125240457406888289154055030387593548942880549262383621259594080699698643245355453826567378500963781681659096276126857969078217677288980
Now we're talking! p(10000) is already about 36,100 times a googol, and p(100000) is too large to represent in the commonly-used double-precision floating point format used by many computer programs. The largest value of the partition function that has been computed is p(10^20), a number of 11,140,086,260 digits! Below are the first and last 1000 digits of this number.
1838176508344882643646057515196394970366128860187133818794921830680916179355851922605087258953579721402235633224456937660150173210985011015389560189705675070488175779460536089795922056269295721196009779165931101694124929410280437321791578706853243973223430949305487002534369595607766783702969078813683773327243626773056724244033928819697409579276974001925654844091988401959507036970411771619993123017556576699499703639352780423628794200606933860427601326292882795822460679712281660521856800492591112629907354977685310316372900346545431298736807328236501330585746929004399578661021503615234274693509085939944016314894644862943875273013057475497853803193701800260362511405139309272932783176699960093172447220890874993045051138279849458962667879522811163246147461606407604278467330745931918330980821705362780971602345567755068535553357149769564868882234065992667037532820609756544696060404064002775933257361593664224799922137653442816203637274506186159990865952198639022438268000053417742912214985581755......7819722401016277869662507148156777325161057273894498214946475632569813210181967142533195900338936713007292102247718078145221421982361955542600025548545568519369089487604335324089275954428488499952636517052321124780138610958503741195160905409982613603990124360180767260351768872458141225892752595115057675090872160888059439017763034594281216869160919442278684582644873256506162684010823277784461258669330493386203743356008587233831856792973780025235653524278053298692591901481115885415126076407671876912107459394370915408731078173696015862413625559934643572212607337725910497327173311011572748657859969736573834145949618391464764861638302361640700392660829384832774130551031058595191226473452491491856864435135701733925722788531859356913549177654966813618596988429638525217032420899278604152048306078638273697959512945079613267334079249909549771893343245886093605453423742683322479261116404608565816259597661250174602479861524302262001955970770703287582462984472325700899198905833521126231756788091448