Wednesday, November 20, 2024

[vyakuwax] ordered dice

roll some dice, order them by some metric independent of what number the die shows, then read off the numbers in that order.

example dice ordering metrics: color (ordering by rainbow), size, number of sides.  the last one provides a mixed-radix random number.  previously, dice with two digits on each face.

rolling a whole bunch of dice all at once is more efficient (and fun) than rolling one die repeatedly.  (more efficient until the (log n) factor of sorting dominates.)  dice collisions induce more randomness.

ordered d2: coins by value, size, or year.

ordered 30 * d20 generates 128 bits, assuming they are uniform, which is not a good assumption: d20s are likely not manufactured to high precision as casino dice are.  ordered 26d20 generates 112 bits (Triple DES): give each d20 an identifier letter.

or, a funnel which forces them single file.  cubes might be best because they pack.  funnel by itself is probably not enough.

(then, feed the sequence of random numbers into a hash function, or seed a cryptographically secure pseudorandom number generator with them.  even if the dice are a little biased, the output will be pretty random.)

Saturday, November 09, 2024

[fiijydon] Bernoulli numbers

Bernoulli numbers are mysterious, showing up in lots of places, e.g., the zeta function, the gamma function, sums of powers (Faulhaber's formula), and the Taylor expansion of the tangent function.

Bernoulli numbers of odd index are all zero except for bernoulli[1] which is +1/2 or -1/2 depending on convention.  odd index are omitted below so as not to take sides on this Holy War.

the values below were computed using the bernfrac function in Pari/GP.  the bernvec function can speed up computation but was not needed.  we give both the traditional improper fraction form and each number broken into an integer part and a proper fraction.

bernoulli[0] = 1

bernoulli[2] = 1 / 6

bernoulli[4] = -1 / 30

bernoulli[6] = 1 / 42

bernoulli[8] = -1 / 30

bernoulli[10] = 5 / 66

bernoulli[12] = -691 / 2730

bernoulli[14] = 7 / 6 = 1 + 1/6

bernoulli[16] = -3617 / 510 = -7 - 47/510

bernoulli[18] = 43867 / 798 = 54 + 775/798

bernoulli[20] = -174611 / 330 = -529 - 41/330

bernoulli[22] = 854513 / 138 = 6192 + 17/138

bernoulli[24] = -236364091 / 2730 = -86580 - 691/2730

bernoulli[26] = 8553103 / 6 = 1425517 + 1/6

bernoulli[28] = -23749461029 / 870 = -27298231 - 59/870

bernoulli[30] = 8615841276005 / 14322 = 601580873 + 12899/14322

bernoulli[32] = -7709321041217 / 510 = -15116315767 - 47/510

bernoulli[34] = 2577687858367 / 6 = 429614643061 + 1/6

bernoulli[36] = -26315271553053477373 / 1919190 = -13711655205088 - 638653/1919190

bernoulli[38] = 2929993913841559 / 6 = 488332318973593 + 1/6

bernoulli[40] = -261082718496449122051 / 13530 = -19296579341940068 - 2011/13530

bernoulli[42] = 1520097643918070802691 / 1806 = 841693047573682615 + 1/1806

bernoulli[44] = -27833269579301024235023 / 690 = -40338071854059455413 - 53/690

bernoulli[46] = 596451111593912163277961 / 282 = 2115074863808199160560 + 41/282

bernoulli[48] = -5609403368997817686249127547 / 46410 = -120866265222965259346027 - 14477/46410

bernoulli[50] = 495057205241079648212477525 / 66 = 7500866746076964366855720 + 5/66

bernoulli[52] = -801165718135489957347924991853 / 1590 = -503877810148106891413789303 - 83/1590

bernoulli[54] = 29149963634884862421418123812691 / 798 = 36528776484818123335110430842 + 775/798

bernoulli[56] = -2479392929313226753685415739663229 / 870 = -2849876930245088222626914643291 - 59/870

bernoulli[58] = 84483613348880041862046775994036021 / 354 = 238654274996836276446459819192192 + 53/354

bernoulli[60] = -1215233140483755572040304994079820246041491 / 56786730 = -21399949257225333665810744765191097 - 22298681/56786730

bernoulli[62] = 12300585434086858541953039857403386151 / 6 = 2050097572347809756992173309567231025 + 1/6

bernoulli[64] = -106783830147866529886385444979142647942017 / 510 = -209380059113463784090951852900279701847 - 47/510

bernoulli[66] = 1472600022126335654051619428551932342241899101 / 64722 = 22752696488463515559649260352769264581469 + 62483/64722

bernoulli[68] = -78773130858718728141909149208474606244347001 / 30 = -2625771028623957604730304973615820208144900 - 1/30

bernoulli[70] = 1505381347333367003803076567377857208511438160235 / 4686 = 321250821027180325182047923042649852435219411 + 289/4686

bernoulli[72] = -5827954961669944110438277244641067365282488301844260429 / 140100870 = -41598278166794710913917074495262358936689603011 - 48540859/140100870

bernoulli[74] = 34152417289221168014330073731472635186688307783087 / 6 = 5692069548203528002388345621912105864448051297181 + 1/6

bernoulli[76] = -24655088825935372707687196040585199904365267828865801 / 30 = -821836294197845756922906534686173330145508927628860 - 1/30

bernoulli[78] = 414846365575400828295179035549542073492199375372400483487 / 3318 = 125029043271669930167323398297028955241771963644484775 + 37/3318

bernoulli[80] = -4603784299479457646935574969019046849794257872751288919656867 / 230010 = -20015583233248370274925329198813298768724220132825915915 - 47717/230010

bernoulli[82] = 1677014149185145836823154509786269900207736027570253414881613 / 498 = 3367498291536437423339667690333875301621959894719384367232 + 77/498

bernoulli[84] = -2024576195935290360231131160111731009989917391198090877281083932477 / 3404310 = -594709705031354477186604968440515408405790715651069049904704 - 1058237/3404310

bernoulli[86] = 660714619417678653573847847426261496277830686653388931761996983 / 6 = 110119103236279775595641307904376916046305114442231488626999497 + 1/6

bernoulli[88] = -1311426488674017507995511424019311843345750275572028644296919890574047 / 61410 = -21355259545253501188658385019041065678973298739163469211804590304 - 5407/61410

bernoulli[90] = 1179057279021082799884123351249215083775254949669647116231545215727922535 / 272118 = 4332889698664119241961661305937920621845136851180910914498655788032 + 230759/272118

bernoulli[92] = -1295585948207537527989427828538576749659341483719435143023316326829946247 / 1410 = -918855282416693282262005552155018971389603889162719959591004487113437 - 77/1410

bernoulli[94] = 1220813806579744469607301679413201203958508415202696621436215105284649447 / 6 = 203468967763290744934550279902200200659751402533782770239369184214108241 + 1/6

bernoulli[96] = -211600449597266513097597728109824233673043954389060234150638733420050668349987259 / 4501770 = -47003833958035731078575255535006060654596737369759057915139763564120483354 - 1450679/4501770

bernoulli[98] = 67908260672905495624051117546403605607342195728504487509073961249992947058239 / 6 = 11318043445484249270675186257733934267890365954750747918178993541665491176373 + 1/6

bernoulli[100] = -94598037819122125295227433069493721872702841533066936133385696204311395415197247711 / 33330 = -2838224957069370695926415633648176473828468092801288212822853171446486511107028 - 4471/33330

bernoulli[102] = 3204019410860907078243020782116241775491817197152717450679002501086861530836678158791 / 4326 = 740642489796788506297508271409209841768797317880887066731161003487485328441210855 + 61/4326

bernoulli[104] = -319533631363830011287103352796174274671189606078272738327103470162849568365549721224053 / 1590 = -200964548027566044834656196727153631868672708225328766243461301989213565009779698883 - 83/1590

bernoulli[106] = 36373903172617414408151820151593427169231298640581690038930816378281879873386202346572901 / 642 = 56657170050805941445719346030519356961419468287510420621387564452152460861972277798400 + 101/642

bernoulli[108] = -3469342247847828789552088659323852541399766785760491146870005891371501266319724897592306597338057 / 209191710 = -16584511154136216915823713374319912301494962614725464727402466815589878137712650743149939 - 71532367/209191710

bernoulli[110] = 7645992940484742892248134246724347500528752413412307906683593870759797606269585779977930217515 / 1518 = 5036885995049237741928942191518015481244237426490321414152565132252831097674298932791785387 + 49/1518

bernoulli[112] = -2650879602155099713352597214685162014443151499192509896451788427680966756514875515366781203552600109 / 1671270 = -1586146823765818636936340157296643878274097841277896388047286451429731136509885006831200945121 - 226439/1671270

bernoulli[114] = 21737832319369163333310761086652991475721156679090831360806110114933605484234593650904188618562649 / 42 = 517567436175456269840732406825071225612408492359305508590621669403181082957966515497718776632444 + 1/42

bernoulli[116] = -309553916571842976912513458033841416869004128064329844245504045721008957524571968271388199595754752259 / 1770 = -174889218402171173396900258776181591451414761618265448726273472158762122895238400153326666438279521 - 89/1770

bernoulli[118] = 366963119969713111534947151585585006684606361080699204301059440676414485045806461889371776354517095799 / 6 = 61160519994952185255824525264264167780767726846783200716843240112735747507634410314895296059086182633 + 1/6

bernoulli[120] = -51507486535079109061843996857849983274095170353262675213092869167199297474922985358811329367077682677803282070131 / 2328255930 = -22122776912707834942288323456712932445573185054987780150566552693027736635002572659102528031391154956836 - 971032651/2328255930

bernoulli[122] = 49633666079262581912532637475990757438722790311060139770309311793150683214100431329033113678098037968564431 / 6 = 8272277679877096985422106245998459573120465051843356628384885298858447202350071888172185613016339661427405 + 1/6

bernoulli[124] = -95876775334247128750774903107542444620578830013297336819553512729358593354435944413631943610268472689094609001 / 30 = -3195892511141570958359163436918081487352627667109911227318450424311953111814531480454398120342282422969820300 - 1/30

bernoulli[126] = 5556330281949274850616324408918951380525567307126747246796782304333594286400508981287241419934529638692081513802696639 / 4357878 = 1275008222338779298231002430292667986695719179638977329516058573538220731833362242193847881912832263475958141508 + 4096615/4357878

bernoulli[128] = -267754707742548082886954405585282394779291459592551740629978686063357792734863530145362663093519862048495908453718017 / 510 = -525009230867741338994028246245651754469198940377552432607801345222270181833065745383064045281411494212737075399447 - 47/510

bernoulli[130] = 1928215175136130915645299522271596435307611010164728458783733020528548622403504078595174411693893882739334735142562418015 / 8646 = 223018178942416252098692981988387281437382721508758785424905507810380363451712245962893177387681457638137258286208931 + 589/8646

bernoulli[132] = -410951945846993378209020486523571938123258077870477502433469747962650070754704863812646392801863686694106805747335370312946831 / 4206930 = -97684521930955204438633513398980239301166902674985678971000170661895983711329844759158434488299944780185742512315481910 - 1310531/4206930

bernoulli[134] = 264590171870717725633635737248879015151254525593168688411918554840667765591690540727987316391252434348664694639349484190167 / 6 = 44098361978452954272272622874813169191875754265528114735319759140111294265281756787997886065208739058110782439891580698361 + 1/6

bernoulli[136] = -84290226343367405131287578060366193649336612397547435767189206912230442242628212786558235455817749737691517685781164837036649737 / 4110 = -20508570886464088839729337727583015486456596690400835953087398275481859426430222089186918602388746894815454424764273682977287 - 167/4110

bernoulli[138] = 2694866548990880936043851683724113040849078494664282483862150893060478501559546243423633375693325757795709438325907154973590288136429 / 274386 = 9821443327979127710757296960209752104149185799072410705583196274811683181939115856580267855114057414721266530821204999429964677 + 273107/274386

bernoulli[140] = -3289490986435898803930699548851884006880537476931130981307467085162504802973618096693859598125274741604181467826651144393874696601946049 / 679470 = -4841260079820888050878919670996341276113054994232462038511585625800263150652152555217830953721687111431235327279572526224667309229 - 117419/679470

bernoulli[142] = 14731853280888589565870080442453214239804217023990642676194878997407546061581643106569966189211748270209483494554402556608073385149191 / 6 = 2455308880148098260978346740408869039967369503998440446032479832901257676930273851094994364868624711701580582425733759434678897524865 + 1/6

bernoulli[144] = -3050244698373607565035155836901726357405007104256566761884191852434851033744761276392695669329626855965183503295793517411526056244431024612640493 / 2381714790 = -1280692680408474754878251327860178572181183417119632011809521429908427882645327686944705780380037383050883058628440358894326745245777738 - 965295473/2381714790

bernoulli[146] = 4120570026280114871526113315907864026165545608808541153973817680034790262683524284855810008621905238290240143481403022987037271683989824863 / 6 = 686761671046685811921018885984644004360924268134756858995636280005798377113920714142635001436984206381706690580233837164506211947331637477 + 1/6

bernoulli[148] = -1691737145614018979865561095112166189607682852147301400816480675916957871178648433284821493606361235973346584667336181793937950344828557898347149 / 4470 = -378464685819691046949789954163795568144895492650402997945521404008267980129451551070429864341467838025357177777927557448308266296382227717751 - 179/4470

bernoulli[150] = 463365579389162741443284425811806264982233725425295799852299807325379315501572305760030594769688296308375193913787703707693010224101613904227979066275 / 2162622 = 214261012506652915508713231351482720966601526029650951415596348934478293248460575061213006604801160955717270014726431021090606783849241293313384 + 1933427/2162622

bernoulli[152] = -3737018141155108502105892888491282165837489531488932951768507127182409731328472084456653639812530140212355374618917309552824925858430886313795805601 / 30 = -124567271371836950070196429616376072194582984382964431725616904239413657710949069481888454660417671340411845820630576985094164195281029543793193520 - 1/30

bernoulli[154] = 10259718682038021051027794238379184461025738652460569233992776489750881337506863808448685054322627708245455888249006715516690124228801409697850408284121 / 138 = 74345787551000152543679668394052061311780714872902675608643307896745516938455534843831051118279910929314897740934831271860073363976821809404713103508 + 17/138

bernoulli[156] = -81718086083262628510756459753673452313595710396116467582152090596092548699138346942995509488284650803976836337164670494733866559829768848363506624334818961419869 / 1794590070 = -45535795304641704894063333223321274876772114534277160901794185563554661092679704253013898315109171870084423423319549792635298912486331125393726615424111 - 522242099/1794590070

bernoulli[158] = 171672676901153210072183083506103395137513922274029564150500135265308148197358551999205867870374013289728260984269623579880772408522396975250682773558018919 / 6 = 28612112816858868345363847251017232522918987045671594025083355877551358032893091999867644645062335548288043497378270596646795401420399495875113795593003153 + 1/6

bernoulli[160] = -4240860794203310376065563492361156949989398087086373214710625778458441940477839981850928830420029285687066701804645453159767402961229305942765784122421197736180867 / 230010 = -18437723552033869727688202653628785487541402926335260270034458408149393245849484726102903484283419354319667413610910191555877583414761557944288440165302368315 - 47717/230010

bernoulli[162] = 1584451495144416428390934243279426140836596476080786316960222380784239380974799880364363647978168634590418215854419793716549388865905348534375629928732008786233507729 / 130074 = 12181154536221046699501316506599521355817430663167015060351971806696491081805740427482538001277493077712826666777525052789561241031300248584464458144840696728273 + 125527/130074

bernoulli[164] = -20538064609143216265571979586692646837805331023148645068133372383930344948316600591203926388540940814833173322793804325084945094828524860626092013547281335356200073083 / 2490 = -8248218718531412154848184572968934473014189165923150629772438708405761023420321522571857987365839684671957157748515793206805258967279060492406431143486480062730953 - 113/2490

bernoulli[166] = 5734032969370860921631095311392645731505222358555208498573088911303001784652122964703205752709194193095246308611264121678834250704468082648313788124754168671815815821441 / 1002 = 5722587793783294332965164981429786159186848661232743012547992925452097589473176611480245262184824544007231844921421279120593064575317447752808171781191785101612590640 + 161/1002

bernoulli[168] = -13844828515176396081238346585063517228531109156984345249260453934317772754836791258987516540324983611569758649525983347408589045734176589270143058509026392246407576578281097477 / 3404310 = -4066853052505910472676796938311586556021957212176430833050002477541050243613769386156817839833911603693482276739187485102293576593840334537731011132660184368170811876204 - 1058237/3404310

bernoulli[170] = 195334207626637530414976779238462234481410337350988427215139995707346979124686918267688171536352650572535330369818176979951931477427594872783018749894699157917782460035894085 / 66 = 2959609206464205006287526958158518704263792990166491321441515086474954229161923004055881386914434099583868641966942075453817143597387801102773011362040896332087613030846880 + 5/66

bernoulli[172] = -11443702211333328447187179942991846613008046506032421731755258148665287832264931024781365962633301701773088470841621804328201008020129996955549467573217659587609679405537739509973 / 5190 = -2204952256518945750903117522734459848363785453956150622688874402440325208528888444081188046750154470476510302666979153049749712527963390550202209551679703196071229172550624183 - 203/5190

Sunday, November 03, 2024

[rcpodzpi] Kelvin vs. Celsius

0 K = -273.15 C
10^-12 K = -273.149999999999 C
10^-11 K = -273.14999999999 C
10^-10 K = -273.1499999999 C
10^-9 K = -273.149999999 C
10^-8 K = -273.14999999 C
10^-7 K = -273.1499999 C
10^-6 K = -273.149999 C
10^-5 K = -273.14999 C
10^-4 K = -273.1499 C
10^-3 K = -273.149 C
10^-2 K = -273.14 C
10^-1 K = -273.05 C
10^0 K = -272.15 C
10^1 K = -263.15 C
10^2 K = -173.15 C
10^3 K = 726.85 C
10^4 K = 9726.85 C
10^5 K = 99726.85 C
10^6 K = 999726.85 C
10^7 K = 9999726.85 C
10^8 K = 99999726.85 C
10^9 K = 999999726.85 C
10^10 K = 9999999726.85 C
10^11 K = 99999999726.85 C
10^12 K = 999999999726.85 C

Celsius values are not weird (not containing lots of nines) only between about 0.01 K and 1000 K, roughly the temperatures relevant to the human experience.  but if you want a temperature scale actually designed for human experience, Fahrenheit is generally better.

science often works with extremely low or extremely high temperatures.  as illustrated above especially for low temperatures, Kelvin is better than Celsius.  for high temperatures, at what threshold is it acceptable to say that the temperature in Kelvin is the same as temperature in Celsius?

use Kelvin for science, Fahrenheit for humans.  Celsius is useful only for discussing liquid or potentially liquid water.

[crdxmcet] angular defect of regular polyhedra

degrees missing from being flat at vertex:

tetrahedron 180
octahedron 120
cube 90
icosahedron 60
dodecahedron 36

(angle defect)*(number of vertices) = 720 degree = 4*pi radian, a theorem of Descartes.

by this metric, dodecahedron is the most flat, the least confusing (at corners) for a map of a sphere.  (does that mean it has a lot of distortion inside each face?)  create a tool to display the earth on a dodecahedral net.  drag any point to anywhere on the net and reproject.  also need rotation.  move pentagons to choose among many possible nets.  what countries fit neatly inside adjacent pentagons?  I don't have a good feel of what is the area and extent of 1/12 or 2/12 of a sphere (1 or 2 pentagons).

move portions of pentagons?  the dissection of a pentagon by a pentagram (star) might be useful, as well as the dissection from the center into pie pieces.

vertex-transitive polyhedra have the same angle defect at every vertex.  the Archimedean solids are another (the other?) family of vertex-transitive polyhedra.  by the theorem of Descartes, the most flat therefore is the polyhedron with the most vertices.  excluding the prisms and antiprisms, the truncated icosidodecahedron has the most vertices with 120.  decagon, hexagon, and square meet at each of its vertices; angle defect is 6 degrees.  how much map distortion is in its 12 relatively large decagons?  (30 squares and 20 hexagons are its other faces.  62 faces total.)

previously, pillars of inaccessibility: the tile diagonally opposite you is blank, perhaps annotated with curved arrows indicating edges connect.  moving your immersed character locally induces a different net.  the faces of a net could discretely change adjacency, or walking around a vertex could cause the net to continuously reproject itself, keeping the inaccessible gap diagonally across from you.  not sure if the latter works.

future work: solid angular defect of 4D regular polytopes.