Duplicate+Birthdays

Duplicate Birthdays

No duplicate birthdays? How likely is that? Rik did a little Smalltalk in a workspace:

pMiss _ 1. people _ 1. [people <= 40] whileTrue: [ pMiss _ (366 - people)/366 * pMiss. people _ people + 1. Transcript print: people; tab; print: pMiss asFloat; tab; print: pMiss; cr; endEntry. ].
 * people pMiss |

Number of people ......P(No duplicates) P as an exact fraction

2 0.9972677595628415 (365/366) 3 0.9918182089641375 (33215/33489) 4 0.983688551513612 (4019015/4085658) 5 0.97293785696155 (727441715/747675414) 6 0.959646356183387 (262606459115/273649201524) 7 0.943914448704971 (1313032295575/1391050107747) 8 0.925861440123182 (471378594111425/509124339435402) 9 0.905624031595899 (84376768345945075/93169754116678566) 10 0.883354588196 (10040835433167463925/11366710002234785052) 11 0.859219216933814 (893634353551904289325/1040053965204482832258) 12 0.833395688556022 (317240195510926022710375/380659751264840716606428) 13 0.806071239750907 (18717171535144635339912125/23220244827155283712992108) 14 0.777440294076694 (6607161551906056274988980125/8498609606738833838955111528) 15 0.747702140751356 (145357554141933238049757562750/194405694754150824066098176203) 16 0.717058610392694 (944824101922566047323424157875/1317638597778133363114665416487) 17 0.685711785894653 (165344217836449058281599227628125/241127863393398405449983771217121) 18 0.653861784910475 (57705132024920721340278130442215625/88252798001983816394694060265466286) 19 0.6217046479476645 (1673448828722700918868065782824253125/2691710339060506400038168838096721723) 20 0.589430362944917 (580686743566777218847218826640015834375/985165984096145342413969794743400150618) 21 0.557221053494375 (100458806637052458860568857008722739346875/180285375089594597661756472438042227563094) 22 0.525249353703714 (11552762763261032768965418556003115024890625/21994815760930540914734289637441151762697468) 23 0.49367698818054 (496768798820224409065512997908133946070296875/1006262821062572246849093750912932693143409161) Note that it is now better than a fair bet there will be duplicates

24 0.462653570890506 (170391697995336972309470958282489943502111828125/368292192508901442346768312834133365690487752926) 25 0.432315631815719 (3237442261911402473879948207367308926540124734375/7488607914347662661050955694294045102373250976162) 26 0.4027858755441534 (1103967811311788243593062338712252343950182534421875/2740830496651244533944649784111620507468609857275292) 27 0.374172671270525 (93837263961502000705410298790541449235765515425859375/250785990443588874855935455246213276433377801940689218) 28 0.3465697692915518 (10603610827649726079711363763331183763641503243122109375/30595890834117842732424125540038019724872091836764084596) 29 0.32005623502881 (1792010229872803707471220476002970056055414048087636484375/5599048022643565220033614973826957609651592806127827481068) 30 0.2946965879910083 (603907447467134849417801300413000908890674534205533495234375/2049251576287544870532303080420666485132482967042784858070888) 31 0.2705411299589584 (4227352132269943945924609102891006362234721739438734466640625/15625543269192529637808810988207581949135182623701234542790521) 32 0.2476264440881176 (1416162964310431221884744049468487131348631782711976046324609375/5718948836524465847438024821683974993383476840274651842661330686) 33 0.2259760446050035 (236499215039842014054752256261237350935221507712899999736209765625/1046567637083977250081158542368167423789176261770261287207023515538) 34 0.2056011553373393 (8750470956474154520025833481665781984603195785377299990239761328125/42560417241415074836633780722972141900759834645323959013085622965212) Rik should have given 4:1 odds

35 0.1865015944590072 (726289089387354825162144178978259904722065250186315899189900190234375/3894278177589479347551990936151950983919524870047142249697334501316898) 36 0.1686667425298672 (240401688587214447128669723241804028463003597811670562631856962967578125/1425305812997749441204028682631614060114546102437254063389224427481984668) 37 0.1520765711334868 (13222092872296794592076834778299221565465197879641880944752132963216796875/86943654592862715913445749640528457666987312248672497866742690076401064748) 38 0.13670271011726 (4350068554985645420793278642060443895038050102402178830823451744898326171875/31821377580987754024321144368433415506117356283014134219227824567962789697768) 39 0.1225095325641019 (178352810754411462252524424324478199696560054198489332063761521540831373046875/1455828024330189746612692354855828759404869049947896640529672973984297628672886) 40 0.10945523811055 (19440456372230849385525162251368123766925045907635337194950005847950619662109375/177611018968283149086748467292411108647394024093643390144620102826084310698092092) 41 0.0974929170055719 (3168794388673628449840601446973004174008782482944559962776850953215951004923828125/32502816471195816282874969514511232882473106409136740396465478817173428857750852836)