Sunday, November 09, 2025

[xflxiqkv] a level of stupidity achievable only by a god

e.g., accidentally set the number of dimensions in the universe to not an integer.

...to not a real number.

previously, gods stupidly at war.

Saturday, November 01, 2025

[lrppbqqi] word primes

below are the 129 primes less than 27^2 = 729, written in big-endian base 27, using the following straightforward encoding of base-27 digits:

a=1 b=2 c=3 d=4 e=5 f=6 g=7 h=8 i=9 j=10 k=11 l=12 m=13 n=14 o=15 p=16 q=17 r=18 s=19 t=20 u=21 v=22 w=23 x=24 y=25 z=26

b c e g k m q s w ab ad aj an ap at az be bg bm bq bs by cb ch cp ct cv cz da de ds dw eb ed en ep ev fa fe fk fq fs gb gd gh gj gv hg hk hm hq hw hy ih in it iz ja jg jk jm jw kj kn kp kt lg lm lw ly mb mh mp mv na ne nk ns nw od on op oz pa pg pk pq py qb qd qh qt ra re rm rq rw sh sj ta tg tq tw ub ud uj ut uz ve vg vm vs vw vy wj wt wv wz xe xk xm xy yb yh yp yz zg zq zy

there are 9 1-digit primes and 120 2-digit primes.

the digits c f i l o r u x corresponding to multiples of 3 never occur as the last (units) digit, except for c by itself.

for 1- and 2-digit primes, we do not need a symbol to represent zero.  the first digit cannot be zero because that would be a useless leading zero.  if the second digit were zero, the number would be a multiple of 27, so not prime.

future work: consider a prime base so that all letters can occur in the units place.  deal with the special case "10" by ignoring it.  what two characters should we add to reach the 28 letters needed for base 29, and where in the alphabet should we add them?  or which 4 should we eliminate for base 23?  (probably wxyz.)

for the 2098 3-digit primes between 27^2 = 729 and 27^3 = 19683 below, we do need a symbol for zero as a middle character.  we choose dash (hyphen), mimicking English orthography.  (apostrophe was another good option.)

for 4-digit primes and larger (not explored), we could have multiple dashes in a row which are hard to distinguish in fonts that meld them into a single line, so some other symbol (e.g., apostrophe) for zero would be better.  or, do base 26 instead of base 27: there will be no words starting with a=0.  (or, make z the zeroth letter.  x is another good choice for zero, unlikely to begin a word.)

these primes could be the dictionary for a weird game of Scrabble.  blank is zero.  reorder the alphabet so that the frequency of Scrabble letter tiles correspond to the frequency of letters among 2-digit primes.

which English words are primes?  this should be easy.  assuming we stick with base 27, choose a different mapping of letters to digits so that multiples of 3 correspond to the letters least likely to end a word.  or begin a word if encoding little-endian.  find the mapping of letters to digits that maximizes the number of prime English words.

a-d a-j a-n a-v aaa aae aam aaq abd abn abz aca ack acm acq acs adb adp adt adv adz aem aeq aes aew afp aft aga agk ags agw ahb ahh ahv ahz aie aik ais aiy ajj ajn ajt ajv ake akg akm akw aky alh alj alp amg amk amm amq amw anb anj anp anv aoq aos apb apj apt apz aqe aqm aqy arb arh arn arp arv asg asq ath atj atn att atv aua aue aug auk auw auy avd awk awq aww axd axv aye ays ayw ayy azb azh azp azt azv b-a b-m b-w b-y bab bad bah ban baz bbk bbs bcd bcj bcn bct bda bde bdm bdq bed beh ben bep bet bez bfa bfg bfq bgj bgp bgt bgv bhs bhw bhy bih bit biv bje bjm bjs bjy bkd bkv bla ble blg bls bmb bmn bmv bnk bny bod boh boj bon bop boz bpk bpq bpw bqn bqp bre brg bsb bsh bsp bsv bsz bta bte btm bts bub bud bun bva bvk bvq bwb bwd bwh bwj bwt bxe bxg bxw bxy byd byh byj byt bza bzs c-p c-t c-z cag caw cay cbb cbj cbz cca cce ccm ccs ccy cdb cdn cdp cek ceq ces cey cfb cfh cfv cga cge cgg cgm cgq cgw chh chn cht cig cik ciq cjb cjj cjp cjt cks clj clt cma cme cmk cmm cms cnn cnz coa coq coy cpb cpn cqa cqk cqm cqq cqy crd crj crn crp crt crz csg csk csm css ctb ctd ctn ctv ctz cum cuw cvh cvj cvp cvt cvv cwk cwy cxb cxh cxp cxv cxz cyq cyy czh czn czt d-a d-k d-w daj dan dat daz dba dcb dcd dcn dcv dcz ddm ddq ddy dej dep dfa dfe dfk dgd dgn dgp dhe did dih dij div dja dje djq djw dkd dkh dkp dlk dlm dlq dls dmd dne dng dnm dns dny dob doh doj dov doz dpk dpm dpw dpy dqn dqp dre drk dsd dst dta dte dtg dtk dtm duh dup dva dvg dvq dvs dvw dwb dwd dwj dwt dwv dxg dxq dxs dyb dyp dyv dyz dze dzm dzs dzy e-n e-z eaa eae eas eay ebb ebj ebt eca ecg ecm edh edn edp edz eem eeq eew efn efp efz egm egq egs ehb ehp eht eia eis eiw ejb ejd ejh ejn ejp eka eke eky elt eme emg emk emq emw emy end enz eoa eog eow epb epn epp epv eqg eqw eqy erb erh erv erz esa ess etp etz eue eug euq eus evb evd evn evt evv ewe ewg ewq eww exd eyg eyq eys ezb ezj ezp ezz f-q f-w fah fat fav fbm fbs fbw fcb fch fcz fda fdk fdy fed feh fej fen ffk ffm ffy fgd fgt fha fhg fhm fid fit fiv fiz fje fjg fjm fjs fkb fkh fkt fle flw fly fmd fmh fmz fng fod foh foj fon fot fov fpg fpk fpy fra frk frq fsb fsp fsv fte ftq fts ftw fub fuj fup fuz fva fve fvs fvy fwd fwh fwn fwp fwz fxa fxq fyb fyj fza fze fzk fzw fzy g-d g-j g-p gaq gaw gbj gbn gbv gce gcm gcy gdp gdt gdv gdz gew gfh gfn gfp gge ggk ggq ghd ghn gia gie gjh gjn gjt gjz gkg gkm gkq gks gld glj gln glp glv gmq gmw gmy gnb gnt gnv gnz gok gom gos gow gpv gqa gqg gqk gqs grb gsg gsw gsy gtd gth gtj gtn gtp gtz gum gus guw gvd gvn gvt gwm gwq gws gwy gya gye gym gyw gzb gzh gzp gzv h-g h-k h-q h-s h-y hab hah haj hat hav hbk hbq hcj hcn hcz hdm hen het hfm hfq hgh hgp hgv hgz hhe hhs hhy hid hin hip hiz hjk hjs hkb hkd hkn hkv hlg hlq hmn hmp hmt hna hng hnk hns hoj hot hoz hpe hpg hpm hpw hqh hqj hqt hqz hre hrk hrs hry hsh hsn hsp hsv hta htg htq hty huv hva hvw hvy hwp hwt hxa hxk hyn hyv hzm hzq hzs i-b i-h i-j i-p i-t iak ias ibd ibv ick icq ics idd idj idt idv iee ieg iem iew ifj ifn igk igm ihb ihd ihn ihp ihz iis iiw iiy ijb ijj ijz ike ikk ikm iky iln ilv ilz ime inh inj int inv ioa ioe iok ioq ioy ipd iph ipt ipz iqg iqs iqw irj irv ise itb ith itt itz iua iuw ivd ivv iwe iwk iwy ixb ixd ixj ixt iya iyg iyk iyq izt j-g j-q j-s jad jan jap jbe jbg jby jcv jdm jds jeh jez jfe jfg jfy jgb jgh jgj jgt jha jhk jhq jhw jid jih jin jip jiz jja jjm jjq jjw jkb jkd jkp jkt jlg jly jmb jmh jna jne jnm jns jnw jod joh jov jpa jpe jps jqd jqh jqj jrm jrq jsn jst jsz jtk jtw juj jup jut juv juz jvq jvw jwh jwp jwv jwz jxk jxm jxy jza jzq jzs jzy k-t kag kam kaw kbh kbn kbp kbt kca kck kcq kcw kdt keg kem keq key kfj kga kgk kgm kgw kgy khb khh kia kig kik kiy kjb kjd kjh kjv kka kkm klj klt klz kmg kmq kms knv knz koe kog kos kow kpj kpp kqw krh krp krv kse ksg ksk ktd ktn ktv kuk kum kuw kvj kvn kvp kwa kwg kww kxb kxj kxn kxv kxz kye kym kys kyy kzj kzp kzt kzz l-e l-m lad lah lba lbe lbq lbs lcb lch lcj lct lde ldg ldk led lej lfm lfs lfw lgd lgn lgz lhe lhg lih lij lip lit liv ljk ljw ljy lkd lkn lkv lls lmd lmj lna lng lnk lny lod loh lot lpa lpg lps lpw lqb lqn lqt lre lrg lrw lsp lst lsv lte ltw lud luh luv luz lva lvg lwb lwh lwv lxa lxg lxq lxw lxy lyh lyj lyn lyp lzk lzm lzq lzw m-b m-n m-t mag maq mbb mbh mbp mbt mdb mdp mea meg mek meq mes mfd mfj mfv mgk mgm mgw mhd mhz mia mim mis miw mjb mjt mjv mkg mkm mkq mlb mlj mlp mma mme mmk mmw mnb mnd mnp moa moe mos moy mpn mpt mpv mqe mqm mrd mrj msq mss mtt mtv muq muw muy mvh mvt mvv mwa mwe mwm mxh mxn mxp mxz myg myk myq myy mzb mzn n-e n-q naj nan nat naz nbg nbk nbm ncb ncn ncp ncz ndg ndq nds ndw neb nep nfa nfw ngd nhe nhg nhk nid nih nij nin nja njk njw njy nkj nkz nla nmb nmj nne nnm nnq nnw nob nop not npa npm nps npy nqb nqv nqz nrq nrs nsd nsj nsn nst ntg nty nuh nup nuz nwd nwj nwt nwz nxe nxg nxm nyb nyh nyj nyv nza o-b o-d o-n o-v oak oaq oay obd obn ock odd odn odp odz oea oem oeq oew ofp oft ofv ogg ogy ohh ohj oht ohv ohz ois ojh okg okk oks oky olb oln olt oma omm omy ond onh onp ook oom opb opp opz oqe oqq orb orp orv orz oss osw oth otn otp otv oua ouq ouy ovt ovv oww oxd oxj oxn oyg oyk oyw ozt p-m p-q p-y pah paj paz pba pbm pby pde pdg pdk pdq peb peh pen pev pfa pfe pfg pfm pgj pgn phg phq phw pib pip pit piz pje pjg pjs pjy pkh pkj pkt pkz pls plw pmv pmz pna png pob pod ppa ppe ppk ppm ppq ppw pqt pqz prg prk prm pst psz ptg ptw puh puj put puv pve pvk pvs pvw pwd pwp pxk pxq pyd pyh pzg pzk pzm pzy q-h q-p q-t qaa qam qaq qbd qbj qbz qce qcm qcq qcw qdb qdj qdp qdz qek qem qes qey qfn qfv qga qgg qgs qhb qhd qhj qia qie qik qiq qiw qjh qjz qkg qkm qkw qld qlv qlz qmm qms qnj qnt qoa qok qow qoy qpd qpp qqa qrj qrn qrt qsa qse qsk qsm qsq qth qtt qtz qug qum qus quw qvn qvp qvt qvv qws qww qxb qxh qxv qyy qzd qzh qzn qzz r-e r-y rab raj ran rav rba rbg rbk rcn rcp rcz rdk rds reb rej rfg rfm rfy rgb rgp rgt rgz rha rib rip rje rjg rjs rjy rkb rkv rle rlk rlq rlw rmd rmn rmz rnm rnw roj roz rpm rpw rqj rqp rre rrk rrs rry rsn rtg rtq rts rty rub rud ruh rut ruv rve rvg rvm rwh rwn rwp rwt rxk rxs ryb ryj rze rzg rzq s-h s-v s-z saa sae saw say sbb sbh sbp sbz sca sdd sdh sek sem sew sey sfp sft sgk sgq shd shn shp sht sim sjv ska ske skk sky slb slv sme sms snn snt snv soy spj spt sqk sqm sqq srd srj sse ssw ssy stj stp stt sua sue sum sus svb svd svp swg swq sxd sxt syg syk syq syw syy szd szh szj t-k t-m tan tat tav taz tbe tbs tbw tch tcv tdk tdy teb teh tep tev tez tfe tfk tfq tfy tgb tgj tgn tha thq thy tid tih tit tja tjq tjs tkb tkj tkn tkt tls tly tmh tmp tmt tmz tnk tny tpa tpe tps tqn tqv trg trk trq try tsh tsn tta ttk ttq tts tub tun tuz tvm tvs tvy twp twz txe txm tyd tyh tyn typ tyv tze tzg tzq tzy u-d u-j u-t u-v uam uaw uay ubj ubn ubt uca uck ucw udj udv udz ueg ueq uew ufb ufv ufz ugm uhb uhp uhz uig uiq ujb ujd ujv uka ukm ukw ulh ulj uln ulp uma umg umk ums umw uom uoq uos uow uoy uph upt upz uqe uqs uqw urb urh urn urv usa utj uua uue uuk uum uuy uvd uvj uvp uvt uwg uxb uxn uxp uyg uyq uyw uzv v-s v-w v-y vab vad vah vav vaz vbe vbk vbs vch vct vcv vej ven vep vet vfq vfw vgb vgd vgv vgz vhm vhs vit vjk vjy vkd vkn vkz vla vlg vls vmv vna vne vnk vnq vod voh voj vpg vpk vpq vpw vqv vre vrw vsb vsj vsp vsv vty vub vun vuz vva vvq vvs vvy vwb vwn vxe vxg vxm vxq vyp vza vzg vzs vzw w-t waq wbb wbh wbj wbv wcw wdd wdh wdn wdz wea wes wey wfb wfh wfn wgg wgw wgy whd whj wia wik wiq wis wiw wjd wjj wjp wkm wlb wlh wlp wlz wme wms wnn wnv wok woq wos wpd wph wpj wqe wqm wrd wsk wsm wss wtj wtn wtt wtz wug wuq wuy wvp wvv wvz wwa wwe wwm wxb wxd wxp wya wyg wyy wzb wzh wzn wzt wzv x-a x-m x-w xap xba xbs xbw xcb xcd xct xcv xde xds xdw xez xfa xfk xfw xfy xgv xha xhq xhy xih xij xiv xjq xjw xjy xkn xlg xlq xls xmd xmp xng xnq xob xoh xoj xot xov xpa xpk xqb xqd xqp xqv xqz xre xrg xsd xte xtg xtk xtm xtw xty xun xuz xvg xwb xwd xwj xwn xwp xwz xxe xxy xyj xyt xza xzm xzs xzy y-d y-h y-z yaa yae yaq ybh ybj ybv yca yce ycg ycw ydh ydt yeg yek yes yfj yfn yfz ygm ygs ygy yhb yhj yhp yht yim yiy yjh yjv yjz yka ykq yks yld ymg ymk ymq ynn yog ypd ypn ypv yqg yqq yrb yrh yrt yse ysk yss yth ytv yua yue yuk yvt ywm yww yxz yyk yym yyq yys yzt z-e z-s z-y zat zba zbe zbw zcb zcp zdg zdk zdq zds zdy zfe zfw zfy zgn zgt zhk zhm zij zin zip ziv zjg zjm zjy zkh zkp zkv zlk zlw zmd zmn zna zon zot zov zpa zpe zpq zqd zqh zqj zqn zqp zqt zra zrg zrq zrw zsb zsd zsj zsp zsv ztg ztm zuj zut zuv zve zvk zvw zwb zwh zwv zxa zxg zze zzy

[kzrvwmdz] random oscillating field

model a real scalar field oscillating in space and time as a sum of cosines:

f(t,x,y,z) = sum over i of a[i]*cos(b[i] + c[i]*t + d[i]*x + e[i]*y + f[i]*z)

note that constant offset DC can be represented by b[0] = c[0] = d[0] = e[0] = 0.

does this capture all typical shapes?  I think it still works even if you do a rotation or translation of axes.

can it model spherical waves f(t,r)?

can it model dipole radiation?  dipole radiation is a time-varying vector not scalar field, so model it is 3 scalar fields, one for each coordinate.  or, model just its magnitude.

3D or 4D Fourier transform might be better.  3D Fourier is sum of spherical harmonics (I think): how can they be made to vary over time?

oscillating vector fields?  tensor fields (in flat space)?  complex scalar fields?  Fourier series with complex exponentials probably gets you complex scalar fields.

[efyfabmr] map coloring the Voronoi diagram of equally spaced points on a sphere

pick one of the many methods for placing N "equally spaced" points on a sphere (e.g., Thomson problem, Tammes problem), compute the Voronoi partition, then map color, i.e., avoid adjacent regions of the same color.  (Lloyd's algorithm conveniently uses Voronoi to produce equally spaced points.)

4 colors suffice.  such a coloring might be pretty.  I suspect there will not be adjacent Voronoi regions with very short borders.  (maximizing the minimum Voronoi border segment could be another "equally spaced" metric.)

or, equally spaced points on the surface of any shape.  (the surface needs to have a definition for distance between any two points, a metric.  this might be related to a geodesic.)  if the shape is not topologically a sphere, then more than 4 colors might be required.  amazingly, the sufficient number is known for any number of holes in the donut (Heawood conjecture, no longer a conjecture, according to Wikipedia); the case of zero holes (the sphere or equivalently the plane) was the last to be proven.

colors = floor((7 + sqrt(1 + (48 * holes)))/2)

(there is a generalization of the formula that works if the surface has cross caps (real projective planes), e.g., Klein bottle.  such surfaces always self intersect in 3D space.  the classification theorem of surfaces then says that donut holes and cross caps are enough to topologically define any closed surface.)

is there a polynomial time algorithm that colors with the sufficient number of colors any map on a surface of any genus?

are random such coloring problems, the Voronoi diagrams of roughly equally spaced points, relatively easy to color?

how often can such maps on a sphere be 3-colored?  the regular hexagon tiling can be 3-colored.

there may be many ways to color the Voronoi partition, many more than just the 24 = 4! ways from permuting 4 colors.  how often does this happen?  if it does happen, how can we pick one of the colorings uniformly randomly?

[riqxgwhu] ordering a deck of cards in ways that makes sense

suit major, rank major (2 possibilities)

ordering of suits (4! = 24)

king high, ace high (2)

low instead of high (i.e., reverse the ranks) (2)

total number of ways = 2 * 24 * 2 * 2 = 192

a deck of cards ordered in any of these ways will not arouse suspicion as encoding information.  or, given a deck of cards suspected of encoding information in their ordering, these are possibilities of the "start" ordering.

cf 52! ~= 192^29.7 .

next, consider adding two distinct jokers, not breaking up the main body of cards.  multiply by 3! = 6 yielding 1152.  10 bits or 3 digits.

Monday, October 27, 2025

[cpqhsrhs] one-third angle formula

we rearrange the standard triple-angle trigonometric identity for sine to make it more clear the cubic polynomial that you need to solve for the one-third angle trigonometric identity.

4*(sin x)^3 - 3*(sin x) + (sin(3x)) = 0

given sin(3x) in the constant term, solve for (sin x) by your favorite root-finding algorithm, for example, Newton's method.

what is a good starting guess for Newton's method?  maybe use the first few terms of the Taylor expansion of sine.

although you could use the cubic formula directly to solve the cubic equation, that requires computing the cube root of a complex number.  the standard technique for doing that involves sine and cosine of 1/3 of an angle, so that feels like cheating.  previously.

similarly for cosine:

4*(cos x)^3 - 3*(cos x) - (cos(3x)) = 0

slightly more explicitly, these therefore are the one-third angle trigonometric identities:

sin(y/3) = RootOf(4*z^3 - 3*z + sin(y) == 0, z)

cos(y/3) = RootOf(4*z^3 - 3*z - cos(y) == 0, z)

here are the half-angle identities written using the same notation:

sin(y/2) = RootOf(2*z^2 - (1-cos(y)) == 0, z)
  = +- sqrt((1-cos(y))/2)

cos(y/2) = RootOf(2*z^2 - (1+cos(y)) == 0, z)
  = +- sqrt((1+cos(y))/2)

it is very convenient that the triple angle identity for sine is a polynomial in only sines, so requires only solving a single cubic equation.  worse would have been having to solve a simultaneous system of two cubic equations in (sin x)^3, (cos x)^3, lower powers, and cross terms.

in general, to derive a polynomial for cos(n*x) in powers of only (cos x), expand de Moivre's formula cos(n*x) + i*sin(n*x) = (cos(x) + i*sin(x))^n and collect real terms.  the powers of (sin x) in the real terms will only be even.  this is very convenient: substitute the Pythagorean identity (sin^2 = 1 - cos^2) to transform the even powers of (sin x) into (cos x).  the resulting polynomials in (cos x) (called Chebyshev polynomials) can be solved for (cos x) by your favorite root-finding method.

for sine, there are two possibilities:

if n is even, we still work with the collected real terms as above.  the powers of (cos x) in the real terms will be only even.  transform the even powers of (cos x) into (sin x) via the Pythagorean identity to get a polynomial in (sin x) with constant term that involves cos(n*x).  (for example, note how the half-angle identity for sin(x/2) involves (cos x).)

if n is odd, collect imaginary terms.  the powers of (cos x) will all be even, so convert them to (sin x) by the Pythagorean identity, yielding a polynomial in (sin x) with a constant term involving sin(n*x).

the Pythagorean identity and de Moivre's identity are certainly two of the most wonderful things in mathematics.

Sunday, October 26, 2025

[hgtrowvn] reciprocals of odd numbers mod 2^n

odd numbers have multiplicative inverses modulo 2^n (even numbers do not).

? for(n=1, 8, print1(2^n,":"); for(j=1, 2^(n-1), i=2*j-1; print1(" ",lift(Mod(i,2^n)^-1))); print())

for example, in 4th line below, the reciprocals of 1 3 5 7 9 11 13 15 modulo 16 are 1 11 13 7 9 3 5 15 respectively.  the product of each number multiplied by its reciprocal is a number of the form 16N+1.

2: 1

4: 1 3

8: 1 3 5 7

16: 1 11 13 7 9 3 5 15

32: 1 11 13 23 25 3 5 15 17 27 29 7 9 19 21 31

64: 1 43 13 55 57 35 5 47 49 27 61 39 41 19 53 31 33 11 45 23 25 3 37 15 17 59 29 7 9 51 21 63

128: 1 43 77 55 57 35 69 111 113 27 61 39 41 19 53 95 97 11 45 23 25 3 37 79 81 123 29 7 9 115 21 63 65 107 13 119 121 99 5 47 49 91 125 103 105 83 117 31 33 75 109 87 89 67 101 15 17 59 93 71 73 51 85 127

256: 1 171 205 183 57 163 197 239 241 27 61 167 41 19 53 223 225 139 173 151 25 131 165 207 209 251 29 135 9 243 21 191 193 107 141 119 249 99 133 175 177 219 253 103 233 211 245 159 161 75 109 87 217 67 101 143 145 187 221 71 201 179 213 127 129 43 77 55 185 35 69 111 113 155 189 39 169 147 181 95 97 11 45 23 153 3 37 79 81 123 157 7 137 115 149 63 65 235 13 247 121 227 5 47 49 91 125 231 105 83 117 31 33 203 237 215 89 195 229 15 17 59 93 199 73 51 85 255

they look quite random, but there are some patterns, like some early (e.g., 11, 13, 57) and late numbers (e.g., 51, 85) persisting through several exponents.

the randomness is reminiscent of multiplicative inverse modulo a prime number.  however, prime numbers and powers of 2 are about as different as numbers can be.

the reciprocal of a reciprocal is itself, so most numbers pair with another (two-cycle).  however, 1, (2^(n-1) - 1), (2^(n-1) + 1), and (2^n - 1) (the last one equivalent to -1) are always their own inverses (one-cycle).

previously: it is possible to set up a Galois field of order 2^n so that all nonzero elements (not just the odd elements) have reciprocals.  the reduction operation becomes more complicated than integer modulo 2^n.

[hwsolprj] the 3D actual reality experience

inspired by "___: the 3D virtual reality experience"

[acrvinwj] pi vs 2pi in binary

in base 2, the battle between pi and 2pi (tau) is over where to put the decimal point:

1.10010010000111111011010... = pi/2
11.0010010000111111011010... = pi
110.010010000111111011010... = 2pi

[lavnkjop] easy 21cm radio astronomy

is the 21 cm (1420 MHz) hydrogen line the easiest radio astronomy "target"?  not really a target if observing the hydrogen radiation from "everywhere" with an omnidirectional (dipole) antenna.  I have seen such a simple antenna and software-defined radio successfully detect 21 cm radiation.  it was fun to see a peak right at 1420 MHz.  does 21 cm signal strength vary significantly by antenna orientation and what part of the sky (probably the center of the Milky Way) is overhead?  such space and time variance could make observing 21 cm with simple antenna more interesting than just a peak.

an even easier astronomical target to observe in radio frequencies might be the sun.  I think the sun emits broadband noise, not a clear peak.  by measuring intensity, how easy is it to detect active regions rotating into view, or track the sunspot cycle through radio?  for the former, you need to keep your radio calibrated through months; for the latter, through decades.

is 21 cm the easiest astronomical radio thing to observe not also observable in visible light?  it is fun to see the invisible.  (previously: easiest visible-light astronomy with binoculars.)

while not astronomical, lightning can be detected with radio, even from great distance.  the necessary equipment to triangulate lighting strikes is more complicated than a simple dipole antenna but seems gettable by amateurs.

is 21 cm the longest astronomically interesting intrinsic wavelength of electromagnetic radiation?

(the extrinsic effect of cosmological redshift stretches wavelength.  at cosmological distance z=9, 21 cm radiation becomes 21 * (1 + z) = 210 cm.)

the 21 cm line is the hyperfine electron transition of ground-state hydrogen.  I think hyperfine transitions in other elements have shorter wavelengths.  previously, cesium, 3 cm.

electron energy levels become closely spaced near ionization, so transitions between adjacent high energy levels correspond to longer wavelengths.  but do we care about radiation from transitions near but not quite at ionization?  do they happen often enough to observe?  what about hyperfine transitions of excited hydrogen?  the electron probably unexcites much faster (more frequently) than it spin-flips.

[blyqokgn] simultaneously define record type and data

we propose a Haskell syntax extension which may be useful when a record type has very few data values of that type, perhaps just one, e.g., the Singleton design pattern.

introduce the keyword DEFINERECORD:

singletonrecord :: Recordtype;
singletonrecord = DEFINERECORD RecordType RecordConstructor { john :: Int = 1, paul :: String = "bass", george :: Bool = True, ringo :: Float = 1.0};

the benefit of this syntax is that the field types and their corresponding values get defined next to each other.  future code changes to type and value will happen at the same place.  there is less danger of accidentally leaving a field uninitialized.

also, the field labels are each written exactly once (Don't Repeat Yourself), in contrast to the current method (below), defining the data type then defining the singleton record using record syntax, which requires typing each field label twice.  although you can optionally put type annotations on field values so that field, value, and type are next to each other when defining the singleton, it feels like even more Repeating Yourself.

data RecordType = RecordConstructor { john :: Int, paul :: String, george :: Bool, ringo :: Float };
singletonrecord :: Recordtype;
singletonrecord = RecordConstructor { john = 1 :: Int, paul = "bass" :: String, george = True :: Bool, ringo = 1 :: Float};

the proposed syntax cannot be used if RecordType has multiple constructors.  (because there can only be one constructor, also consider simpler syntax which restricts the constructor to be the same as that of the type.)

if you have nested records, the syntax can define inner record types "in place" as well.

singletonrecord :: Recordtype;
singletonrecord = DEFINERECORD RecordType RecordConstructor { john :: Int = 1, paul :: String = "bass", george :: Bool = True, ringo = DEFINERECORD DrumType DrumConstructor { snare :: Double = 1.0, cymbal :: String = "crash" } };

this might be a nice feature to combine with Data.Default .

slight variation: record types can be unnamed (anonymous), but have named accessor functions (named fields).  introduce the keyword UNNAMEDRECORD, which stands for both type and constructor.

f1 :: UNNAMEDRECORD;
f1 = UNNAMEDRECORD { john :: String = "guitar", paul :: String = "bass", george :: String = "guitar", ringo = UNNAMEDRECORD { snare :: Double = 1.0, cymbal :: String = "crash" } };

f2 :: UNNAMEDRECORD;
f2 = UNNAMEDRECORD { capital :: String = "london", home :: String = "liverpool" };

g :: String;
g = let
{ v1 :: UNNAMEDRECORD
; v1 = f1
; v2 :: UNNAMEDRECORD
; v2 = f2
} in cymbal (ringo v1) ++ home v2;
-- returns "crashliverpool"

this is better than returning multiple values through tuple syntax because components get named, both when creating and extracting.  using names seems less error-prone than extracting tuple components by position:

g = let { v1 = f1 ; v2 = f2 } in (case v1 of {(_,_,_, (_,x) )->x}) ++ snd v2

open question: if we use DEFINERECORD or UNNAMEDRECORD inside a let or where, should the type name and accessor functions escape the let and become visible in the global scope?  perhaps explicitly mark things for export from the let (requires more new syntax).

more sophistication (and complexity) possible: lenses, record wildcards and puns, etc.  type inference probably becomes more difficult.

related work by Alexander Thiemann: SuperRecord anonymous records.

although we propose this extension for Haskell, it seems a nice feature to have in any programming language.

Saturday, October 25, 2025

[uvfnnuvc] Unicode musical notes

permitting up to two ledger lines above or below, there are 19 possible note positions on a 5-line musical staff.

consider adding these 19 symbols to Unicode.  although it is far from being able to express music purely in Unicode, it is a huge step in that direction.  once we can do pitches, inventing a new serial notation for specifying clefs, accidentals, rhythms, rests, dynamics, articulations, and phrasing seems not too difficult.

if the middle line (e.g., B on a treble clef, middle C on an alto clef) is labeled 0, then the range is -9 to +9.  a set of symbols denoting integers between -9 and +9 on a vertical scale seems generically useful beyond music.  balanced base 19?

should the notes have stems (like half note or shorter) or not (like whole note)?  having a stem pointing the conventional direction makes it slightly easier to recognize whether a note is above or below the middle line.  which way should the stem on a middle line note go?  let's add an additional character to permit either possibility.  (vaguely reminiscent of signed zero in IEEE 754 floating point.)

should notes be hollow (like whole and half note) or solid (like quarter note)?  hollow makes it slightly easier to recognize whether a note is on a line or on a space.

durations from whole notes to 32nd notes would increase a factor of 6: 20*6 = 120 characters, still less than a Unicode block of 256.  or duration could be done with modifiers, like combining diacritics or emoji skin tone modifiers.

if not Unicode, notes on a staff seem not too difficult to do with inline SVG images.

by having separate glyphs for each note, automatic formatting to any display width becomes easy: just wrap lines like regular text.  this is especially useful for reading sheet music on a narrow display.

are there any Unicode blocks that depict a range of at least 19 values?  Unicode clocks seem promising: 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦 🕛 🕧 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 (future post lxscsnac).

[mpyfvglu] pawn promotion to god

2 closely related chess variants:

  1. pawn promotion (pawn reaching 8th rank) causes immediate victory.
  2. if a pawn promotes, it must immediately be captured next turn by the opposing player.  if not, victory for the promoter.  not even checkmate is a sufficient response.  (is king capture a sufficient response?  probably best to leave in place the standard rule that no move, not even pawn promotion, may leave your king in check.)  this can be thought of as the pawn promoting to a piece with infinite power, so checks the opposing king from anywhere.

inspired by endgame tablebases with fairy chess pieces.  there become too many possibilities of what a pawn can promote to.

further possibility: eliminate checkmate; king is not a special piece.  (also eliminate castling.)  pawn race to promotion is the only goal.  this is similar to Breakthrough by Dan Troyka.  also similar to tower defense or lemmings (escort quest).  pawnless engames are draws: do we want a way to reintroduce pawns, e.g., Shogi drops?

in chess variants in which black is guaranteed the same number of moves, black could respond to pawn promotion also with pawn promotion.  then what?  draw, or promoted pawns annihilate?

[wrkcdnfn] 24 letters on a cube

a cube can be oriented in 24 ways (octahedral group, isometries of a cube).  vote two letters off the island, then mark a cube with 24 letters, 4 to a face.

one way to reduce the alphabet down to 24 letters is merge I/J and U/V as done on Roman stone inscriptions.  or, the least frequent letters in English text (not word lists) are J Q X Z, so choose some subset and a protocol for what to do if you need them.  previously, penalizing collisions.  previously, eliminate X and Z if only considering initial letters.

for a square cube face scaled to fit between (0,0) and (1,1) on a coordinate plane, let each letter occupy the area (0.125,0) to (0.5,0.5) (and rotations).  a collection of such cubes, kind of like children's letter blocks, can spell out text.  one needs to learn to pay attention only to the bottom left quarter of each face.

or, divide each square face by diagonals into isosceles right triangles and fit letters into triangles.  should the upright letter go in the top or bottom triangle?

cubes pack nicely.  an ordered collection of oriented cubes can store information in a volume.  it requires only minimal markings on a cube to establish orientation, for example, just one dot in the corner of just one face.  all the markings on d6 dice are of course sufficient.  but it seems difficult to read or write data encoded in a packed collection of oriented cubes.  layers of rhombic dodecahedra fit in divots of the previous layer so don't accidentally slide around but require a container with divots.

previously, on storing information in cubes.  previously vaguely similar, marking letters on a twisty cube, which coincidentally also required first reducing the alphabet to 24 letters.

[qqavwgmd] inverting the McCartney joke

see those sheep over there in that pasture?  I sexually pleasured all of them.  (various details about doing a good job at it, how the sheep now all vye for his attention, future post rpqwowhu.)  but do they call me Paul the sheep-fucker?  no...

see all those goats over there?  (etc.)  but do they call me Paul the goat-fucker?  no...

(something something "animal husbandry".)

but you ______ one _________.  it was just one time!

but be an era-defining worldwide phenomenon of a boy band: it was just one time!  (previously on Paul McCartney telling this joke well.)

"but you destroy one world, just one time!"

[zxvpfzdb] decade primes and gaps

4 consecutive primes as near to each other as they can possibly be is called a prime 4-tuplet or prime quadruplet or prime decade because, for those starting greater than 10, the last digits (the one's place, unit's place, least significant digit) have the pattern "1 3 7 9"; that is, they all fall in one decade.  it is never "3 7 9 1" nor "7 9 1 3" nor "9 1 3 7".

prime gaps of length 10 are aesthetically the dual.

inspired by memorizing primes in order.

below are decades and gaps up to 3011.

the first three prime quadruplets are the weird ones, not having last digits "1 3 7 9".

97 101 103 107 109 113 is a prime 6-tuplet containing two prime 5-tuplets and (only) one prime 4-tuplet.  the next prime 5-tuplet is 1481 1483 1487 1489 1493.  the next prime 6-tuplet is 16057 16061 16063 16067 16069 16073.  prime decades generally must be separated by a multiple of 30 (future post bqazxnke).

we give the gap size only if greater than 10.

decade 2 3 5 7
decade 3 5 7 11
decade 5 7 11 13
decade 11 13 17 19
decade 101 103 107 109
gap 113 127 size 14
gap 139 149
gap 181 191
decade 191 193 197 199
gap 199 211 size 12
gap 211 223 size 12
gap 241 251
gap 283 293
gap 293 307 size 14
gap 317 331 size 14
gap 337 347
gap 409 419
gap 421 431
gap 467 479 size 12
gap 509 521 size 12
gap 523 541 size 18
gap 547 557
gap 577 587
gap 619 631 size 12
gap 631 641
gap 661 673 size 12
gap 691 701
gap 709 719
gap 773 787 size 14
gap 787 797
gap 797 809 size 12
gap 811 821
decade 821 823 827 829
gap 829 839
gap 839 853 size 14
gap 863 877 size 14
gap 887 907 size 20
gap 919 929
gap 953 967 size 14
gap 997 1009 size 12
gap 1021 1031
gap 1039 1049
gap 1051 1061
gap 1069 1087 size 18
gap 1129 1151 size 22
gap 1153 1163
gap 1171 1181
gap 1201 1213 size 12
gap 1237 1249 size 12
gap 1249 1259
gap 1259 1277 size 18
gap 1307 1319 size 12
gap 1327 1361 size 34
gap 1381 1399 size 18
gap 1399 1409
gap 1409 1423 size 14
gap 1459 1471 size 12
gap 1471 1481
decade 1481 1483 1487 1489
gap 1499 1511 size 12
gap 1511 1523 size 12
gap 1531 1543 size 12
gap 1583 1597 size 14
gap 1627 1637
gap 1637 1657 size 20
gap 1669 1693 size 24
gap 1699 1709
gap 1709 1721 size 12
gap 1723 1733
gap 1759 1777 size 18
gap 1789 1801 size 12
gap 1801 1811
gap 1811 1823 size 12
gap 1831 1847 size 16
gap 1847 1861 size 14
decade 1871 1873 1877 1879
gap 1879 1889
gap 1889 1901 size 12
gap 1913 1931 size 18
gap 1933 1949 size 16
gap 1951 1973 size 22
gap 2017 2027
gap 2029 2039
gap 2039 2053 size 14
gap 2053 2063
gap 2069 2081 size 12
decade 2081 2083 2087 2089
gap 2089 2099
gap 2099 2111 size 12
gap 2113 2129 size 16
gap 2143 2153
gap 2161 2179 size 18
gap 2179 2203 size 24
gap 2221 2237 size 16
gap 2251 2267 size 16
gap 2297 2309 size 12
gap 2311 2333 size 22
gap 2357 2371 size 14
gap 2399 2411 size 12
gap 2423 2437 size 14
gap 2447 2459 size 12
gap 2477 2503 size 26
gap 2503 2521 size 18
gap 2521 2531
gap 2557 2579 size 22
gap 2579 2591 size 12
gap 2593 2609 size 16
gap 2621 2633 size 12
gap 2633 2647 size 14
gap 2647 2657
gap 2719 2729
gap 2731 2741
gap 2753 2767 size 14
gap 2767 2777
gap 2777 2789 size 12
gap 2803 2819 size 16
gap 2819 2833 size 14
gap 2861 2879 size 18
gap 2887 2897
gap 2917 2927
gap 2927 2939 size 12
gap 2939 2953 size 14
gap 2971 2999 size 28
gap 3001 3011

gaps become increasingly common as primes thin out, so we stop listing them.  here are just decades from 3000 to a million:

decade 3251 3253 3257 3259
decade 3461 3463 3467 3469
decade 5651 5653 5657 5659
decade 9431 9433 9437 9439
decade 13001 13003 13007 13009
decade 15641 15643 15647 15649
decade 15731 15733 15737 15739
decade 16061 16063 16067 16069
decade 18041 18043 18047 18049
decade 18911 18913 18917 18919
decade 19421 19423 19427 19429
decade 21011 21013 21017 21019
decade 22271 22273 22277 22279
decade 25301 25303 25307 25309
decade 31721 31723 31727 31729
decade 34841 34843 34847 34849
decade 43781 43783 43787 43789
decade 51341 51343 51347 51349
decade 55331 55333 55337 55339
decade 62981 62983 62987 62989
decade 67211 67213 67217 67219
decade 69491 69493 69497 69499
decade 72221 72223 72227 72229
decade 77261 77263 77267 77269
decade 79691 79693 79697 79699
decade 81041 81043 81047 81049
decade 82721 82723 82727 82729
decade 88811 88813 88817 88819
decade 97841 97843 97847 97849
decade 99131 99133 99137 99139
decade 101111 101113 101117 101119
decade 109841 109843 109847 109849
decade 116531 116533 116537 116539
decade 119291 119293 119297 119299
decade 122201 122203 122207 122209
decade 135461 135463 135467 135469
decade 144161 144163 144167 144169
decade 157271 157273 157277 157279
decade 165701 165703 165707 165709
decade 166841 166843 166847 166849
decade 171161 171163 171167 171169
decade 187631 187633 187637 187639
decade 194861 194863 194867 194869
decade 195731 195733 195737 195739
decade 201491 201493 201497 201499
decade 201821 201823 201827 201829
decade 217361 217363 217367 217369
decade 225341 225343 225347 225349
decade 240041 240043 240047 240049
decade 243701 243703 243707 243709
decade 247601 247603 247607 247609
decade 247991 247993 247997 247999
decade 257861 257863 257867 257869
decade 260411 260413 260417 260419
decade 266681 266683 266687 266689
decade 268811 268813 268817 268819
decade 276041 276043 276047 276049
decade 284741 284743 284747 284749
decade 285281 285283 285287 285289
decade 294311 294313 294317 294319
decade 295871 295873 295877 295879
decade 299471 299473 299477 299479
decade 300491 300493 300497 300499
decade 301991 301993 301997 301999
decade 326141 326143 326147 326149
decade 334421 334423 334427 334429
decade 340931 340933 340937 340939
decade 346391 346393 346397 346399
decade 347981 347983 347987 347989
decade 354251 354253 354257 354259
decade 358901 358903 358907 358909
decade 361211 361213 361217 361219
decade 375251 375253 375257 375259
decade 388691 388693 388697 388699
decade 389561 389563 389567 389569
decade 392261 392263 392267 392269
decade 394811 394813 394817 394819
decade 397541 397543 397547 397549
decade 397751 397753 397757 397759
decade 402131 402133 402137 402139
decade 402761 402763 402767 402769
decade 412031 412033 412037 412039
decade 419051 419053 419057 419059
decade 420851 420853 420857 420859
decade 427241 427243 427247 427249
decade 442571 442573 442577 442579
decade 444341 444343 444347 444349
decade 452531 452533 452537 452539
decade 463451 463453 463457 463459
decade 465161 465163 465167 465169
decade 467471 467473 467477 467479
decade 470081 470083 470087 470089
decade 477011 477013 477017 477019
decade 490571 490573 490577 490579
decade 495611 495613 495617 495619
decade 500231 500233 500237 500239
decade 510611 510613 510617 510619
decade 518801 518803 518807 518809
decade 536441 536443 536447 536449
decade 536771 536773 536777 536779
decade 539501 539503 539507 539509
decade 549161 549163 549167 549169
decade 559211 559213 559217 559219
decade 563411 563413 563417 563419
decade 570041 570043 570047 570049
decade 572651 572653 572657 572659
decade 585911 585913 585917 585919
decade 594821 594823 594827 594829
decade 597671 597673 597677 597679
decade 607301 607303 607307 607309
decade 622241 622243 622247 622249
decade 626621 626623 626627 626629
decade 632081 632083 632087 632089
decade 632321 632323 632327 632329
decade 633461 633463 633467 633469
decade 633791 633793 633797 633799
decade 654161 654163 654167 654169
decade 657491 657493 657497 657499
decade 661091 661093 661097 661099
decade 663581 663583 663587 663589
decade 664661 664663 664667 664669
decade 666431 666433 666437 666439
decade 680291 680293 680297 680299
decade 681251 681253 681257 681259
decade 691721 691723 691727 691729
decade 705161 705163 705167 705169
decade 715151 715153 715157 715159
decade 734471 734473 734477 734479
decade 736361 736363 736367 736369
decade 739391 739393 739397 739399
decade 768191 768193 768197 768199
decade 773021 773023 773027 773029
decade 795791 795793 795797 795799
decade 803441 803443 803447 803449
decade 814061 814063 814067 814069
decade 822161 822163 822167 822169
decade 823721 823723 823727 823729
decade 829721 829723 829727 829729
decade 833711 833713 833717 833719
decade 837071 837073 837077 837079
decade 845981 845983 845987 845989
decade 854921 854923 854927 854929
decade 855731 855733 855737 855739
decade 857951 857953 857957 857959
decade 875261 875263 875267 875269
decade 876011 876013 876017 876019
decade 881471 881473 881477 881479
decade 889871 889873 889877 889879
decade 907391 907393 907397 907399
decade 930071 930073 930077 930079
decade 938051 938053 938057 938059
decade 946661 946663 946667 946669
decade 954971 954973 954977 954979
decade 958541 958543 958547 958549
decade 959471 959473 959477 959479
decade 976301 976303 976307 976309
decade 978071 978073 978077 978079
decade 983441 983443 983447 983449

prime decades can only occur in decades 10*(3*n + 1) + {1,3,7,9}.  here are "composite decades" when all numbers in a candidate prime decade are composite:

1331 = 11^3
1333 = 31 * 43
1337 = 7 * 191
1339 = 13 * 103

1961 = 37 * 53
1963 = 13 * 151
1967 = 7 * 281
1969 = 11 * 179

2321 = 11 * 211
2323 = 23 * 101
2327 = 13 * 179
2329 = 17 * 137

2561 = 13 * 197
2563 = 11 * 233
2567 = 17 * 151
2569 = 7 * 367

2981 = 11 * 271
2983 = 19 * 157
2987 = 29 * 103
2989 = 7^2 * 61

3281 = 17 * 193
3283 = 7^2 * 67
3287 = 19 * 173
3289 = 11 * 13 * 23

3971 = 11 * 19^2
3973 = 29 * 137
3977 = 41 * 97
3979 = 23 * 173

4031 = 29 * 139
4033 = 37 * 109
4037 = 11 * 367
4039 = 7 * 577

4061 = 31 * 131
4063 = 17 * 239
4067 = 7^2 * 83
4069 = 13 * 313

4181 = 37 * 113
4183 = 47 * 89
4187 = 53 * 79
4189 = 59 * 71

4301 = 11 * 17 * 23
4303 = 13 * 331
4307 = 59 * 73
4309 = 31 * 139

4571 = 7 * 653
4573 = 17 * 269
4577 = 23 * 199
4579 = 19 * 241

4841 = 47 * 103
4843 = 29 * 167
4847 = 37 * 131
4849 = 13 * 373

6401 = 37 * 173
6403 = 19 * 337
6407 = 43 * 149
6409 = 13 * 17 * 29

6431 = 59 * 109
6433 = 7 * 919
6437 = 41 * 157
6439 = 47 * 137

6641 = 29 * 229
6643 = 7 * 13 * 73
6647 = 17^2 * 23
6649 = 61 * 109

7091 = 7 * 1013
7093 = 41 * 173
7097 = 47 * 151
7099 = 31 * 229

7271 = 11 * 661
7273 = 7 * 1039
7277 = 19 * 383
7279 = 29 * 251

7421 = 41 * 181
7423 = 13 * 571
7427 = 7 * 1061
7429 = 17 * 19 * 23

8021 = 13 * 617
8023 = 71 * 113
8027 = 23 * 349
8029 = 7 * 31 * 37

8471 = 43 * 197
8473 = 37 * 229
8477 = 7^2 * 173
8479 = 61 * 139

8651 = 41 * 211
8653 = 17 * 509
8657 = 11 * 787
8659 = 7 * 1237

8981 = 7 * 1283
8983 = 13 * 691
8987 = 11 * 19 * 43
8989 = 89 * 101

9071 = 47 * 193
9073 = 43 * 211
9077 = 29 * 313
9079 = 7 * 1297

9701 = 89 * 109
9703 = 31 * 313
9707 = 17 * 571
9709 = 7 * 19 * 73

9911 = 11 * 17 * 53
9913 = 23 * 431
9917 = 47 * 211
9919 = 7 * 13 * 109

two decades in a row can have the same non-empty prime pattern (same last digits) only when one decade is a candidate (but failed) prime decade 10*(3*n + 1).  here are those repeated patterns, with the candidate (but failed) prime decade marked "decade".

373 379 decade
383 389

787
797 decade

1249 decade
1259

1399 decade
1409

1543 1549 decade
1553 1559

1801
1811 decade

2341 2347
2351 2357 decade

2767
2777 decade

2887
2897 decade

2917
2927 decade

3109 decade
3119

3313 3319 decade
3323 3329

4363 decade
4373

4441 4447
4451 4457 decade

4993 4999 decade
5003 5009

5323 decade
5333

5581
5591 decade

6091
6101 decade

6163 decade
6173

6247
6257 decade

6481
6491 decade

6961 6967
6971 6977 decade

7069 decade
7079

7177
7187 decade

7507
7517 decade

8209 decade
8219

8563 decade
8573

8731 8737
8741 8747 decade

8941
8951 decade

9511
9521 decade

9613 9619 decade
9623 9629

9733 9739 decade
9743 9749

Pari/GP code for prime decades:

sz=4; width=8; a=List(vector(sz)); forprime(p=0, 10^5, listpop(a, 1); listput(a, p); if(a[1] && (a[sz]-a[1]<=width), print1("decade");for(i=1, sz, print1(" ",a[i])); print))

to explore prime constellations other than prime quadruplets (sz=4, width=8), set (sz,width) to one of the following: (2,2) (3,6) (4,8) (5,12) (6,16) (7,20) and more terms at OEIS A008407.  (future work jqvjozns)

prime gaps:

old=2; forprime(p=0, 3012, d=p-old; if(d>=10, print1("gap "old" "p); if(d>10, print(" size "d), print())); old=p)

composite decades:

decade=[1,3,7,9]; for(i=0, 100, d=30*i+10; z=1; for(j=1, 4, if(isprime(d+decade[j]), z=0; break)); if(z, print(); for(j=1, 4 ,e=d+decade[j]; print(e" ", factor(e)))))

consecutive decades having the same prime pattern (but not both empty):

decade=[1,3,7,9];
pattern(n)=my(s=0); for(j=0, 3, i=4-j; s*=2; s+=isprime(n+decade[i])); s;
listdecade(n,trail)=for(i=n, n+9, if(isprime(i), print1(" "i))); print(trail);
for(i=0, 400, n=10*(3*i+1); p=pattern(n); if(!p,next); if(pattern(n-10)==p, listdecade(n-10," "); listdecade(n," decade"); print()); if(pattern(n+10)==p, listdecade(n," decade "); listdecade(n+10,""); print()))

Wednesday, October 08, 2025

[vqojxiut] Newsies love story alternate ending

almost all the characters in the movie are male, suggesting its fictional universe has very few females.  so, at the end, when the protagonist (who had left a few minutes ago intending never to return) returns, his former girlfriend already has a new boyfriend, maybe several.

future post: Handmaid's Tale.

[zowdyire] Lissajous on a disc

in polar coordinates,

r = a + cos(b*(theta+pi/2)/c)

defines a family of pretty curves bounded by a circle, vaguely similar to Lissajous curves bounded by a rectangle.  previously, guilloche patterns.

I experimented with these curves on the Desmos Graphing Calculator.  there are also plenty of other ways to plot curves in polar coordinates.

if b and c are integers and relatively prime, the function is periodic with period 2*pi*c.  the curve has rotational symmetry of degree b.

we use cos and add pi/2 to make the axis of bilateral symmetry be the vertical axis.  (in Wolfram Alpha, use Cos[...] instead of cos(...).)

if a = 0, the curve has rotational symmetry of degree 2*b.

if a = 1, then the curve has cusps (future post falgmxhz), but sometimes the cusps line up with each other in a way that makes it difficult to see them.

between a = 1 and a = 1+(b/c)^2, the curve has rounded cusps.  at a = 1+(b/c)^2 the cusps become flat (zero curvature), and beyond that, curvature keeps the same sign through the whole curve.  it took some effort to find that the flat point occurs at a = 1+(b/c)^2 (still a conjecture).  although curves with flat points are special, I do not think they are pretty.  the eye is not used to seeing curvature decrease to exactly zero.

here are some curves with 6-fold symmetry.  plot theta from 0 to 22*pi because the denominator is 11.  the third curve has flat points.

r = cos(6*(theta+pi/2)/11)

r = 1 + cos(6*(theta+pi/2)/11)

r = 1 + (6/11)^2 + cos(6*(theta+pi/2)/11)

here is a curve with 5-fold symmetry:

r = 1.1 + cos(5*(theta+pi/2)/6)

here is a curve with 3-fold symmetry:

r = 0.309 + cos(3*(theta+pi/2)/5)

the leading constant 0.309 was manually tuned to get approximate tangency at the center.  I do not know how to compute the constant to higher precision.

high symmetry can look like a mesh:

r = 1 + cos(32*(theta+pi/2)/33)

future work: color regions black and white as in a checkerboard.

here is Mathematica 13.1.0 failing to numerically find the flat point:

f[t_,a_,b_]:= a+Cos[b*t]
f1[t_,a_,b_]:= D[f[t,a,b],t]
f2[t_,a_,b_]:= D[f1[t,a,b],t]

k[x_,a_,b_]:= 2*f1[x,a,b]^2 + f[x,a,b]^2 - f[x,a,b]*f2[x,a,b]
q[v_]:= Minimize[k[x,v,6/11],x] //First

q[1.29]
Out= -0.00218099

q[1.3]
Out= 0.000743802

FindRoot[q[x], {x,1.29,1.30}]
FindRoot::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations.

Tuesday, September 09, 2025

[anmmyean] memorial kitchen gadget

"it slices!  it dices!  it circumcises!  the Person Name Memorial Turbo Encabulator is the kitchen tool you cannot live without!  why buy just one?"

"memorial?"

"ah, yes...  inventor Person Name was actually trying to invent a device for anal pleasure, but after, shall we say, an unfortunate accident, his company pivoted to market his invention as a kitchen tool.  the Person Name Memorial TURRRRRRRBO Encabulator!  why buy just one?"

(needs more buttsex puns.)

inspired by someone glancing at a Foreman Grill and remarking that having a kitchen gadget named after you might be the highest honor mankind can bestow.  how many others have achieved it?

Saturday, August 02, 2025

[lugfcqhu] gendered chess piece types

define the ranged pieces queen, rook, and bishop to be female.

define the non-ranged pieces king, knight, and pawn to be male.

but I can't think of any good reason to do this, though it is elegant that the piece types divide half and half.  mnemonic: the sexist trope in fiction that only men are tough enough to do melee combat; women like Katniss and Aerith (but not Tifa) specialize in ranged attacks from afar.

orthodox chess does not have artillery which can kill from afar without moving.  fairy chess could add such truly female pieces.

pawn promotion might be a sex change.

[elgwjvis] AI to draw an endgame

apply neural network machine learning on positions of a theoretically drawn but hard to defend chess endgame such as KRBKR.  can an AI playing the weaker side learn a policy to maintain a draw?  inspired by an AI learning to drive, not falling off the road, in the game Trackmania.

with overfitting, this is of course possible, so seek a small, or the smallest, neural network.

the AI can be tested against a tablebase.

during training, should the AI be immediately punished once it "falls" from a tablebase drawn position, or should it be punished only when checkmated?  the latter might be helpful for the AI to learn the underlying structure of the game.

previously, a human doing the learning.

[bicxxhnq] primes of digits 0 1 2

little-endian radix conversion and unconversion in Pari/GP:

tobase(n,x)= my(l=List); while(x>0, my(r=x%n); listput(l,r); x-=r; x/=n); l;

tonumber(b,L)= my(x=0); my(n=1); foreach(L, d, x+=d*n; n*=b); x;

fixed-width least-significant digits (pads with zeros if necessary to achieve width):

towidthbase(width,n,x)= my(l=List); for(i=1, width, my(r=x%n); listput(l,r); x-=r; x/=n); l;

we demonstrate using these functions to search for primes containing only certain digits in base 10.  we first generate numbers in base 2 then interpret the bit string as base 10.

c=0; for(i=0, 2^10, x=tonumber(10, tobase(2,i)); if(isprime(x), print(x); c+=1)); print("count="c)

11 101 10111 101111 1011001 1100101 10010101 10011101 10100011 10101101 10110011 10111001 11000111 11100101 11110111 11111101 100100111 100111001 101001001 101001011 101100011 101101111 101111011 101111111 110010101 110101001 110111011 111000101 111001001 111010111 1000001011 1000010101 1000011011 1000110101 1001000111 1001001011 1001010011 1001110111 1010000011 1010000111 1010001101 1010010011 1010011111 1010100011 1010110001 1010111111 1011000101 1011110011 1100001101 1100010001 1100101111 1101001001 1101010111 1101110011 1110011101 1110110011 1111011101 1111100101 1111110001 (count=59 up to 10 digits)

note: the next repunit prime after 11 in base 10 is (10^19 - 1)/9 so is beyond the range of all these lists (OEIS A004023).

c=0; for(w=1, 9, for(i=0, 2^w-1, l=towidthbase(w,2,i); for(j=1, w, l[j]+=1); x=tonumber(10,l); if(isprime(x), print(x); c+=1))); print("count="c)

2 11 211 2111 2221 12211 21121 21211 21221 22111 111121 111211 112111 112121 1111211 1121221 1212121 1212221 1221221 2121121 2211211 2221111 11221211 12111221 12121121 12121211 12122111 12122221 12212111 12222121 12222211 21112121 21121211 21122111 21122221 21212111 21222211 22111121 22112221 22221211 111112121 111121121 111221221 112111211 112112111 112212211 112221211 121111121 121112111 121211221 122111111 211122211 211212121 211222111 211222211 212111111 212122121 221112121 221212111 222221221 (count=60 up to 9 digits)

c=0; for(i=0, 3^6, x=tonumber(10, tobase(3,i)); if(isprime(x), print(x); c+=1)); print("count="c)

2 11 101 211 1021 1201 2011 2111 2221 10111 10211 12011 12101 12211 20011 20021 20101 20201 21001 21011 21101 21121 21211 21221 22111 101021 101111 101221 102001 102101 102121 110221 111121 111211 112111 112121 120011 120121 121001 121021 122011 122021 122201 200201 201011 201101 201121 201211 202001 202021 202121 202201 210011 210101 220021 221021 221101 221201 222011 (count=59 up to 6 digits)

previously: composites with low digits.

[hefympwg] fitting a polynomial through points

the following Perl script feeding GP uses Lagrange polynomials to interpolate a polynomial between given points.  input is stdin (or a file or files specified on the command line after the script), one point per line, X and Y coordinates separated by whitespace.  Pari/GP does the heavy lifting of (automatically) multiplying out and simplifying the polynomial.  if inputs are integers or rational numbers, Pari/GP automatically does arbitrary precision arithmetic.  (if the inputs are floating point, be careful, as this method is not numerically stable.  you may wish to increase Pari/GP's floating point precision.)

perl -nlwae 'push @x,$F[0]; push @y,$F[1]; END{ for $i(0..$#x){ $l=1; for $j(0..$#x){ next if $i==$j; $l.="*((x-($x[$j]))/($x[$i]-($x[$j])))";} $_.="+" if defined$_; $_.="($y[$i])*($l)";} print;}' | gp -q

Because perl is only manipulating strings (no BigInt needed), the inputs may be any expressions that Pari/GP can evaluate.  all the extra parentheses in the script support this.  (the parentheses were originally needed to support negative inputs.)  here we demonstrate the script recovering a general quadratic when given input of algebraic expressions.

$ echo -e 'x1 a*x1^2+b*x1+c\nx2 a*x2^2+b*x2+c\nx3 a*x3^2+b*x3+c' | perl lagrangepolynomial.pl | gp -q
a*x^2 + b*x + c

this was inspired by a "guess the next word" puzzle, so input expressions such as 27*(27*(27*(27*(8)+5)+12)+12)+15 (the word "hello" encoded in big-endian base 27) also work.  it is always possible to guess a next value (or word) of a sequence by interpolating a polynomial to the previous values.  (the answer might not be what the puzzle poser is looking for.  unclear what to do with a negative predicted next value when values are encoded words.)  it is also possible to justify any next value by adding it to the interpolation.

runtimes with exact arithmetic:

( echo "allocatemem(10^9)" ; for i in `seq 1 100` ; do echo $i $RANDOM ; done | perl lagrangepolynomial.pl ) | nice time gp -q > /dev/null

100 points: 1.4 seconds
150 points: 7 s
200 points: 22 s
250 points: 56 s
300 points: 120 s
400 points: 400 s
450 points: 655 s
500 points: 1016 s

can runtime be improved?

[mzebapic] to the fairest

Eris tosses a golden apple among Hera, Athena, and Aphrodite, and they immediately start fighting over it, causing the typical amounts of destruction that happens when gods fight each other.

why do they want the golden apple?  golden apples are rare and extremely difficult to obtain.  also, a golden apple might contain golden apple seeds from which more golden apple trees could be grown.  (Demeter enthusiastically dispenses god-level gardening advice about growing such an interesting plant.)

several googol destroyed universes later, Paris points out that the apple is inscribed "to The Fairest", which the goddesses had not noticed.  oops.  (but, they reason, along with the golden apple, Eris probably threw Idiot Balls at all of us, as she normally does, so stupidity was to be expected.  fortunately, nothing of value had been lost in the war.)

they stop fighting and deliver the golden apple to the nymph literally named "The Fairest" -- Callisto -- then tease Eris for having a crush on a nymph.  and maybe something about bear-fucking.

Monday, July 28, 2025

[evzistck] if I had a million dollars

"...I'd buy you various expensive goods."

that's sweet.

"...I'd buy your love."

well, that turned dark.  or maybe it was always dark, 1 always as a means to 2.

(a seemingly lighthearted song by Barenaked Ladies)

create a cover or remix highlighting this darkness.

[foofbzwe] revenge of the Jedi

team A rises to power and nearly genocides ("humanitarian crisises") team B.  team B survivors regroup, play the plucky underdogs for a while, then overthrow team A.  team B, now in power and fully aware that the reason they succeeded was because team A only "nearly" humanitarian crisised team B earlier, avoids making the same mistake and completely humanitarian crisises team A.  then they live happily ever after.

what sections of this narrative make the best fiction stories?  of course, "happily ever after" because fantasy utopia is pleasant.  though discovering one's dark past might not be.  team B overthrowing evil team A, because we love rooting for the underdog.  we also love tragedies: team B, the good guys, logically descending to evil, more evil than even the evil team A that they overthrew.

[clyaebic] worst chess evar

we set up some common chess openings, direct one side to play the worst moves according to MultiPV of the Stockfish chess engine and the other side to play the best moves according to Stockfish, and watch hilarity ensue.

Stockfish 16-1 (Debian sid; NB: this is Stockfish 16 not 16.1; the -1 is Debian versioning), hash 4096M, depth 24, no multithreading, 5 piece syzygy endgame tablebase. multipv set to 400 to find the worst move; multipv disabled when finding the best move. engine restarted (Hash cleared) between each move.  there are (probably) instances of multiple possible moves with the same (terrible) evaluation score; we choose whichever Stockfish MultiPV chooses to sort as last.

in each game below, the side which gets checkmated is unsurprisingly the side playing worst moves, and the other side is playing best moves.  even though these are all quick checkmates, they are not helpmates: the side playing good moves does not know the other side will be playing bad moves so plays best moves preparing the the best response.

(future work: helpmates after common openings.)

many variations of Fool's Mate, Botez Gambit, and Bongcloud happen.  the computer knows the memes.

no opening moves, white playing worst moves:

1.g4 d5 2.f4 Bxg4 3.e3 Bxd1 4.Bc4 dxc4 5.a3 Qd5 6.Ne2 Qxh1+ 7.Ng1 Qxg1#

the next opening is hilariously classified by Scid as ECO code B00b [Reversed Grob (Borg/Basman Defence)].  no opening moves, white playing best moves, black playing worst moves:

1.e4 g5 2.d4 f5 3.Qh5#

1.e4 {end of scripted opening} e5 2.Ba6 Nxa6 3.g4 d5 4.f4 Qh4+ 5.Ke2 Bxg4+ 6.Ke3 exf4+ 7.Kd4 Qf2+ 8.Kxd5 Qc5#

1.e4 e5 {end of opening} 2.Nf3 Qg5 3.Nxg5 Kd8 4.Nxf7+ Ke8 5.Nxh8 h5 6.Qxh5+ Ke7 7.Qxe5+ Kd8 8.Nf7#

1.e4 e5 2.Nf3 {end of opening} Nc6 3.Nd4 exd4 4.Ba6 bxa6 5.Ke2 Rb8 6.Kd3 Qh4 7.Kc4 d5+ 8.Kd3 Qxe4#

1.e4 e5 2.Nf3 Nc6 {end of opening} 3.Bb5 Qg5 4.Nxg5 Kd8 5.Nxf7+ Ke8 6.Nxh8 h5 7.Qxh5+ g6 8.Qxg6+ Kd8 9.Qxg8 Rb8 10.Qxf8#

1.e4 c5 {end of opening} 2.Ba6 Nxa6 3.g4 d5 4.Ke2 dxe4 5.f4 Bxg4+ 6.Ke3 Qd4#

1.e4 c5 {end of opening} 2.Nf3 c4 3.Bxc4 h6 4.Bxf7+ Kxf7 5.Ne5+ Ke8 6.Qh5+ g6 7.Qxg6#

1.e4 e6 {end of opening} 2.Ba6 Nxa6 3.b4 Nxb4 4.Qg4 Nxc2+ 5.Ke2 Nxa1 6.Qg5 Qxg5 7.Kd3 Qb5+ 8.Kd4 Bc5+ 9.Ke5 Be3#

1.e4 e6 {end of opening} 2.d4 Qg5 3.Bxg5 Ba3 4.Nxa3 c5 5.Nb5 g6 6.Nd6+ Kf8 7.Qf3 Kg7 8.Qxf7#

1.e4 e6 2.d4 {end of opening} d5 3.Bh6 Nxh6 4.Qg4 Nxg4 5.Kd1 Nxf2+ 6.Ke1 Nxh1 7.h4 Qxh4+ 8.Ke2 Qf2+ 9.Kd3 Qe1 10.b4 Nf2#

1.e4 c6 {end of opening} 2.Ba6 Nxa6 3.Qg4 d5 4.c4 Bxg4 5.f4 Nb4 6.h3 Nd3+ 7.Kf1 Qb6 8.g3 Qf2#

1.e4 c6 {end of opening} 2.d4 g5 3.Bxg5 f5 4.Qh5#

1.e4 c6 2.d4 {end of opening} d5 3.Qg4 Bxg4 4.Bh6 Nxh6 5.Kd2 dxe4 6.c4 Qxd4+ 7.Ke1 Qd1#

1.e4 d6 {end of opening} 2.Qg4 Bxg4 3.Ba6 Nxa6 4.c4 Nb4 5.e5 dxe5 6.Kf1 Qd3+ 7.Ke1 Nc2#

1.e4 d6 {end of opening} 2.d4 Bh3 3.Nxh3 f5 4.exf5 Kf7 5.Qh5+ Kf6 6.Bg5+ Kxf5 7.Qf7+ Kg4 8.f3#

1.e4 d6 2.d4 {end of opening} Nf6 3.Qg4 Bxg4 4.Ba6 Nxa6 5.Bh6 gxh6 6.b4 Nxb4 7.Kd2 Nxe4+ 8.Ke1 Nxc2+ 9.Kf1 Qd7 10.Nd2 Nxd2#

1.e4 d6 2.d4 Nf6 {end of opening} 3.Nc3 Bh3 4.Nxh3 Nd5 5.Nxd5 f5 6.exf5 Nd7 7.Qh5+ g6 8.fxg6 Rc8 9.gxh7#

1.e4 g6 {end of opening} 2.Qh5 gxh5 3.Ba6 Nxa6 4.c3 Nc5 5.a3 Nd3+ 6.Kd1 d5 7.exd5 Qxd5 8.Ne2 Qb3#

1.e4 g6 {end of opening} 2.d4 g5 3.Bxg5 f5 4.Qh5#

1.e4 g6 2.d4 {end of opening} Bg7 3.Qh5 gxh5 4.Bh6 Nxh6 5.d5 Bxb2 6.Nc3 Bxc3+ 7.Ke2 Bxa1 8.Kd3 c6 9.Kc4 Qa5 10.c3 Qxc3#

1.d4 {end of opening} g5 2.Bxg5 e6 3.Bxd8 Nf6 4.Bxf6 Ba3 5.Nxa3 O-O 6.e3 e5 7.Qg4#

Trompowsky but worse:

1.d4 {end of opening} Nf6 2.Bh6 gxh6 3.Kd2 c5 4.Kc3 Ne4+ 5.Kb3 Qb6+ 6.Ka3 Qb4#

1.d4 Nf6 {end of opening} 2.c4 Nd5 3.cxd5 Nc6 4.dxc6 f5 5.Nf3 Kf7 6.cxd7 Kg8 7.Qb3+ e6 8.Qxe6#

1.d4 d5 {end of opening} 2.Bh6 Nxh6 3.Kd2 c5 4.Kc3 Qa5+ 5.Kb3 c4#

1.d4 d5 {end of opening} 2.c4 Bh3 3.Nxh3 Kd7 4.cxd5 Nc6 5.dxc6+ Ke6 6.Ng5+ Kf5 7.Qd3+ Kg4 8.Qh3#

1.Nf3 {end of opening} g5 2.Nxg5 f6 3.e4 f5 4.Qh5#

1.c4 {end of opening} g5 2.d4 f5 3.Bxg5 e6 4.Bxd8 Bc5 5.dxc5 a6 6.Qd4 Nh6 7.Qxh8+ Ng8 8.Qxg8#

challenge: start from a reasonable position and maximize the number of consecutive worst moves before checkmate.

Sunday, July 20, 2025

[iqtsgzqr] 16-minute mile

running one lap around the track in 4 minutes is just like running a 4-minute mile, except you only have to go around the track once.

[ycastlnl] cardinality of integrability

derivatives are easy; integrals are hard: "most" functions can be differentiated in closed form, but "most" functions do not have closed form integrals.  how can this statement be made mathematically precise?  (what is "most"?)  how small is the set of functions with closed form indefinite integral?

possibly relevant is the Risch algorithm, though we do not care how the antiderivative is obtained.

[piqwhqfy] 102 and 221 for mental arithmetic

102 = 17*6 and 221 = 13*17 have low digit weight, so it is easy to add or subtract those multiples of 17 and 13 without many carries.

17*17 = (4*17) + (13*17) = 68 + 221 = 289, if you already knew 4*17 = 68.

possibly useful for memorizing composites.

can the technique be generalized to decrease combinational depth of ripple carry adders?

Tuesday, June 24, 2025

[sggdczyg] private moon

order the objects in the solar system by decreasing mass.  what is the mass of object number N, where N is human population (currently 8.2 billion)?

at what N do things become messy, for example, the precise definition of the extent of an object affects its place in line (e.g., atmospheres, aggregates of rocks and ice so loosely gravitationally bound that there might be gaps between them)?

sort similarly the objects in the Milky Way galaxy.  currently, everyone gets a star, provocatively presuming that we are space-faring and the only ones space-faring.

inspired by Gaila's Moon.

previously, your patch of the sky.

[knajvmcz] numbers easy to multiply by a single digit

the numbers output by the following Perl script are easy to mentally multiply by any 1-digit number 0 1 2 3 4 5 6 7 8 9:

perl -lwe '$c=0; for(0..1999){ next unless/^[0-9]([0-1]|0+[1-9])*$/; print; ++$c; END{ print"(count=$c)"}}'

0 1 2 3 4 5 6 7 8 9 10 11 20 21 30 31 40 41 50 51 60 61 70 71 80 81 90 91 100 101 102 103 104 105 106 107 108 109 110 111 200 201 202 203 204 205 206 207 208 209 210 211 300 301 302 303 304 305 306 307 308 309 310 311 400 401 402 403 404 405 406 407 408 409 410 411 500 501 502 503 504 505 506 507 508 509 510 511 600 601 602 603 604 605 606 607 608 609 610 611 700 701 702 703 704 705 706 707 708 709 710 711 800 801 802 803 804 805 806 807 808 809 810 811 900 901 902 903 904 905 906 907 908 909 910 911 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1020 1021 1030 1031 1040 1041 1050 1051 1060 1061 1070 1071 1080 1081 1090 1091 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 (count=176)

although some of the multiplications induce carries, they carry into a zero, so it is easy.

modify the subexpression [0-1] in the regular expression to [0-2] to get the larger set of numbers for which it is easy to multiply by 0 1 2 3 4:

perl -lwe '$c=0; for(0..1999){ next unless/^[0-9]([0-2]|0+[1-9])*$/; print; ++$c; END{ print"(count=$c)"}}'

0 1 2 3 4 5 6 7 8 9 10 11 12 20 21 22 30 31 32 40 41 42 50 51 52 60 61 62 70 71 72 80 81 82 90 91 92 100 101 102 103 104 105 106 107 108 109 110 111 112 120 121 122 200 201 202 203 204 205 206 207 208 209 210 211 212 220 221 222 300 301 302 303 304 305 306 307 308 309 310 311 312 320 321 322 400 401 402 403 404 405 406 407 408 409 410 411 412 420 421 422 500 501 502 503 504 505 506 507 508 509 510 511 512 520 521 522 600 601 602 603 604 605 606 607 608 609 610 611 612 620 621 622 700 701 702 703 704 705 706 707 708 709 710 711 712 720 721 722 800 801 802 803 804 805 806 807 808 809 810 811 812 820 821 822 900 901 902 903 904 905 906 907 908 909 910 911 912 920 921 922 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1020 1021 1022 1030 1031 1032 1040 1041 1042 1050 1051 1052 1060 1061 1062 1070 1071 1072 1080 1081 1082 1090 1091 1092 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1120 1121 1122 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1220 1221 1222 (count=250)

modify to [0-3] to get numbers easy to multiply by 0 1 2 3: (count=356) up to 1999

modify to [0-4] to get numbers easy to multiply 0 1 2: (count=500) up to 1999

open problems: generate these lists in order directly, not using filtering.  create a regex that that does not require backtracking.

what is the asymptotic density?  probably something involving sqrt.

investigate numbers on a list divisible by other numbers on the list.  numbers form connections to other numbers, a directed graph.  it also feels a little like the word problem in computer science.

products yielding numbers with small digits might be useful for further connections in the graph:

102 = 2 * 3 * 17
110 = 2 * 5 * 11
111 = 3 * 37
112 = 2^4 * 7
120 = 2^3 * 3 * 5
121 = 11^2
122 = 2 * 61
200 = 2^3 * 5^2
201 = 3 * 67
202 = 2 * 101
210 = 2 * 3 * 5 * 7
212 = 2^2 * 53
220 = 2^2 * 5 * 11
221 = 13 * 17
222 = 2 * 3 * 37

future post piqwhqfy on 221 and 102.

"easy" assumes you have the 10x10 multiplication table memorized.  what if you had more?

[qaxpbods] Hilbert curve integer coordinates

an order N+1 Hilbert curve concatenates 4 copies of order N.  therefore, one can draw an order N curve, then seamlessly continue the curve into an order N+1 with the same step size, and so forth.  in this way, the curve can be continued indefinitely.  (previously, a roller coaster.)

assume a step size of 1 and that the curve starts at the origin.  given as input an index, i.e., a positive integer length from the start of this infinite Hilbert curve, compute the integer coordinates of that index.  note that N, the order of the curve, is not given as input.  it is not just a simple matter of internally computing N from the index then computing coordinates of an order N curve because we want order N to always coincide with the first quarter of N+1.  the standard method of drawing Hilbert curves does not do this.  easiest solution might be to compute the smallest even N containing the index, because the first 1/16 of an order N+2 curve is congruent to and in the same orientation as an order N.

compute the inverse: from non-negative integer coordinates to index.

also consider higher dimensional Hilbert curves.  according to this page, there are many possible definitions of a Hilbert curve of dimension 3 or higher.

the link above also seems to suggest that there are many opportunities for optimization in computing this mapping and its inverse.  the computation does a lot of bit manipulation, so consider implementing it in hardware, e.g., Bluespec.  at what point, if ever, would hardware performance exceed software?

given that all nonnegative integers therefore can be mapped nicely to 2D lattice points in a quarter plane, consider the primes.  a quick internet search finds others have plotted primes along a Hilbert curve.  unlike in the Ulam spiral, there are disappointingly no obvious patterns.  density is high near the origin, and points get sparser further away, thinning out at the rate given by the prime number theorem.

are there integer sequences which look surprisingly nice when plotted on a Hilbert curve?

Wednesday, June 18, 2025

[mjhowdnw] 3D maze of thin rods

fly anywhere, unimpeded by the rods.  you can see quite far because the rods are thin.  slide a cursor that rides on the rods to the exit.

2D mazes are usually overhead view, providing lots of visibility; thin rods with unlimited camera movement approximates that for 3D.

it might be difficult to tell which of a pair of visually intersecting rods is closer.  add artificial visual cues.

Tuesday, June 17, 2025

[ihehqrko] supergun space fountain

at first glance, a giant gun seems not a very practical method for space launch, because very few payloads, certainly not humans, can survive that kind of acceleration.

in contrast, a space elevator, if we could build one, would be a very practical method of getting humans and other fragile cargo to outer space.  (a space elevator is not so great for putting satellites into low earth orbit because it only provides vertical height not horizontal speed.)  one of the most promising designs for a space elevator, promising because it does not require materials with currently unachievable amounts of strength, is a space fountain.  and one of the ways to build a space fountain is a giant gun launching pellets up a tall evacuated tube to space.  the tube does not need to be made of an impossibly strong material because it is actively held up by skimming momentum (somehow) from the pellets shooting upward inside it.  humans then leisurely climb up the outside of the tube to space and beyond.

(at the top of the space fountain, the pellets fall back down to earth.  for energy efficiency, their falling energy at the bottom should be recovered or reflected to launch pellets up again.)

space elevators seem the only realistic way to migrate all humans off the planet before the gradually warming sun boils all water on earth.  alternatively, maybe we can get nuclear pulse propulsion to work, but rockets with radioactive exhaust will be extremely messy near the earth's surface.

(maybe we can increase albedo or play cosmic pinball to survive the warming then red giant sun, but we would still need to get off planet to survive white dwarf sun.)

therefore, the executions of both the world's leading scientist on giant guns and his patron, with the chilling effect those assassinations have on anyone considering continuing such work in the future, may have tremendous consequences on the long-term outcome of our species and survival of intelligent life in the universe.  perhaps that was precisely the moment when humanity went extinct: "Israel, you fool!  you've doomed us all!"

Wednesday, June 04, 2025

[wgiquvdb] mpv watch_later invertible hash

if you quit with Q instead of q (which is possible to do by accident, e.g., CAPS LOCK accidentally on), mpv stores its resume or "watch later" information in ~/.config/mpv/watch_later/ .  by default for privacy (see the manpage documentation of the flag --write-filename-in-watch-later-config), the filename of the media being watched is not written; instead, the resume file filename is the MD5 hash of the full path (or just the filename if --ignore-path-in-watch-later-config).  this hash is computed in mp_get_playback_resume_config_filename in player/configfiles.c .

although MD5 cannot generally be inverted, it can be if the attacker need only check a small universe of possibilities, so this feature is a privacy risk.  check every filename on the filesystem, every file suspected of having been on the filesystem, or every filename of illegal content.

one can disable "watch later" entirely with --no-config, but this disables all configuration.  best would be a way to generally disable it, only enabling it if explicitly invoked for a certain video in the command line or UI.  (capital Q is arguably an implementation of exactly this: improve it with an "are you sure?" dialog.)

another idea is to use a much smaller hash, say, 16 bits (configurable), which permits plausible deniability.  of course, each collision, now more frequent, will lose information about one of the colliding files.

or, create a wrapper around mpv which always copies the file to a random name, then calls mpv on it.

[sdmzsnne] unobvious composites

a multiplication table between pairs of small prime numbers:

* 13 17 19 23 29 31 37 41 43
13 169 221 247 299 377 403 481 533 559
17 221 289 323 391 493 527 629 697 731
19 247 323 361 437 551 589 703 779 817
23 299 391 437 529 667 713 851 943 989
29 377 493 551 667 841 899 1073 1189 1247
31 403 527 589 713 899 961 1147 1271 1333
37 481 629 703 851 1073 1147 1369 1517 1591
41 533 697 779 943 1189 1271 1517 1681 1763
43 559 731 817 989 1247 1333 1591 1763 1849

divisibility by 2, 3, 5, 11 can be checked by well known rules, and 7 can be checked by short division (requiring effort similar to checks of 3 and 11), so the table starts at 13.  it stops at the last prime (43) whose square is less than the cube of the smallest: (13^3 = 2197) < (47^2 = 2209).

45 table entries, after commutativity.

there are many non-obvious composites (without easy divisibility check) of similar size as entries in the table but not in the table above.  the smallest is 13*47 = 611, so the table contains all non-obvious composites only up to 610.

with that in mind, better is a list rather than a table.  below are the 43 non-obvious composites less than 1000:

169 = 13 * 13
221 = 13 * 17
247 = 13 * 19
289 = 17 * 17
299 = 13 * 23
323 = 17 * 19
361 = 19 * 19
377 = 13 * 29
391 = 17 * 23
403 = 13 * 31
437 = 19 * 23
481 = 13 * 37
493 = 17 * 29
527 = 17 * 31
529 = 23 * 23
533 = 13 * 41
551 = 19 * 29
559 = 13 * 43
589 = 19 * 31
611 = 13 * 47
629 = 17 * 37
667 = 23 * 29
689 = 13 * 53
697 = 17 * 41
703 = 19 * 37
713 = 23 * 31
731 = 17 * 43
767 = 13 * 59
779 = 19 * 41
793 = 13 * 61
799 = 17 * 47
817 = 19 * 43
841 = 29 * 29
851 = 23 * 37
871 = 13 * 67
893 = 19 * 47
899 = 29 * 31
901 = 17 * 53
923 = 13 * 71
943 = 23 * 41
949 = 13 * 73
961 = 31 * 31
989 = 23 * 43

the next entry would be 1003 = 17 * 59.

for divisibility and prime factorization, you only need to know one of the factors, probably the smaller one.

previously, on memorizing the primes less than 1000.  memorizing the composites this way seems competitive and also gets you useful prime factorization.

Friday, May 30, 2025

[dlghlxon] two moving rows of dots

consider a horizontal row of dots equally spaced 1 unit apart.  put another such row above it, also with horizontal spacings of 1 unit.  let the vertical spacing between rows be A = sqrt(15)/4 ~= 0.968 .

let the upper row slide horizontally at a constant velocity.  at some snapshot in time, consider a dot in the upper row, and the dot in the lower row that it is closest to.  if the upper dot is directly above the lower dot, that is, their relative horizontal offset is zero, then the distance between them is A.  if their relative horizontal offset is 0.25, then the distance between them is 1 by Pythagoras.  if their relative horizontal offset is 0.5, then the distance between them is sqrt(19)/4 ~= 1.090 .  this is the maximum possible separation: if the offset is greater, then it gets closer to the next dot in the row.  thus, half the time (0 to 0.25) the vertical distance is less than the horizontal distance between dots (namely 1), and the other half of the time (0.25 to 0.5), the vertical distance is greater.

motivation is dots in motion but staying well separated.  rows can be stacked.

previously: dots arranged in rings instead of rows.

if we want the average distance to the nearest dot in the other row to equal 1, then I don't think there is a closed form solution for the vertical space h between rows.  Mathematica:

N[Solve[ 2*Integrate[ Sqrt[h^2+x^2], {x, 0, 1/2}, Assumptions -> Element[h, Reals] && h > 0]==1, {h}, Reals], 50]

yields h ~= 0.95813624081219179188949156285292561053238539746725

(Inverse Symbolic Calculator finds nothing.)

if the rows of dots are not moving, then both the square lattice and equilateral triangular lattice achieve equal separation vertically and horizontally.

[hiexjgic] well separated dots in circles

consider the vertices of a regular n-gon with side length 1, centered on the origin and an additional "inner" point at Cartesian coordinates (inner, 0).  the distance from the inner point to the nearest polygon vertex depends on the rotation of the polygon.

the smallest possible distance is when a polygon vertex is on the X axis, at coordinates (1/(2*sin(Pi/n)), 0).  the distance is abs(inner - 1/(2*sin(Pi/n))).  (if n=1, then let the vertex be at (0,0)).

the largest possible distance is when there are two vertices symmetrically above and below the X axis, at coordinates (1/(2*tan(Pi/n)), +-1/2).  the distance is sqrt((inner - 1/(2*tan(Pi/n)))^2 + 1/4).  (if n=2, let the vertices be at (0, +-1/2)).

let the inner point itself be a vertex of a regular polygon with side length 1, centered on the origin and having one vertex (the inner point) lying on the positive X axis.  let this inner polygon have m sides, so inner = 1/(2*sin(Pi/m)).  in order for inner to actually be inside, m < n.

incidentally, all the coordinates of all the vertices of these regular polygons can be expressed in radicals.

we seek pairs of nested regular polygons such that the gap between them is about 1, or more precisely, that the smallest possible distance as defined above is strictly less than 1 and largest possible distance is strictly greater than 1.  this happens for a 2-gon nested inside a 9-gon, and for all (m, m+6) for m >= 7.  there are no solutions for m = {1, 3, 4, 5, 6}.

for m=1 and n=6, the distance is always exactly 1, not a solution by our definition with "strictly", but maybe it should be.

for m=6 and n=12, the largest possible distance is exactly 1.  this is geometrically surprising: attaching equilateral triangle ears to the vertices of a regular hexagon (and squares to the edges) yields a regular dodecagon (12-gon).  trigonometrically, 1/(2*tan(Pi/12))-1 = sqrt(3)/4.

it is a little surprising that solutions (m, m+6) seem to exist for all m >= 7.  the offset 6 is probably round(2*Pi): in the limit when polygons are nearly circular, adding 1 to the radius adds 2*Pi to the circumference.  future post on the limiting case of two lines of dots.

next, consider fudging to create solutions for m = {3, 4, 5, 6}:

the outer n-gon must still have side length 1, but let the inner m-gon have side length s, different from 1.  among all possible relative orientations (rotations), half the time the distance to the nearest vertex should be less than s; half the time greater.  this probability distribution is from the point of view of a given vertex of the inner polygon.  surprisingly, there are closed form solutions for s, via Mathematica.  we start with the following auxiliary functions:

inner[n_,s_]= s/(2*Sin[Pi/n])
l[n_]= inner[n,1]
x[n_]= l[n]*Cos[Pi/(2*n)]
y[n_]= l[n]*Sin[Pi/(2*n)]
py[n_,inx_]= (x[n]-inx)^2+y[n]^2

let us first consider a regular 9-gon of side length 1 with a concentric equilateral triangle of side length s.

s /. First[Solve[py[9,inner[3,s]] == s^2 && s>0, s]] //Simplify //InputForm

(Sqrt[3]*(-2*Cos[Pi/18] + Sqrt[2*(5 + Cos[Pi/9])])*Csc[Pi/18]*Sec[Pi/18])/16

N[%]

0.9349946

that is, a regular nonagon with side length 1 with a concentric equilateral triangle with side length (Sqrt[3] * (-2*Cos[Pi/18] + Sqrt[2*(5 + Cos[Pi/9])]) * Csc[Pi/18]*Sec[Pi/18])/16 ~= 0.9349946 inside it satisfies our requirements on s.

10-gon with inside it a regular triangle of the following side length:
(Sqrt[3]*(Sqrt[(3 + Sqrt[5])*(20 + Sqrt[2*(5 + Sqrt[5])])] - 2*(1 + Sqrt[5])*Cos[Pi/20]))/8
1.03312

10-gon with inside it a square of the following side length:
(Sqrt[(3 + Sqrt[5])*(12 + Sqrt[2*(5 + Sqrt[5])])] - 2*(1 + Sqrt[5])*Cos[Pi/20])/(2*Sqrt[2])
0.9561354

11-gon with square inside it:
((-2*Cos[Pi/22] + Sqrt[2*(3 + Cos[Pi/11])])*Csc[Pi/11])/(2*Sqrt[2])
1.04714

11-gon with pentagon inside it:
-((((-5 + Sqrt[5])*Cos[Pi/22] + Sqrt[85 - 35*Sqrt[5] - 5*(-3 + Sqrt[5])*Cos[Pi/11]])*Csc[Pi/11])/(Sqrt[10 - 2*Sqrt[5]]*(-3 + Sqrt[5])))
0.967348

12-gon with pentagon inside it:
(-Sqrt[(5*(136 + 15*Sqrt[2] + 68*Sqrt[3] - 56*Sqrt[5] + 9*Sqrt[6] - 5*Sqrt[10] - 28*Sqrt[15] - 3*Sqrt[30]))/2] - (1 + Sqrt[3])*(-5 + Sqrt[5])*Cos[Pi/24])/(Sqrt[5 - Sqrt[5]]*(-3 + Sqrt[5]))
1.05153

12-gon with hexagon inside it:
((2 + Sqrt[3])*Sec[Pi/24])/(Sqrt[2] + Sqrt[6])
0.974261

13-gon with hexagon inside it:
(Csc[Pi/13]*Sec[Pi/26])/4
1.05232

no regular polygon that satisfies our constraints fits in a heptagon or octagon.  future work: relax constraints further.

motivation is a collection of moving dots filling the plane which remain roughly equally spaced, dots staying below some maximum velocity, and whose configuration never repeats.  this can be achieved by having rings of dots rotate independently at speeds none of which are rational multiples of another.  future post: points on lines.

previously vaguely similar: concentric regular polygons that touch, not maintaining any gap.

Wednesday, May 21, 2025

[xmsfbmeq] inscribed polygons

concentrically inscribe a regular M-gon inside a regular N-gon.  rotate their relative orientation and reinscribe, adjusting the size of only the inner polygon so that it just fits in the outer which remains constant size.  if the inner polygon keeps the same orientation and only the outer polygon rotates, then the inner polygon will pulsate in size.

if M and N are relatively prime, then the pulsations might be complicated, with different inner vertices interacting with different outer edges.

consider more than just two polygons.  only the outermost polygon stays the same size.  the relative speeds matter.

interesting might be an N-gon inside an M-gon inside an N-gon, and only the middle M-gon rotates.

the innermost polygon could be a circle, representing the final size inside all the inscriptions.

[chzlegcm] a Bosnian, Croat, and Serb walk into a bar

what major conflicts had 3 main parties?

a Scotsman, Irishman, and Englishman walk into a bar.

they drink all the alcohol.

(a country that does a lot of war typically has a large lower class to populate its enlisted ranks.  lower class tend to drink a lot to numb the burden of servitude.)

even with 3 (or more) major parties, I can't think of any in which they all pairwise fought against each other.  the Bosnians and the Croats did not fight each other, nor did the Scottish and the Irish.

WW2 in Europe had a western front and eastern front, but the western allies and the Soviet Union did not fight each other (until later).

maybe a 3-way struggle for power in a power vacuum induced by the demise of the ruling 4th party.

maybe a dominant player forces the other two to fight over scraps while both of them try to overthrow.

Saturday, May 17, 2025

[mktjcnja] pretty Thomson solutions

solutions to the Thomson problem up to 12 points (excluding 11) have nice symmetry.  (though I feel that the solution for 1 point also lacks pretty symmetry.)

2 . digon . vertex types: 1

3 . equilateral triangle . vertex types: 1

4 . regular tetrahedron . vertex types: 1

5 . triangular dipyramid . vertex types: 2

6 . regular octahedron . vertex types: 1

7 . pentagonal dipyramid . vertex types: 2

8 . square antiprism . vertex types: 1

9 . triaugmented triangular prism . vertex types: 2

10 . gyroelongated square dipyramid . vertex types: 2

12 . regular icosahedron . vertex types: 1

"vertex types" refers to vertex transitivity.  we do not care about face or edge types of the convex hull polyhedron because the Thomson problem is about points (vertices).

https://www.mathpages.com/home/kmath005/kmath005.htm describes some (locally) minimum energy configurations.

maybe we care about the "balanced" entries in this Wikipedia table in which magnitude(sum(r[i])) = 0 (precisely), where r[i] are the positions of the charges as vectors.  the table has no citation, but Laszlo Hars has replicated energy results for small solutions.

assuming we trust the Wikipedia table, the balanced sequence continues 2 3 4 5 6 7 8 9 10 12 14 15 16 17 18 20 22 23 24 27 28 29 30 32 which does not have an OEIS number.

there is also the sequence 2 3 4 6 8 12 24 in which the solution has only one vertex type.  24 is snub cube.  there might be some more entries between 12 and 24, but probably not.  the sequence probably ends at 24.

not all icosahedral geodesic spheres appear in the minimum energy table.  GP(2,0) = 42, GP(3,0) = 92, GP(4,0) = 162 are the first few missing.  clearly GP(n,0) seems to not be preferred.  which geodesic spheres are more likely to be minimum energy solutions?  this is likely similar to how cube is not minimum energy for 8 points, instead square antiprism. do icosahedral geodesic spheres continue to appear as minimum energy configurations, or is there a final geodesic sphere which is a solution?

[esruqntc] fun with the beginning of the primes

{0, 1, 2} are special.  find or create (interesting) theorems that are true precisely for each of the 8 possible subsets of those numbers unioned with the odd primes starting from 3.  then, claim each such theorem defines the primes.

inspired by someone uneducated attempting to troll mathematicians by asking whether 1 is a prime.  in reality, when the relevant set of numbers at beginning of the primes matters (say, for a theorem), mathematicians will uncontroversially state that assumption as part the theorem.  most often, things that are true about primes are interesting because they are true about the larger primes.  {0, 1, 2} are boring.

"prime", when classifying the numbers {0, 1, 2}, is a social construct, not ground truth.  it is a convenience.  the most commonly convenient classification is to exclude 0 and 1 and include 2, but if in some application it is convenient to use a different subset, just state that subset and move on.

[bfganmsg] balanced ternary

first, here are integers from -20 to 100.  to negate a balanced ternary number, swap + and -, leave 0 unchanged.

-+-+-20
-+0--19
-+00-18
-+0+-17
-++--16
-++0-15
-+++-14
----13
--0-12
--+-11
-0--10
-00-9
-0+-8
-+--7
-+0-6
-++-5
---4
-0-3
-+-2
--1
00
+1
+-2
+03
++4
+--5
+-06
+-+7
+0-8
+009
+0+10
++-11
++012
+++13
+---14
+--015
+--+16
+-0-17
+-0018
+-0+19
+-+-20
+-+021
+-++22
+0--23
+0-024
+0-+25
+00-26
+00027
+00+28
+0+-29
+0+030
+0++31
++--32
++-033
++-+34
++0-35
++0036
++0+37
+++-38
+++039
++++40
+----41
+---042
+---+43
+--0-44
+--0045
+--0+46
+--+-47
+--+048
+--++49
+-0--50
+-0-051
+-0-+52
+-00-53
+-00054
+-00+55
+-0+-56
+-0+057
+-0++58
+-+--59
+-+-060
+-+-+61
+-+0-62
+-+0063
+-+0+64
+-++-65
+-++066
+-+++67
+0---68
+0--069
+0--+70
+0-0-71
+0-0072
+0-0+73
+0-+-74
+0-+075
+0-++76
+00--77
+00-078
+00-+79
+000-80
+000081
+000+82
+00+-83
+00+084
+00++85
+0+--86
+0+-087
+0+-+88
+0+0-89
+0+0090
+0+0+91
+0++-92
+0++093
+0+++94
++---95
++--096
++--+97
++-0-98
++-0099
++-0+100

binary and balanced ternary vie to be the most elegant base.  the following list of the powers of 2 is an artistic rendition of an irrational impedance mismatch between base 2 and base 3.  previously, on log(3)/log(2): [1],[2],[3].

+2^01
+-2^12
++2^24
+0-2^38
+--+2^416
++--2^532
+-+0+2^664
+---+-2^7128
+00+++2^8256
+-0+00-2^9512
+++-0-+2^101024
+0-++0--2^112048
+-0-0--0+2^124096
++-+-0++-2^138192
+-+++++-++2^1416384
+--0000--0-2^1532768
+0+000-0+-+2^1665536
+-+-00-++---2^17131072
++++00--+00+2^18262144
+000-0-+--0+-2^19524288
+-00-+-++0+0++2^201048576
++00---0-+-+0-2^212097152
+0-0-00+0-----+2^224194304
+--+-+0+--000+--2^238388608
++----0+0+000+0+2^2416777216
+-+000++-+-00+-+-2^2533554432
+---00+-++++00++++2^2667108864
+00+0+--000-0+000-2^27134217728
+-0+-0+0+00-++-00-+2^28268435456
++0+++-+-00--++00--2^29536870912
+0-+0-++++0-+-0-0-0+2^301073741824
+-0--0-000--+++-+-++-2^312147483648
++-0+-+00-+-00-----++2^324294967296
+-+++---0-+++0-000+-0-2^338589934592
+--0-+00+0-00--+000++-+2^3417179869184
+0+0--0+--+0-+--00+0---2^3534359738368
+-+--0+0++---++0+0+--00+2^3668719476736
+++0++-+-+0+-0-+-0+0+0+-2^37137438953472
+00-+0-----0++-++++-+-0++2^38274877906944
+-00---0000++0--00-+++++0-2^39549755813888
++0-00+000+0--0+00-0000--+2^401099511627776
+0--+0+-00+--0++-0-+000-+--2^412199023255552
+--+--0++00+0++-++0--00-++0+2^424398046511104
+0++0++0-0+-+0--0--0+00-0-+-2^438796093022208
+-+0-+0--++----0+-0++-0-+-+++2^4417592186044416
+---0---+--+000+0+++-++0---00-2^4535184372088832
+00+-00+++--00+-+00--0--00+0-+2^4670368744177664
+-00++0+0-+0+0+---0-0+-0+0+-0--2^47140737488355328
++0+0-+-0--+-0+00+-+0+++-0++-0+2^48281474976710656
+0-+--+++-0++++-0+---+0-+++-+++-2^49562949953421312
+--+++-0-+++00-++0+0+--0-00--0-++2^501125899906842624
++-0-++0-00-00-0-+-0+0+-+0-0+0-0-2^512251799813685248
+-++0-0--+0-+0-+-++++-+----++--+-+2^524503599627370496
+--0--+-+--0--0---00-+++00+--++----2^539007199254740992
+0+-0++++0+-0+-00+00-00-00++--+000+2^5418014398509481984
+-0+++000-0++0++0+-0-+0-+0+-++--00+-2^5536028797018963968
+++00-00-++0-+0-0++0--0--+---+0+00++2^5672057594037927936
+00-0-+00-0-0---++0--0+-0++0+--+-0+0-2^57144115188075855872
+-0-+0--0-+-+-0+-0--0+0+++0-0+0++++--+2^58288230376151711744
++0---0+-+++++0++-0++-+00--++-+00-++--2^59576460752303423488
+0--00++--0000-+-+++0---0-+-0---00--+0+2^601152921504606846976
+--0+0+-+0+0000---00--00+-+++-00+0-+--+-2^612305843009213693952
+0++-+---+-000-00+0-0+0+--0-++0+--++0+++2^624611686018427387904
+-+-+++00+++00-+0+--++-0+0+0-0-0++-0-+00-2^639223372036854775808
+----00-0+00-00--0++--+++-+--+-++-++0--0-+2^6418446744073709551616