Wednesday, October 02, 2024

[okgkwyvp] automorphic rotations of a cube

6 = (6/2)*2 90-degree rotations through a face

3 = 6/2 180-degree rotations through a face

8 = (8/2)*2 120 degree-rotations through a vertex

6 = 12/2 180-degree rotations through an edge

1 identity (no rotation)

the divisions by 2 are to avoid double counting: each face, vertex, and edge pairs with a corresponding one diametrically opposite.  multiplications by 2 are because you can rotate left or right.  sum is 24.  it is nice that all the rotations can be enumerated this way without overlaps.

it can also be computed as (6 faces)*(4 rotations) = (8 vertices)*(3 rotations) = (12 edges)*(2 rotations) = 24.  these can be interpreted as bringing a face (or vertex or edge) to a canonical location, then doing a rotation.

can you visualize a given sequence of rotations?

previously, turning half of a cube.

the octahedron can do the same set of rotations, swapping face and vertex: octahedral group.

a similar enumeration works for the dodecahrdron ((12 + 12) + 20 + 15 + 1 = 60) and icosahedron (same sum to 60).

[lrjzlhie] navigating a 4D maze with WASD

present a 4D maze as an array of 2D slices.  navigate among cells in a slice with the keyboard arrow keys with the right hand.  navigate among slices with the W A S D keys with the left hand.

also possible are the two thumb sticks of typical game controllers.

annotations (perhaps literally the letters W A S D) in each cell signify which WASD moves between slices are available.  the UI is therefore somewhat noisy.

6D analogously possible in 3D.  (unspecified: how to move in 3D.)  as is the norm for 3D, you can't see the whole maze at once.  2^6 = 64 rooms in a 6D maze of order 2 could make a nice little puzzle.  64 is small enough to memorize.

[zbkseudn] 12 faces of the sky

project a dodecahedron onto the celestial sphere, then present each of the 12 faces as star chart images for a monthly calendar.  the images have no correlation with what is visible in the night sky during that month.  (people in urban areas can't see much in the night sky anyway.)

both regular dodecahedron and rhombic dodecahedron would work.  unspecified: map projection of each spherical polygonal face onto flat paper.  regular dodecahedron induces less distortion, but maybe a projected rhombus fits more nicely on a rectangular calendar page.  (but why not pentagonal calendar pages?)

also possible: cube with each face cut in half (pyritohedron) can yield nice rectangular regions.  tetrahedron with each face cut into 3 can yield kites.  (other shapes possible depending on how you cut.)

optimize the orientation of the dodecahedron so that every month has a good collection of labeled interesting objects.  also try to avoid cutting constellations and any other large objects (can't think of any others) awkwardly.  for the regular dodecahedron, a face centered on each of the celestial poles is also desirable.

annotate edges with the name of the month whose map lies beyond the edge.  overlay grid of celestial coordinates (right ascension, declination).

would it be better if the views overlapped?  spherical caps yield circular segments of the sky.  what is the minimum size spherical cap that covers a pentagonal face of a regular dodecahedron (this should be easy)?  how thick should the overlaps be?  maybe variable to avoid cutting constellations awkwardly.

alternative to a star chart: cosmic microwave background.

also possible: various other spherical astronomical bodies (including earth) whose surfaces we've fully mapped.  but these seem less interesting, not looking out at infinity but looking in at something finite.

for a weekly or daily calendar, find equal(ish)-area compact(ish) subdivisions of a sphere into the appropriate number of pieces.  Goldberg polyhedra are pretty.  there exist Goldberg polyhedra of 42 and 362 faces.

[egfgwujd] twin primes adjacent to highly composite numbers

below are some numbers N with many divisors and for which N-1 and N+1 are both prime, i.e., twin primes.

the suffix A indicates a highly composite number (sets a new record for number of divisors among all numbers, not necessarily those between twin primes); B similarly indicates it ties the record for number of divisors (largely composite number); C indicates a new second place in number of divisors; D ties second place number of divisors.

4/A 6/A 12/A 18/A 30/B 42/D 60/A 72/B 108/B 180/A 240/A 420/B 432/D 600/A 660/B 1320/D 2340/D 3360/A 5280/D 5880/D 6300/C 7560/A 9240/A 21840/D 35280/D 42840/B 55440/A 65520/A 92400/D 100800/C 110880/A 128520/B 180180/D 415800/B 453600/D 514080/D 526680/D 540540/D 1867320/D 1912680/D 1921920/D 1940400/C 2489760/D 6652800/D 6846840/D 7068600/D 28828800/B 31600800/B 34594560/D 85765680/D 100900800/C 121080960/D 232792560/A 287567280/D 397837440/D 634888800/D 845404560/D 1259818560/D 1470268800/B 1574773200/D 6299092800/D 10708457760/D 12681068400/B 23827003200/D 32125373280/B 32590958400/C 33816182400/A 34918884000/B 40156716600/B 73329656400/A 135019684800/D 216497080800/B 439977938400/D 449755225920/B 578256719040/D 2126560035600/D 2835413380800/B 2971597028400/D 6278415343200/B 18632716502400/A 18835246029600/C 19275223968000/B 59753194300800/B 62403537596400/D 69712060017600/B 92199821313600/B 130429015516800/A 279490747536000/C 313704270079200/B 448148957256000/D 838472242608000/D 1382997319704000/D 1402111916805600/B 1498809290378400/D

investigated 1169 numbers from 1 to 1516237305382800 in those categories (A, B, C, D) previously generated.  95 numbers (above) are surrounded by twin primes.

inspired by some numbers between twin primes being quite smooth.  if searching for large twin primes (not sure why one would want to do this), is it profitable to restrict to those bracketing a smooth number?  (seems yes.)  if so, how smooth?  perhaps Pierpont, or some other sequence of very smooth numbers.

[vachnlwl] changing square colors every move

knight is the only orthodox chess piece which must change square color every move (parity).  in fairy chess, wazir is another.

for normal movement (not its two square initial move nor diagonal capture), pawn also changes square colors every move.

next simplest are the (0,3) leaper (three-leaper) which obviously cannot reach all squares, and the (2,3) leaper (zebra) which can reach any square.

compose chess puzzles that rely on this parity.  maybe in some chess variant in which all pieces must move every turn.  triangulation is a related technique in endgames.

if a chessboard were colored 4 different colors in a certain way, ferz would also change square color every turn, alternating between 2 of the 4 colors.

[nnlfctcm] (2,3) leaper

zebra or (3,2) leaper is a fairy chess piece that jumps from (0,0) to (3,2) (and 7 other squares by symmetry).

below are the minimum number of moves it takes for a zebra at the square labeled 0 to reach various nearby squares.  it takes 5 moves to make one orthogonal step (wazir move), and 6 moves to reach (2,2) (alfil).

we only give 1/8 of the plane; extend to the rest by symmetry.  we investigated distances only up to 15 (using a-f for 10-15 as in hexadecimal).  farther out, we stop lines at the first square exceeding 15.  things get less interesting farther out with broad regions requiring the same number of moves plus or minus 1 depending on parity.

previously, similar table for the knight.

0
52
434
5416
23434
525452
2543254
54343456
436365436
5436543456
45454545654
745454765456
4565456545676
56565656567656
656565656765678
7656765676567876
67676767676787678
767676767678767898
6787678767876789878
7878787878787898789a
878787878787898789a98
98789878987898789a989a
8989898989898989a989aba
989898989898989a989aba9a
89a989a989a989a989aba9abc
9a9a9a9a9a9a9a9a9aba9abcba
a9a9a9a9a9a9a9a9aba9abcbabc
ba9aba9aba9aba9aba9abcbabcdc
ababababababababababcbabcdcbc
babababababababababcbabcdcbcde
abcbabcbabcbabcbabcbabcdcbcdedc
bcbcbcbcbcbcbcbcbcbcbcdcbcdedcde
cbcbcbcbcbcbcbcbcbcbcdcbcdedcdefe
dcbcdcbcdcbcdcbcdcbcdcbcdedcdefede
cdcdcdcdcdcdcdcdcdcdcdcdedcdefedef
dcdcdcdcdcdcdcdcdcdcdcdedcdefedef
cdedcdedcdedcdedcdedcdedcdefedef
dededededededededededededefedef
ededededededededededededefedef
fedefedefedefedefedefedefedef
efefefefefefefefefefefefefef
fefefefefefefefefefefefefef
ef
f

future work: color.

[glttrljh] strictly weaker than queen

some fairy chess pieces whose movement is a proper subset of queen moves:

ferz
wazir
commoner (ferz + wazir compound)
bishop
bishop + wazir
rook
rook + ferz

underpromotion of a pawn to any of these will probably be rare.

design a chess variant in which underpromotions are more common.  e.g., you may not promote to a piece you already have.

design a chess variant in which underpromotions are permitted but always disadvantageous.  e.g., game scoring is not done by checkmate or stalemate, but by amount of firepower on the board.

[tfseoksh] chess variants more elegant than chess

we propose chess variants based on correcting "nits" of orthodox chess, things that had made orthodox chess inelegant and complicated.  the given answers to questions below correspond to orthodox chess.  other answers would define variants.

two-square initial pawn push?  Y
(if Y:
  en passant capture by pawn?  Y
  en passant capture by other pieces?  N
)

castling?  Y
(if Y:
  castling while in check?  N
  castling through check?  N
  en passant capture of rook?  N
  castling privilege can be regained by moving king and rook back to starting squares?  N
)

passing?  N
(if N:
  outcome when no moves except king moving into check (win, draw, loss, forced pass)?  draw (stalemate)
  outcome for player with no moves at all (win, draw, loss, forced pass)?  draw (stalemate)
)

black guaranteed same number of moves, e.g., draw by mutual checkmate or both kings captured?  N

underpromotion?  Y (future post mpyfvglu)

50-move rule?  Y

[jshrjuga] direct Fibonacci formula without division

golden ratio:

phi = (1 + sqrt(5)) / 2

the version of Binet's formula for the nth Fibonacci number which uses the round-to-the-nearest-integer function is

F[n] = round( phi^n / sqrt(5) )

if that division by sqrt(5) is annoying, another way to write it is

F[n] = round( phi^(n-z) )

where

z = log( Base phi, sqrt(5) ) = log(5) / (2*log(phi)) ~= 1.6722759381845547461703191263944365539

.

not sure what this would be useful for.  you need exp and log to compute exponentiation by the non-integer exponent, in contrast to simpler exponentiation by squaring for the integer exponent in the original formula.

[mlzpqxqu] import with type signature

proposal for a Haskell language extension: when importing a function from another module, one may optionally also specify a type signature for the imported function.  this would be helpful for code understanding.  the reader would have immediately available the type of the imported symbol, not having to go track down the type in the source module (which may be many steps away when modules re-export symbols, and the source module might not even have a type annotation), nor use a tool such as ghci to query it.  (maybe the code currently fails to compile for other reasons, so ghci is not available.)

if a function with the specified type signature is not exported by an imported module, the compiler can offer suggestions of other functions exported by the module which do have, or unify with, the imported type signature.  maybe the function got renamed in a new version of the module.

or, the compiler can do what Hoogle does and search among all modules in its search path for functions with the given signature.  maybe the function got moved to a different module.

the specified type signature may be narrower than how the function was originally defined.  this can limit some of the insanity caused by the Foldable Traversable Proposal (FTP):

import Prelude(length :: [a] -> Int) -- prevent length from being called on tuples and Maybe

various potentially tricky issues:

  1. a situation similar to the diamond problem (multiple inheritance) in object-oriented programming: module A defines a polymorphic function f, imported then re-exported by modules B and C.  module D imports both B and C, unqualified.  B imports and re-exports f from A with a type signature more narrow than originally defined in A.  C does not change the type signature.  what is the type of f as seen by D?  which version of f, which path through B or C, does D see?  solution might be simple: if the function through different paths are not identical, then the user has to qualify.

  2. the following tries to make List.length available only for lists, and Foldable.length available for anything else.  is this asking for trouble?

    import Prelude hiding(length);
    import qualified Prelude(length :: [a] -> Int) as List;
    import qualified Prelude(length) as Foldable;

Tuesday, October 01, 2024

[ctmlagje] bad idea, worse idea

"no good can come of a game of Bad Idea, Worse Idea."

(tautologically.)

Friday, September 27, 2024

[iuggtvmq] Death Star radio telescope

when not obliterating planets, which was most of the time, the Death Star emitter dish was used as a radio telescope by astronomers on board the space station.  may they rest in peace.

inspired by the Arecibo radio dish which could both transmit and receive.

the whole Death Star needs to turn to face its dish toward an observation (or obliteration) target, and it needs to stably keep facing exactly that direction for the duration of the observation.  presumably gyroscopes.  however, any movement of mass inside the space station, e.g., a person walking, will induce via conservation of angular momentum a rotation of the station.  (future work: calculate how much rotation.)  this seems difficult to deal with.  maybe the dish is mechanically isolated from the station: it floats a short distance from the superstructure.

or, the Force keeps the station in line with its target.  the Emperor and Darth Vader are keen astronomers.  this was original purpose for the space station: politics forced them to add a military capability in order to get it built, much like how the Hubble Space Telescope succeeded becoming approved and built because research and development for its design was reused a dozen times over for U.S. spy satellites.

Thursday, September 26, 2024

[aqyyoppn] relativistic bullet

let

(relativistic kinetic energy) = (relativistic mass-energy) - (rest mass-energy)

(rest mass-energy) = m * c^2

let resq = "remaining speed squared" = c^2 - v^2, having units of speed^2.

aside: lorentz = sqrt(c^2/resq) is unitless.  we prefer to work with resq rather than lorentz because with resq, some mistakes can be caught by dimensional analysis.

aside: for very small v, resq has problems with numerical precision.  for very high v, lorentz has problems with numerical precision.

(relativistic mass-energy) = sqrt(c^2/resq) * m * c^2

(relativistic kinetic energy) = (sqrt(c^2/resq)-1) * m * c^2

assume a bullet has mass 100 grain = 6.49 gram.  (aside: the fact that "in" in grain looks like "m" in gram in some fonts is unfortunate.) (another aside: dram is another unit of mass used in firearms, 1/256 lb.  dram sounds similar to gram.  1 dram = 1.77 gram.  "if you are facing a charging rhino, be sure your shotgun shell is loaded with at least ___ [unintelligible]rams of black powder in order to stop it.  but not too much or the gun will explode in your face.")

(rest mass-energy of 100 grain bullet) = 5.82e14 J

at typical bullet speed 0.0000031622777 c = sqrt(1e-11) c = 3110 ft/s = 2121 mph = 948 m/s : (relativistic kinetic energy) = 2911.9 J

0.01 c : (relativistic kinetic energy) = 2.9121e10 J (3162x speed ~= 10,000,000x energy, matching non-relativistic approximation)

0.1 c : 2.93e12 J (10x speed ~= 100x energy, matching non-relativistic approximation)

0.5 c : 9.01e13 J (50x speed ~= 3094x energy, not 2500x by non-relativistic approximation)

0.866 c = sqrt(0.75) c : 5.82e14 J (kinetic energy equals rest mass-energy)

0.9 c : 7.54e14 J

0.99 c : 3.546e15 J

expressing energy in terms of tons of TNT:

(rest mass-energy) = 5.82e14 J = 139 kiloton tnt

typical bullet speed 0.0000031622777 c : (relativistic kinetic energy) = 696 nanoton tnt = 9.74 grain tnt (which unsurprisingly is in the same order of magnitude as typical amounts of black powder in gun rounds)

0.01 c : 6.96 ton tnt

0.1 c : 701 ton tnt

0.5 c : 21.53 kiloton tnt

0.866 c : 139 kiloton tnt

0.9 c : 180 kiloton tnt

0.99 c : 848 kiloton tnt

inspiration: if a SpaceX Starship (approximately 10 kiloton tnt) were to explode on the launchpad, and a significant fraction of its chemical energy were freakishly transferred into a single bullet-sized piece of debris, how far would be safe distance to view the launch and not get hurt by debris?

answer, assuming no air resistance: there is no safe distance.  inverting the equations above, a bullet with relativistic kinetic energy 10 kiloton tnt has speed 0.36 c.  5 kiloton tnt is 0.26 c, because maybe we care about conservation of momentum.  in comparison, speed of low earth orbit is 0.000026 c, and earth escape velocity is 0.000037 c.  a bullet in orbit can hit anywhere on earth; a bullet escaping earth can hit anywhere in the universe.

the SpaceX Starship is of course trying to deliver payloads much more massive than a bullet into orbit or to infinity.  this fact alone is enough to conclude there is no safe distance.

Monday, September 02, 2024

[erlrqhiz] hydrogen as a dipole antenna

if we hypothesize that the 21 cm hydrogen line is produced by a half-wave dipole emitter, then this predicts that the hydrogen atom is 10.5 cm wide.   the actual diameter of the hydrogen atom is about 1e-8 cm, so the error factor between theory and experiment is about 1 billion.

we can go further, seeking greater error.  the 21 cm hydrogen radiation has energy (c*h / (21.106114054160 cm)) = 5.8743262 micro eV = 0.068168725 boltzmann degK per photon.  ascribing that energy change to a change in distance between the hydrogen's electron and proton, the distance change (obtained by solving the quadratic of the Coulomb force) is -(k_C*e^2 / (c*h / (21.106114054160 cm))) + sqrt((k_C*e^2 / (c*h / (21.106114054160 cm)))^2 + bohrradius^2) = 5.7462715e-16 cm via the "units" program.  the error factor compared to the predicted (21.106114054160 cm)/2 dipole antenna is 1.8365051e+16.

these are bad predictions, but not even remotely close to the 1e+50 or 1e+120 error factor of the vacuum energy density, the "worst prediction of all science".

[vajvywgs] Mercator projection distortion in the United States

linear scale factor of the Mercator projection is sec(latitude).  area scale factor is the square of that.

U.S. lower 48 states extends from about 25 degrees north latitude (south Florida, south Texas), 30 degrees (Gulf coast) to 49 degrees north (straight-ish border with Canada across the west and midwest).

sec(25 deg) = 1.103
sec(30 deg) = 1.1547
sec(49 deg) = 1.524

sec(49 deg)/sec(25 deg) = 1.381

square of that = 1.908

lengths in northern states are "too long" by almost 40%; areas are too large by almost double.

Mercator as Web Mercator is very common.  inspired by national weather maps: storm systems in the north look bigger.  perhaps they therefore earn more disaster relief: spoils from winning the Civil War.

in its defense, Mercator is a good projection for conveying raw data: it is easy to determine the latitude and longitude of any given projected point, so easy to re-project data to another map projection.  (getting latitude involves arctan exp, also called the Gudermannian.)  Mercator is also conformal, and that might be scientifically important: is a hurricane eye a circle or an ellipse?  there are likely important meteorological implications of a non-circular eye.  there is no map projection that is both conformal and equal area.

what country suffers the most Mercator distortion between its northern and southern regions?  candidates: Russia, Chile, Greenland, United States (including Alaska and Hawaii), Japan.

how does the Mercator area of Alaska compare to the rest of the United States?

draw a different Mercator projection, a transverse Mercator projection, that makes the South too large than the North by the same factor (1.381) that normal Mercator makes the North too large.  what great circle is the "equator" of this transverse Mercator?  the equator suffers the least area distortion.

draw another transverse Mercator projection with the "equator" running through the middle of the U.S lower 48, trying to minimize area distortion while maintaining conformality.  exactly which great circle should the "equator" be?  for a given region on a sphere, what conformal map projection minimizes the maximum area distortion?

it is not easy to recover latitude and longitude from a traverse Mercator projection.

we now discuss aspect ratio in normal Mercator projection.  the U.S. lower 48 spans about 24 degrees of latitude as described above.  Maine is at longitude -67 (67 west) and northwest Washington state is at -125, so a span of about 58 degrees of longitude.  its aspect ratio in normal Mercator projection is 1.9, wider than tall.  calculating height in Mercator projection involves tangent and logarithm.  (the vertical asymptote of the tangent function causes height to diverge to infinity at the poles.  the input to the logarithm function is always a number greater than one, so logarithm's vertical asymptote at zero never comes into play.)

Thursday, August 22, 2024

[tnhftoso] biodegradable One Ring

now that Peter Jackson has established that New Zealand is Middle Earth, go on a real-life quest to dispose of a replica One Ring into some New Zealand volcano, of which there are conveniently many.

for example, construct a One Ring out of sodium (or other group 1 element) and drop it into Lake Taupo, which is not just a volcano but a supervolcano, the earth's most recently erupting one at that.  the destruction of the One Ring in water will be fiery and explosive.

or, laser engrave the One Ring inscription onto a bagel, perhaps an Everything Bagel.  (incidentally, the bagel in Everything Everywhere All at Once behaved like a black hole.  was it a deliberate reference to the Kerr ring singularity?)  let it decompose at a dormant or extinct volcano.

[tiitqghi] tesseract rooms

connect 8 cubical rooms in tesseract topology, for a 3D game.  when using a door, you see at most two rooms at a time, so you never directly see the weird non-Euclidean geometry/topology (S^3, 3-sphere) of the hypersurface of the tesseract, namely 4 cubes connected like a tetrahedron around a vertex (vertex figure).  previously.

assuming you can't fly, provide an elevator in each room to travel to vertically adjacent rooms.

you can indirectly experience the weird geometry if you travel in certain loops: your orientation becomes off, probably rotated by 90 degrees (fun with parallel transport and the curvature tensor).  also, a loop of only 3 rooms can return you back to where you started, in contrast to needing at least 4 in flat Euclidean space (and loop lengths are always even numbers in flat space).  game encourages mastering this weirdness.

gravity stays consistent with the previous room.  one can get gravity to change orientation by traveling in a loop; let this be the key game mechanic.  you can't get gravity to change orientation traveling only horizontally in a loop through doors; you must use an elevator at least once.  (I think this is true, reasoning by analogy about the square faces of a 3D cube.)

8 rooms = 48 internal faces (wall, floors, ceilings).  although 3D game is the obvious implemention, 2D overhead view is also possible.  you only see the floor (face) that you are on.  leave things at the edge of a room to transfer from a floor to a wall.  (of course, for a 2D game, e.g., Zelda 1 dungeon, one could get similar weirdness with 6 2D rooms with cube topology.)

divide each cube orthogonally into 8 sub-cubes.  the tesseract then has 64 total rooms (but with adjacency very different from the 64 squares of a chess board).  each sub-cube has one special corner surrounded by weird geometry (4 cubes meet at a point).  I think geometry is locally flat (8 cubes meet at a point) around all the other corners.  64 rooms = 384 faces, counting both sides of faces.

most generally, a collection of polygons connected as a graph.  graph edges between pairs of polygon edges (signifying doors), and each polygon also has "up" and "down" edges (signifying elevator) connecting to other polygons.  perhaps bundle polygons into an abstract polyhedron to allow transfer of objects at an edge.

Wednesday, August 14, 2024

[ugvaecin] convenient volcanic land bridge

when has a volcano's lava flow into water conveniently built a bridge over a gap that humans wanted to bridge?

there must be evidence of regular human crossings (over water) before the eruption.  there must now be a road across the land bridge.

Sakurajima, Japan is one possible example.  but the road is there (in part) to visit the volcano famous for the 1914 eruption that created the land bridge.  is (was) there demand for travel to the peninsula (island) apart from that?

Sunday, July 28, 2024

[xfelzoax] roots of 60

we subdivide the Babylonian range 1 to 60 by a geometric progression, i.e., we give values of 60^(a/b).

b=6 is pleasingly near integers: 1, 2, 4, 8 (or 7.7), 15, 30, 60.  (because 60 is close to 64.)

not sure what this might be useful for.  what applications have 1 and 60 as important endpoints?  maybe time expansion or reduction ratios.

previously, roots of 10 and 2.

2: 1 7.74596669241483 60

3: 1 3.91486764116886 15.3261886478711 60

4: 1 2.78315768371374 7.74596669241483 21.5582467177851 60

5: 1 2.26793315526605 5.14352079675504 11.6651613497612 26.4558061866516 60

6: 1 1.97860244646793 3.91486764116886 7.74596669241483 15.3261886478711 30.3244343537066 60

8: 1 1.66827985773183 2.78315768371374 4.64308590463121 7.74596669241483 12.9224402116173 21.5582467177851 35.9651887672942 60

10: 1 1.50596585461492 2.26793315526605 3.41542989237976 5.14352079675504 7.74596669241483 11.6651613497612 17.5673346813141 26.4558061866516 39.8415407734076 60

12: 1 1.40662804126319 1.97860244646793 2.78315768371374 3.91486764116886 5.50676260190201 7.74596669241483 10.8956939562414 15.3261886478711 21.5582467177851 30.3244343537066 42.6551996973686 60

15: 1 1.3138428340886 1.72618299268596 2.26793315526605 2.97970772423825 3.91486764116886 5.14352079675504 6.75777794080228 8.87865812188508 11.6651613497612 15.3261886478711 20.1362031288954 26.4558061866516 34.758771378369 45.667562697194 60

16: 1 1.29161908383696 1.66827985773183 2.15478210142724 2.78315768371374 3.59477957761214 4.64308590463121 5.99709836231608 7.74596669241483 10.0048384026885 12.9224402116173 16.6908703870671 21.5582467177851 27.8450428747567 35.9651887672942 46.4533241656359 60

18: 1 1.25541172535118 1.57605860014924 1.97860244646793 2.48396071110437 3.1183934020321 3.91486764116886 4.91477073992132 6.17006081431015 7.74596669241483 9.72437740983731 12.2080974220499 15.3261886478711 19.2406769334815 24.1549714259868 30.3244343537066 38.0696504522856 47.7930855578203 60

20: 1 1.22717800445368 1.50596585461492 1.84808817224173 2.26793315526605 2.78315768371374 3.41542989237976 4.19134043968205 5.14352079675504 6.31201558722787 7.74596669241483 9.50567994816233 11.6651613497612 14.3152294268302 17.5673346813141 21.5582467177851 26.4558061866516 32.4659834423485 39.8415407734076 48.8926625006703 60

24: 1 1.18601350804415 1.40662804126319 1.66827985773183 1.97860244646793 2.34664922856016 2.78315768371374 3.30086260790137 3.91486764116886 4.64308590463121 5.50676260190201 6.53109483144814 7.74596669241483 9.18682113006406 10.8956939562414 12.9224402116173 15.3261886478711 18.177066763208 21.5582467177851 25.5683718170415 30.3244343537066 35.9651887672942 42.6551996973686 50.5896430294 60

25: 1 1.17794781252771 1.38756104903882 1.63447450246393 1.92532566480971 2.26793315526605 2.67150689920472 3.14689570807088 3.70687891557494 4.36650990990659 5.14352079675504 6.05879907122839 7.1369491124984 8.40695359518908 9.90295259747496 11.6651613497612 13.740951294734 16.1861235196818 19.0664087933125 22.4592345308415 26.4558061866516 31.1635590262233 36.709046185518 43.2413406542096 50.9360426343918 60

30: 1 1.14622983475767 1.3138428340886 1.50596585461492 1.72618299268596 1.97860244646793 2.26793315526605 2.59957264580205 2.97970772423825 3.41542989237976 3.91486764116886 4.48733808943514 5.14352079675504 5.89565699293717 6.75777794080228 7.74596669241483 8.87865812188508 10.1769828319182 11.6651613497612 13.3709559663584 15.3261886478711 17.5673346813141 20.1362031288954 23.0807167850807 26.4558061866516 30.3244343537066 34.758771378369 39.8415407734076 45.667562697194 52.3455228441902 60

solving 60^x = N, where N is a divisor of 60:

60 ^ 0 = 1
60 ^ 0.169293807598781 = 2
60 ^ 0.268324336648371 = 3
60 ^ 0.338587615197563 = 4
60 ^ 0.393088048154066 = 5
60 ^ 0.437618144247152 = 6
60 ^ 0.562381855752848 = 10
60 ^ 0.606911951845934 = 12
60 ^ 0.661412384802437 = 15
60 ^ 0.731675663351629 = 20
60 ^ 0.830706192401219 = 30
60 ^ 1 = 60

[ogmvrrpz] Elon Musk, CEO of Twitter

how much damage could a really bad CEO do?  how much damage could a really bad CEO do in just one day?  how much money should a company rationally be willing to pay to avoid that damage?

is seemingly exorbitant executive compensation we often see nowadays actually market failure as is often decried?

"the purpose of your life may be to serve as a warning to others."

previously on jobs that trust you not to break things.

Saturday, June 15, 2024

[dwrhiuki] timing factorization of random 200-bit numbers

200 bit: mean= 534 ms, std= 1062 ms, n= 10000
201 bit: mean= 564 ms, std= 1112 ms, n= 10000
202 bit: mean= 599 ms, std= 1186 ms, n= 10000

all are about 61 digits (future post ahlvcwcw).

Chebyshev's inequality (because the distribution of factoring times is most definitely not a normal distribution) says 99% are within 10 standard deviations of the mean.  (can we do better than Chebyshev knowing that all values must be positive?)

to get standard error of the mean, divide standard deviation by sqrt(n) = 100.

model name : Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz

GP/PARI CALCULATOR Version 2.15.4 (released)
amd64 running linux (x86-64/GMP-6.2.1 kernel) 64-bit version
compiled: Jul 12 2023, gcc version 12.3.0 (Debian 12.3.0-5)
threading engine: pthread

? for(bitsize=200, 202, gettime; sumt=0; s2t=0; for(i=1, 10000, s=random(2^bitsize); print("dataline ",bitsize," ",s," ",factor(s)); t=gettime; sumt+=t; s2t+=t*t; print("i ",i," t ",t," sumt ",sumt," s2t ",s2t)); print("done ",bitsize))

Wednesday, June 12, 2024

[brggrwyl] prequel evil quote mashup

Wipe them out.  All of them.  Not just the men, but the women and children too.  Dew it!

Now go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass.  This is the thing which the LORD thy God hath commanded thee.

[ikqjyogc] GTA GTA

Grand Theft Auto: Greater Toronto Area

Toronto is the largest metropolitan area in Canada, with many immigrants and large wealth disparities, good ingredients for a GTA game.

[angjyjfk] 7 riffle shuffles

Persi Diaconis says it takes at least 7 riffle shuffles to fully randomize a 52-card deck.  how fast can you do 7 riffle shuffles?  optimize technique.

should a bridge be required after each riffle?  without it, repeated riffle shuffles will bend the cards.

[ltyxoqhq] outhouse stakeback

the phrase "outhouse stake back" (spoonerism of Outback Steak House) straightforwardly suggests a horror or horror-comedy story.

[vkhdrcsg] encoding number size with digit grouping

grouping chunks of digits with commas the standard way makes it easier to tell how large a number is:

1 digit number: 1
2 digits: 22
3 digits: 333
4 digits: 1,333
5 digits: 22,333
6 digits: 333,333
7 digits: 1,333,333
8 digits: 22,333,333
9 digits: 333,333,333
10 digits: 1,333,333,333
11 digits: 22,333,333,333

however, when numbers get even larger, it becomes hard to count the number of groups of 3.  we propose a non-uniform grouping of digits to make counting slightly easier.

the general idea is as follows:

1 + 1 + 1 + 1 + 3 + 3 = 10
10 + 10 + 10 + 10 + 30 + 30 = 100
(1 + 1 + 1 + 1 + 3 + 3) + 10 + 10 + 10 + 30 + 30 = 100

in the third line above, we have substituted the first line into the first "10" in the second line.  this can be continued recursively for larger powers of 10.  (previously, powers of 2.)  groupings of 1, 3, 10, 30, 100, 300, and so forth allow identifying chunks of a power of 10 digits.

here are sample numbers of 1 through 10 digits with inserted commas.  (special cases: optionally omitting commas for numbers of 1 through 4 digits.)

1 digit: 1
2 digits: 1,1 (or 11)
3 digits: 1,1,1 (or 111)
4 digits: 1,1,1,1 (or 1111)
5 digits: 1,1,333
6 digits: 1,1,1,333
7 digits: 1,1,1,1,333
8 digits: 1,1,333,333
9 digits: 1,1,1,333,333
10 digits: 1,1,1,1,333,333

if a number grows or shrinks by one digit, the comma pattern can radically change, as it does between 4 and 5 digits, and between 7 and 8.  this might be confusing compared to the standard system of groups of 3.  but radical change in appearance when a number has changed by a factor of 10 might be beneficial.

(the Indian numbering system (lakh, crore, etc.) has non-uniform digit groupings, though not as extreme as this.)

to handle a number of 10*a + b (a<10) digits, first add commas to the first 10*a digits by itself, then recursively the next b digits, then concatenate.  in other words, treat the length one digit at a time.  in the examples below (and above), for ease of understanding, we also give the number of digits in each digit grouping as the digits of that grouping.

11 digits: 1,1,1,1,333,333,1
12 digits: 1,1,1,1,333,333,1,1
13 digits: 1,1,1,1,333,333,1,1,1
14 digits: 1,1,1,1,333,333,1,1,1,1
15 digits: 1,1,1,1,333,333,1,1,333
16 digits: 1,1,1,1,333,333,1,1,1,333
17 digits: 1,1,1,1,333,333,1,1,1,1,333
18 digits: 1,1,1,1,333,333,1,1,333,333
19 digits: 1,1,1,1,333,333,1,1,1,333,333
20 digits: 1,1,1,1,333,333,1010101010
21 digits: 1,1,1,1,333,333,1010101010,1
22 digits: 1,1,1,1,333,333,1010101010,1,1
23 digits: 1,1,1,1,333,333,1010101010,1,1,1
24 digits: 1,1,1,1,333,333,1010101010,1,1,1,1
25 digits: 1,1,1,1,333,333,1010101010,1,1,333
26 digits: 1,1,1,1,333,333,1010101010,1,1,1,333
27 digits: 1,1,1,1,333,333,1010101010,1,1,1,1,333
28 digits: 1,1,1,1,333,333,1010101010,1,1,333,333
29 digits: 1,1,1,1,333,333,1010101010,1,1,1,333,333
30 digits: 1,1,1,1,333,333,1010101010,1010101010
31 digits: 1,1,1,1,333,333,1010101010,1010101010,1

the length of a number can therefore be read off one digit at a time.  if a digit group size increases, it  increases only by 3 or 10/3 .  the next digit of the length begins when the grouping size decreases to one: ",X,".  this resembles the "ladders" in a previous post about digit sequences.  (originally those digit sequences were developed to serve as sample digit groups for this post, but 333 and 1010101010 etc. ended up being simpler.)

(counterpoint: for just communicating the size of a number, much simpler than the madness proposed here is scientific notation: 120000 = 1.2e5)

below are the sizes of digit groups for numbers whose number of digits is of the form d*10^n .

1 digit: 1
2 digits: 1 1
3 digits: 1 1 1
4 digits: 1 1 1 1
5 digits: 1 1 3
6 digits: 1 1 1 3
7 digits: 1 1 1 1 3
8 digits: 1 1 3 3
9 digits: 1 1 1 3 3
10 digits: 1 1 1 1 3 3
20 digits: 1 1 1 1 3 3 10
30 digits: 1 1 1 1 3 3 10 10
40 digits: 1 1 1 1 3 3 10 10 10
50 digits: 1 1 1 1 3 3 10 30
60 digits: 1 1 1 1 3 3 10 10 30
70 digits: 1 1 1 1 3 3 10 10 10 30
80 digits: 1 1 1 1 3 3 10 30 30
90 digits: 1 1 1 1 3 3 10 10 30 30
100 digits: 1 1 1 1 3 3 10 10 10 30 30
200 digits: 1 1 1 1 3 3 10 10 10 30 30 100
300 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100
400 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100
500 digits: 1 1 1 1 3 3 10 10 10 30 30 100 300
600 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 300
700 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300
800 digits: 1 1 1 1 3 3 10 10 10 30 30 100 300 300
900 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 300 300
1000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300
2000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300 1000
3000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300 1000 1000
4000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300 1000 1000 1000
5000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300 1000 3000
6000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300 1000 1000 3000
7000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300 1000 1000 1000 3000
8000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300 1000 3000 3000
9000 digits: 1 1 1 1 3 3 10 10 10 30 30 100 100 100 300 300 1000 1000 3000 3000

for example, the digit grouping of a 555-digit number is first the digit grouping of a 500-digit number, 1 1 1 1 3 3 10 10 10 30 30 100 300 , then the digit grouping of a 50-digit number 1 1 1 1 3 3 10 30 , then the digit grouping of a 5 digit number, 1 1 3 , so the entire digit grouping is 1 1 1 1 3 3 10 10 10 30 30 100 300 1 1 1 1 3 3 10 30 1 1 3 .  here is an example 555-digit number with commas so inserted:

1,1,1,1,333,333,1010101010,1010101010,1010101010,303030303030303030303030303030,303030303030303030303030303030,1001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001,300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300300,1,1,1,1,333,333,1010101010,303030303030303030303030303030,1,1,333

here is a sample 105-digit number, illustrating that nothing special happens when the length has an internal zero.  the digit grouping is 1 1 1 1 3 3 10 10 10 30 30 1 1 3:

1,1,1,1,333,333,1010101010,1010101010,1010101010,303030303030303030303030303030,303030303030303030303030303030,1,1,333

because internal digit chunks can get arbitrarily long, this method of grouping is not helpful for providing visual breaks for a human reading or transcribing the digits.  it is not too helpful for locating a particular digit by index.  previously, varied separator characters to solve these problems.

source code in Haskell to generate digit group sizes and perform groupings.

Monday, June 10, 2024

[usehtsen] prime gap upper bounds for Eratosthenes's sieve

prime gaps are attractive upper bounds for Eratosthenes's prime sieve because you get a bit extra at the end without having to do another iteration.  for example, using primes only up to 7 seems like it would be sufficient only for sieving to 49, but it actually works for sieving up to 120 because of the prime gap between 7 and 11.

below, we list record and tied-for-record prime gaps.

primes up to 120 is an easy exercise on graph paper.  primes up to 16128 seems doable by hand.  the output of the first could be used for the second, a neat coincidence.

q=prime(1); gap=0; forprime(p=3, +oo, if(p-q>=gap, gap=p-q; print("strictlynextprime("q")^2 - 1 = "p"^2 - 1 = ",p^2-1)); q=p)

strictlynextprime(7)^2 - 1 = 11^2 - 1 = 120
strictlynextprime(13)^2 - 1 = 17^2 - 1 = 288
strictlynextprime(19)^2 - 1 = 23^2 - 1 = 528
strictlynextprime(23)^2 - 1 = 29^2 - 1 = 840
strictlynextprime(31)^2 - 1 = 37^2 - 1 = 1368
strictlynextprime(47)^2 - 1 = 53^2 - 1 = 2808
strictlynextprime(53)^2 - 1 = 59^2 - 1 = 3480
strictlynextprime(61)^2 - 1 = 67^2 - 1 = 4488
strictlynextprime(73)^2 - 1 = 79^2 - 1 = 6240
strictlynextprime(83)^2 - 1 = 89^2 - 1 = 7920
strictlynextprime(89)^2 - 1 = 97^2 - 1 = 9408
strictlynextprime(113)^2 - 1 = 127^2 - 1 = 16128
strictlynextprime(293)^2 - 1 = 307^2 - 1 = 94248
strictlynextprime(317)^2 - 1 = 331^2 - 1 = 109560
strictlynextprime(523)^2 - 1 = 541^2 - 1 = 292680
strictlynextprime(887)^2 - 1 = 907^2 - 1 = 822648
strictlynextprime(1129)^2 - 1 = 1151^2 - 1 = 1324800
strictlynextprime(1327)^2 - 1 = 1361^2 - 1 = 1852320
strictlynextprime(8467)^2 - 1 = 8501^2 - 1 = 72267000
strictlynextprime(9551)^2 - 1 = 9587^2 - 1 = 91910568
strictlynextprime(12853)^2 - 1 = 12889^2 - 1 = 166126320
strictlynextprime(14107)^2 - 1 = 14143^2 - 1 = 200024448
strictlynextprime(15683)^2 - 1 = 15727^2 - 1 = 247338528
strictlynextprime(19609)^2 - 1 = 19661^2 - 1 = 386554920
strictlynextprime(25471)^2 - 1 = 25523^2 - 1 = 651423528
strictlynextprime(31397)^2 - 1 = 31469^2 - 1 = 990297960
strictlynextprime(155921)^2 - 1 = 156007^2 - 1 = 24338184048
strictlynextprime(338033)^2 - 1 = 338119^2 - 1 = 114324458160
strictlynextprime(360653)^2 - 1 = 360749^2 - 1 = 130139841000
strictlynextprime(370261)^2 - 1 = 370373^2 - 1 = 137176159128
strictlynextprime(492113)^2 - 1 = 492227^2 - 1 = 242287419528
strictlynextprime(1349533)^2 - 1 = 1349651^2 - 1 = 1821557821800
strictlynextprime(1357201)^2 - 1 = 1357333^2 - 1 = 1842352872888
strictlynextprime(1561919)^2 - 1 = 1562051^2 - 1 = 2440003326600
strictlynextprime(2010733)^2 - 1 = 2010881^2 - 1 = 4043642396160
strictlynextprime(4652353)^2 - 1 = 4652507^2 - 1 = 21645821385048
strictlynextprime(11113933)^2 - 1 = 11114087^2 - 1 = 123522929843568
strictlynextprime(15203977)^2 - 1 = 15204131^2 - 1 = 231165599465160
strictlynextprime(17051707)^2 - 1 = 17051887^2 - 1 = 290766850260768
strictlynextprime(20831323)^2 - 1 = 20831533^2 - 1 = 433952767130088
strictlynextprime(47326693)^2 - 1 = 47326913^2 - 1 = 2239836694109568
strictlynextprime(122164747)^2 - 1 = 122164969^2 - 1 = 14924279650770960
strictlynextprime(189695659)^2 - 1 = 189695893^2 - 1 = 35984531821067448
strictlynextprime(191912783)^2 - 1 = 191913031^2 - 1 = 36830611467606960
strictlynextprime(387096133)^2 - 1 = 387096383^2 - 1 = 149843609731682688
strictlynextprime(428045491)^2 - 1 = 428045741^2 - 1 = 183223156388239080
strictlynextprime(436273009)^2 - 1 = 436273291^2 - 1 = 190334384439970680
strictlynextprime(1294268491)^2 - 1 = 1294268779^2 - 1 = 1675131672294150840
strictlynextprime(1453168141)^2 - 1 = 1453168433^2 - 1 = 2111698494667675488
strictlynextprime(2300942549)^2 - 1 = 2300942869^2 - 1 = 5294338086401951160
strictlynextprime(3842610773)^2 - 1 = 3842611109^2 - 1 = 14765660135010209880
strictlynextprime(4275912661)^2 - 1 = 4275912997^2 - 1 = 18283431957913522008
strictlynextprime(4302407359)^2 - 1 = 4302407713^2 - 1 = 18510712128881890368
strictlynextprime(10726904659)^2 - 1 = 10726905041^2 - 1 = 115066491758631211680
strictlynextprime(20678048297)^2 - 1 = 20678048681^2 - 1 = 427581697253805839760

OEIS A134266

Tuesday, June 04, 2024

[jbasuxmz] the most insane world leaders who have or have had access to a nuclear arsenal

Kim
Modi
Netanyahu
Putin
Stalin
Truman
Trump

there are probably others.  (South Africa?  Pakistan?)  democracy being mob rule, "the people" (that's you) of every democratic member of the nuclear club are also on the list.

below are several who have tried (are still trying) to join the nuclear club.  does the list below have worse people than the list above?

not Hitler
not Khameini
not Khomeini
not Tojo

also,

not Le Pen

though she has gotten very close to becoming the leader of a nuclear power.

inspired by "I am become death, destroyer of worlds".  perhaps Oppenheimer foresaw that there would ultimately be no way to keep nuclear weapons out of irresponsible hands.  perhaps Oppenheimer foresaw Trump.

previously.

Friday, May 31, 2024

[kgjszhlo] KNNNK

some geometrically pretty chess endgame initial positions: white king and 3 knights in corners, black king in the center of the board.  we give positions in FEN notation.

white to move, win in 20:
N6N/8/8/4k3/8/8/8/K6N w - - 0 1

same position, black to move, draw.  after Ke5-f6, the white knight on h8 is trapped then captured.
N6N/8/8/4k3/8/8/8/K6N b - - 0 1

tangent: giving black additional firepower, a pawn, can counterintuitively cause black to lose via the famous Troitzky-line KNNKP endgame.  the longest I could find (ruining the geometric symmetry) was black to move, lose in 95:
N6N/8/8/4k2p/8/8/8/K6N b - - 0 1

the other corner-and-center symmetric position:

white to move, win in 19:
N6N/8/8/8/3k4/8/8/K6N w - - 0 1

black to move, lose in 20:
N6N/8/8/8/3k4/8/8/K6N b - - 0 1

the first position is on the path of most resistance from the second position.

Saturday, May 25, 2024

[djtfvrnt] sigil numbers

IEEE 754 floating point can represent infinities and Not a Number without crashing (in contrast to integers, which cannot represent those):

float infinity = 1/0.0;
float NaN = 0/0.0;
float negative_infinity = -1/0.0;

the denominator of 0.0 not 0 is needed to avoid a compile-time warning (gcc 7.5.0). 1.0/0 and 0.0/0 also cause the warning.

the infinities may be useful for algorithms which require an initialization value larger or smaller than any value that will be seen in the input, for example, finding the maximum of an array.

I can't think of any numerical use case for NaN.  there are apparently many encodings (bit strings) that are NaN, so maybe useful for steganography.

Thursday, May 23, 2024

[ftsgsdrj] rapid evaluation of sine and cosine via recurrence

evenly spaced evaluations of sine and cosine are common, for example, in Fourier transforms or plotting circles.  the following recurrence is given in the first few paragraphs section 5.5 "Recurrence Relations and Clenshaw's Recurrence Formula" of "Numerical Recipes" Second Edition (section 5.4 in the Third Edition, because they have switched to indexing book sections (and C arrays) from zero).

let
alpha = 2*(sin(delta/2))^2
beta = sin(delta)

in
cos(theta + delta) = cos(theta) - [alpha*cos(theta) + beta*sin(theta)]
sin(theta + delta) = sin(theta) - [alpha*sin(theta) - beta*cos(theta)]

evaluate the expression in square brackets first to avoid losing significance; do NOT use associativity to move the square brackets.

I think the second formula is equivalent via commutativity to the following, but I'm not completely sure with respect to speed and numerical stability.  writing it the following way also makes it more obvious that the expressions in square brackets are matrix-vector multiplication with a constant matrix [alpha , beta ; -beta , alpha], reminiscent of a rotation matrix.  maybe you have fast 2x2 matrix-vector multiplication.

sin(theta + delta) = sin(theta) - [-beta*cos(theta) + alpha*sin(theta)]

Because it is a recurrence, use the new values of cos(theta + delta) and sin(theta + delta) to calculate the next increment cos(theta + delta + delta) and sin(theta + delta + delta ), and so forth.

future work: evaluate the performance and accuracy of the recurrence.  does it work best when delta is small?

this post was motivated by not being able to find the recurrence in Wikipedia, nor other neat or even standard tricks for computing sine and cosine.  the above recurrence is not given on https://en.wikipedia.org/w/index.php?title=Sine_and_cosine&oldid=1204203183#Software_implementations nor https://en.wikipedia.org/w/index.php?title=Trigonometric_functions&oldid=1204409434 , though the latter article seems to currently be being aggressively edited and regularly trimmed by a highly opinionated editor, so who knows what useful information has been deleted.

the other trick that I know of is repeatedly halving the angle to make the Maclaurin (Taylor) series converge faster, then using double-angle formulae to repeatedly double the angle back to the original angle.

[lzkxzkgm] the sproingly-oinglies

a coined word in the style of walkie-talkie: sproingly-oingly.  not sure exactly what it should mean.  maybe chaotic motion of a system with many springs, or nonlinear springs.

Sunday, May 19, 2024

[bvqqdwkp] Pierpont twin primes

below are the 73 twin primes of the form (2^a * 3^b plus and minus 1) less than 2^10000 ~= 10^3010.

(2^2 * 3^0 +- 1), (2^1 * 3^1 +- 1), (2^2 * 3^1 +- 1), (2^1 * 3^2 +- 1), (2^3 * 3^2 +- 1), (2^2 * 3^3 +- 1), (2^6 * 3^1 +- 1), (2^4 * 3^3 +- 1), (2^7 * 3^2 +- 1), (2^5 * 3^4 +- 1), (2^6 * 3^7 +- 1), (2^3 * 3^10 +- 1), (2^18 * 3^1 +- 1), (2^12 * 3^5 +- 1), (2^2 * 3^15 +- 1), (2^18 * 3^5 +- 1), (2^21 * 3^4 +- 1), (2^24 * 3^5 +- 1), (2^27 * 3^4 +- 1), (2^30 * 3^7 +- 1), (2^33 * 3^8 +- 1), (2^43 * 3^2 +- 1), (2^32 * 3^9 +- 1), (2^36 * 3^7 +- 1), (2^11 * 3^24 +- 1), (2^31 * 3^12 +- 1), (2^43 * 3^8 +- 1), (2^32 * 3^15 +- 1), (2^50 * 3^9 +- 1), (2^63 * 3^2 +- 1), (2^66 * 3^25 +- 1), (2^79 * 3^20 +- 1), (2^99 * 3^10 +- 1), (2^57 * 3^64 +- 1), (2^82 * 3^63 +- 1), (2^148 * 3^27 +- 1), (2^63 * 3^88 +- 1), (2^56 * 3^99 +- 1), (2^211 * 3^2 +- 1), (2^275 * 3^16 +- 1), (2^287 * 3^10 +- 1), (2^90 * 3^169 +- 1), (2^148 * 3^135 +- 1), (2^298 * 3^51 +- 1), (2^160 * 3^141 +- 1), (2^363 * 3^52 +- 1), (2^134 * 3^231 +- 1), (2^49 * 3^320 +- 1), (2^529 * 3^44 +- 1), (2^264 * 3^419 +- 1), (2^960 * 3^143 +- 1), (2^541 * 3^476 +- 1), (2^988 * 3^207 +- 1), (2^1015 * 3^332 +- 1), (2^1440 * 3^97 +- 1), (2^1295 * 3^324 +- 1), (2^979 * 3^738 +- 1), (2^258 * 3^1493 +- 1), (2^637 * 3^1320 +- 1), (2^2320 * 3^333 +- 1), (2^1036 * 3^1167 +- 1), (2^2815 * 3^188 +- 1), (2^1063 * 3^1440 +- 1), (2^180 * 3^2251 +- 1), (2^888 * 3^2033 +- 1), (2^300 * 3^2819 +- 1), (2^2176 * 3^2175 +- 1), (2^4014 * 3^1879 +- 1), (2^280 * 3^4311 +- 1), (2^6228 * 3^571 +- 1), (2^6981 * 3^560 +- 1), (2^3505 * 3^2892 +- 1), (2^5899 * 3^2570 +- 1)

is this a statistically high yield of twin primes?

also previously.

[holtfmdc] unopened box of condoms, expired

the title is a 5-word short story of a similar theme as, but one word shorter than, "for sale: baby shoes, never worn".

Saturday, May 18, 2024

[bimfphbt] Steiner trees

Steiner trees are visually appealing.  although they are theoretically NP-complete, I suspect that, like traveling salesman, many instances with small numbers of points can be solved or approximated well enough to be visual appealing.  the Euclidean Steiner tree problem can be quickly approximately solved with an analog computer: soap films.

set up a collection of moving points, perhaps particles colliding with walls, and compute the Euclidean Steiner tree for every frame.

the rectilinear Steiner tree problem requires all segments be horizontal or vertical.  this can be generalized, specifying a different set of angles (slopes) that all segments must be.  aesthetically pleasing might be segments parallel to the edges of a regular hexagon.  also consider continuously uniformly turning the set of permitted angles for a given set of fixed points.

consider the Steiner tree problem on graphs on a pixel grid.  nodes are pixels and edges are adjacency between neighboring pixels.  select a subset of pixels that need to be connected.  a typical display has millions of pixels, so this is no longer a small Steiner tree problem.  does the Steiner tree problem on graphs become easier if the underlying graph is very regular, a lattice?

there are typically many shortest paths between two pixels: binomial function, Manhattan distance.  does this issue of multiple solutions compound when connecting more than two pixels?  if so, how can families of solutions be depicted?

also consider hexagonal pixels.  also consider pixel grids with some pixels missing.  this was inspired by the road network in the game Civilization 4: you can't build a road through water or mountain tiles.

[xmtxeomc] Gotterdammerung-Ragnarok

the most metal hyphenated name "Götterdämmerung-Ragnarök" has thrëëë umlauts!  quite befitting for the name of the final conflict of the gods.

also possible are the Norse spellings/transcriptions Ragnarøkkr, Ragnarøkr, Ragnarøk, Ragnarǫkkr, Ragnarǫkr, Ragnarǫk (o with an ogonek).

of course, with Unicode combining diacritics, you don't have to choose which diacritic you like best to decorate the o: Ragnarø̨̈k.

[gntvazct] commemorative honey

honey famously supposedly has extremely long shelf life.  package or repackage honey into very sturdy containers for long-term storage.  what containers are good for thousands of years?  plastic turns brittle.  rubber gaskets likely also go bad.

this is similar to old wine, sometimes also commemorative, so perhaps glass and cork is the right answer.

label (in a sturdy way) such a container marking a good event.  perhaps eat the honey later to commemorate the good times.

inspired by eating honey from the 1970s.  it tasted different from today's honey.  did the flavor change over time or did it start out that way?

[xbwruagg] Eulerian circuits on two-way roads

as a simple corollary to Euler's theorem, every road network in which all roads are two-way has an Euler cycle that travels on every road once in each direction.  perhaps practically useful for road inspection or tours of the scenery.

which circuit is best?  perhaps fewest sharp turns (including U turns), fewest left turns (assuming right-hand side driving).

[mbcilsqo] peace and understanding

let there be peace on earth.  but do you understand why there is war?  do you want to understand?

be kind to one another.  but do you understand why people are unkind?  do you want to understand?

be wary of policymakers -- people with power, perhaps you as a voter -- who don't understand, who don't want to understand.  often, people and policymakers don't want to understand -- don't want you to understand -- because they satisfied with the status quo, with current power structures that place them on top, in control, and peace and kindness are tools to maintain the status quo.

[xxrrzgip] some numbers less than a decillion

maximal integers strictly less than 10^33, of some nice compactly expressible categories:

? allbefore(10^33)
618033988749894848204586834365638 = floor(N/phi)
757791618667731139247631372100066 = fibonacci(159)
649037107316853453566312041152512 = 2^109
834385168331080533771857328695283 = 3^69
324518553658426726783156020576256 = 4^54
710542735760100185871124267578125 = 5^47
481229803398374426442198455156736 = 6^42
909543680129861140820205019889143 = 7^39
324518553658426726783156020576256 = 8^36
278128389443693511257285776231761 = 9^34
100000000000000000000000000000000 = 10^32
191943424957750480504146841291811 = 11^31
237376313799769806328950291431424 = 12^30
201538126434611150798503956371773 = 13^29
852226929923929274082183837890625 = 15^28
324518553658426726783156020576256 = 16^27
433595865796975883590475106484224 = 18^26
335544320000000000000000000000000 = 20^25
480250763996501976790165756943041 = 23^24
20880467999847912034355032910567 = 23^23
265252859812191058636308480000000 = 30!
774327632846470705223111406467256 = binomial(113,56)
827103710671265770756367677038144 = binomial(114,51)

Pari/GP code:

fibonaccibefore(target)= my(a,b,c); a=0; b=1; for(i=1,+oo, c=a+b; if(target<=c, return(i)); a=b; b=c);

onepowerbefore(base,target)= my(p=1); for(e=0,+oo, my(t=p*base); if(target<=t, return(e)); p=t);

powersbefore(target)= for(base=2,+oo, my(a= onepowerbefore(base,target)); if(a<=base, break); if((base+1)^a < target, next); print(base^a," = ",base,"^",a));

factorialbefore(target)= my(p=1); for(e=1,+oo, my(t=p*e); if(target<=t, return(e-1)); p=t);

centralbinomialbefore(target)= for(n=1,+oo, my(c=binomial(n,floor(n/2))); if(target<=c, return(n-1)));

pascalbefore(n,target)= for(k=0,n/2, if(target<=binomial(n,k), return(k-1))); -1;

selfpowerbefore(target)= for(n=1,+oo, if(target<=n^n, return(n-1)));

binomialsbefore(target)= my(n= centralbinomialbefore(target)); my(k=floor(n/2)); print(binomial(n,k)," = binomial("n","k")"); n+=1; k= pascalbefore(n,target); print(binomial(n,k)," = binomial("n","k")");

allbefore(target)= my(f=fibonaccibefore(target)); my(fx= fibonacci(f)); print(floor(target*fx/fibonacci(f+1))," = floor(N/phi)",); print(fx," = fibonacci(",f,")"); powersbefore(target); my(x=selfpowerbefore(target)); print(x^x," = ",x,"^",x); x= factorialbefore(target); print(x!," = ",x,"!"); binomialsbefore(target);

inspired by espeak-ng which in English can speak short scale numbers up to 10^33-1 (decillion minus one, or nine hundred ninety-nine nonillion, etc.).  (its range in long scale European languages is surprisingly much less.)

perhaps espeak-ng could be modified to handle up to undecillion minus one.

? allbefore(10^36)
618033988749894848204586834365638117 = floor(N/phi)
638817435613190341905763972389505493 = fibonacci(173)
664613997892457936451903530140172288 = 2^119
608266787713357709119683992618861307 = 3^75
332306998946228968225951765070086144 = 4^59
444089209850062616169452667236328125 = 5^51
623673825204293256669089197883129856 = 6^46
311973482284542371301330321821976049 = 7^42
166153499473114484112975882535043072 = 8^39
202755595904452569706561330872953769 = 9^37
100000000000000000000000000000000000 = 10^35
255476698618765889551019445759400441 = 11^34
410186270246002225336426103593500672 = 12^33
442779263776840698304313192148785281 = 13^32
338820052976784335907174521413566464 = 14^31
191751059232884086668491363525390625 = 15^30
481968572106750915091411825223071697 = 17^29
638411683925748518131605316913942641 = 19^28
501096025171921401632658604207540941 = 21^27
768231807465763655682670928358014976 = 24^26
88817841970012523233890533447265625 = 25^25
263130836933693530167218012160000000 = 32!
760401738905937245009910944207609328 = binomial(123,61)
854159945008278200822615808394097481 = binomial(124,56)

Bernoulli numbers (future post fiijydon) not done by the above script:

29149963634884862421418123812691 = numerator(bernfrac(54) < 10^33
84483613348880041862046775994036021/354 = 238654274996836276446459819192192 + 53/354 = bernfrac(58) < 10^33
84483613348880041862046775994036021 = numerator(bernfrac(58) < 10^36
-(10^36) < -1215233140483755572040304994079820246041491/56786730 = -(21399949257225333665810744765191097 + 22298681/56786730) = bernfrac(60)

Friday, May 17, 2024

[fmlclzwx] experiencing e

Euler's game of coincidence (previously) as a solitaire game involving no skill:

separate out the clubs into one pile and diamonds into another pile.  (the rest of the cards will not be used.)  shuffle at least one of the two piles well, and place both piles face down next to each other.  simultaneously flip the top card of each pile and examine if the numbers (ranks) match.  if they match, you have lost and the game is over.  if not, keep flipping successive pairs.  if you make it through all 13 pairs without matching, you have won.

the probability of winning is approximately 1/e = 0.368 .  counterintuitively, the probability does not change with larger decks; it converges asymptotically very quickly to 1/e.  the exact probability with 13 pairs is a rational number which differs from 1/e by less than one part in 14! ~= 10^11.  (it would therefore take roughly 10^22 deals to estimate 1/e to that precision: not an efficient method of computing e.)

it is also counterintuitive that only one of the piles needs to be shuffled.  the other pile could even be in rank order.  you could skip this pile and simply say the ranks in order while dealing out the shuffled suit.  however, I think it's easier to visually detect a match using two piles.

repeatedly playing the game always shuffling the same suit will cause cards in that suit to become more worn than the other suits.  this may be problematic if the cards will also be used in other games.  perhaps rotate among suits.

we use suits of different colors so that if a card should accidentally migrate between piles, it will be easy to spot.  we start with piles face down then flip cards so that there are fewer face-up cards to look at, less distractions that might cause missing a match.  (we could have started with piles face up.)

what is a good way to shuffle just 13 cards?  riffle shuffle is hard to do with so few cards.

add a joker to each suit to make it 14 pairs of cards.

did a play test with only 7 pairs and it also worked fine.

[phnkdtec] fun astronomy with a small telescope

the Moon has texture.  Venus has phases.  Jupiter has moons.  Saturn has rings.  there are many stars, much more than 7, in the Pleiades.  there are many, many stars in the Milky Way.  the Sun has spots.

all of these were discovered soon after the invention of the telescope: the early history of the telescope is practically useful for deciding what astronomical objects are the most exciting to observe with a small modern telescope or binoculars.  Galileo has already tried looking at everything for you.

(Galileo went blind observing the sun directly with a telescope.  don't be like Galileo: to see sunspots without repeating his mistake, project the telescopic image of the sun onto a surface.)

Sunday, May 12, 2024

[mawvhdtz] permutation by primes

we permute the numbers 1..n using the randomness of the prime numbers.

there are many ways to do this.  we implement the "inside-out" variation of the Fisher-Yates shuffle.  the index "c" chains iterations of the loop, because it feels like that would make things more "random". we transform primes by p=(p-1)/2 to prevent them from being all odd.  because the i-th prime is approximately i*log(i), c will cycle around (because of mod) about log(i)/2 times each iteration.

u(n) = my(a=vector(n)); my(c=0); for(i=1, n, my(p=prime(i)); if(2==p, p=0, p=(p-1)/2); c+=p; c%=i; j=c+1; a[i]=a[j]; a[j]=i); a;

note that vectors in Pari/GP are 1-indexed and initialized to zero.  we are permuting numbers 1 through n, so if we were to see a zero in the output, an uninitialized value has gotten through, i.e., there is a bug.  the nthprime function is also 1-indexed, i.e., prime(1)=2 .

here is the permutation of numbers 1 through 30:

u(30)

[3, 10, 29, 6, 18, 15, 28, 21, 5, 27, 17, 12, 26, 20, 25, 16, 24, 7, 19, 11, 23, 1, 9, 8, 13, 14, 2, 4, 30, 22]

step by step: the newest number each iteration is underlined.

iprime(i) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
12 1
23 1 2
35 3 2 1
47 3 2 1 4
511 3 2 1 5 4
613 3 2 1 6 4 5
717 3 2 1 6 7 5 4
819 3 2 1 6 7 8 4 5
923 3 2 1 6 7 8 4 9 5
1029 3 10 1 6 7 8 4 9 5 2
1131 3 10 1 6 7 11 4 9 5 2 8
1237 3 10 1 6 7 11 4 9 5 2 8 12
1341 3 10 1 6 7 13 4 9 5 2 8 12 11
1443 3 10 1 6 7 13 4 9 5 2 8 12 14 11
1547 3 10 1 6 7 15 4 9 5 2 8 12 14 11 13
1653 3 10 1 6 7 15 4 9 5 2 8 12 14 11 13 16
1759 3 10 1 6 7 15 4 9 5 2 17 12 14 11 13 16 8
1861 3 10 1 6 18 15 4 9 5 2 17 12 14 11 13 16 8 7
1967 3 10 1 6 18 15 4 9 5 2 17 12 14 11 13 16 8 7 19
2071 3 10 1 6 18 15 4 9 5 2 17 12 14 20 13 16 8 7 19 11
2173 3 10 1 6 18 15 4 21 5 2 17 12 14 20 13 16 8 7 19 11 9
2279 3 10 22 6 18 15 4 21 5 2 17 12 14 20 13 16 8 7 19 11 9 1
2383 3 10 22 6 18 15 4 21 5 2 17 12 14 20 13 16 8 7 19 11 23 1 9
2489 3 10 22 6 18 15 4 21 5 2 17 12 14 20 13 16 24 7 19 11 23 1 9 8
2597 3 10 22 6 18 15 4 21 5 2 17 12 14 20 25 16 24 7 19 11 23 1 9 8 13
26101 3 10 22 6 18 15 4 21 5 2 17 12 26 20 25 16 24 7 19 11 23 1 9 8 13 14
27103 3 10 22 6 18 15 4 21 5 27 17 12 26 20 25 16 24 7 19 11 23 1 9 8 13 14 2
28107 3 10 22 6 18 15 28 21 5 27 17 12 26 20 25 16 24 7 19 11 23 1 9 8 13 14 2 4
29109 3 10 29 6 18 15 28 21 5 27 17 12 26 20 25 16 24 7 19 11 23 1 9 8 13 14 2 4 22
30113 3 10 29 6 18 15 28 21 5 27 17 12 26 20 25 16 24 7 19 11 23 1 9 8 13 14 2 4 30 22
iprime(i) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

note that the inside-out algorithm can be run incrementally, so terminating the algorithm at any step above would result in a permutation of a fewer number of elements.

permuting the digits 0 through 9 yields 2905673841.  permuting the letters a through z yields cjvfroduebqlztypxgskwaihmn.

motivation is a puzzle that requires solving the Riemann Hypothesis.  consider using the above permutation (and additional permutations generated similarly) in a substitution-permutation cipher.

how random are these permutations?  although we've corrected for the bias against even numbers, primes not being multiples of each other likely introduces other biases.  what other structures that look approximately uniformly random can be constructed from the primes?  (previously, bitmaps of gradually decreasing density.)  if we first produce a good cipher, then anything is possible.

[tgjnjvqe] human cubic volume

volume of average human = 62 liter = 0.062 m^3 = 2.2 ft^3 = 16 gallon

blend.  (but how much of the internal volume of a human is gas?)

slurry would fill a cube with side length 40 cm = 1.3 ft.

100 square foot room with 9 ft ceiling fits 411 people.

all of humanity fits in a cube with side length less than 1 km.  16 billion people = 1 cubic kilometer.  67 billion people = 1 cubic mile.

perhaps someday humans gain shapeshifting ability (like Odo), pack themselves into a temperature-controlled Borg Cube, then head for the stars.

Monday, April 29, 2024

[rntkjykf] English SOV

Subject does the thing to Object, the thing of course being Verbing.

inspired by jokes which want the punch line to be the last word of the joke, requiring linguistic contortion if the punch line is a verb, because English is normally Subject-Verb-Object (SVO).

[fqndnuld] Debian all source

here are some scripts to download the sources for every package installed on your Debian or Ubuntu system, then track all the source code in a (typically) giant single git repository.

https://github.com/kenta2/debian-all-source

it has worked pretty well so far for Debian sid.

using git diff, you can view the source code changes made by package upgrades on your system.  unfortunately, the scripts work after you've upgraded; you can't preview source code changes before upgrading.

in an open-source system, although source code is theoretically available, most people never look at it because accessing it is usually a little complicated.  Debian does better than most with "apt-get source"; we've built on this.

seeing changes, often annotated with Changelog or NEWS file, helps understand code.

more commentary in the README.md file in the repository.

Saturday, April 20, 2024

[kyekrrhi] hexagon rectangles

rectangles of width 2 and height sqrt(3) laid in the bricklayer pattern have centers coinciding with centers of the regular hexagon tiling.  each rectangle is a flattened hexagon.

perhaps useful for games normally played on a hexagonal tiling.

Tuesday, March 26, 2024

[untgildg] second collision resistance

collisions in hash functions are unavoidable.  if you find one collision (messages A and B have the same hash), how easy is it to manufacture another collision (messages C and D have the same hash), or even an infinite collection of collisions?

can cryptographic hash functions be designed to prevent collisions from easily yielding more collisions?

[zcyknmrx] Red Line split at JFK and Savin Hill

on official diagrams, the MBTA Red Line is drawn to split into the Ashmont and Braintree lines south of JFK/UMass station.  in reality, the lines have already split north of the station, and the station has separate platforms for each line.  to catch the next northbound (inbound) train, you have to guess which platform to wait on.  there is technology that announces which platform will have the next northbound train, but I don't know how reliable it is or how much advance warning it gives, in case stairs or elevator are slow for you.

but wait, it gets worse.  even though the lines have split as of JFK/UMass, the tracks remain parallel and next to each other through the next station to the south, Savin Hill.  only trains on the Ashmont line stop at Savin Hill.  therefore, to get from North Quincy on the Braintree line to Savin Hill, you board the northbound train at North Quincy, watch from your train as it goes past but does not stop at Savin Hill, get off at JFK/UMass, walk up and over to the Ashmont platform, then take a southbound train back to Savin Hill.

who on earth thought all this was a good idea?  I suspect it has something to do with communities on the Ashmont line being predominantly poor and African-American.

redraw the train diagram to reflect reality, as a way of drawing attention to the stupidity.  JFK/UMass is effectively two stations with free transfer between them.  both branches go through Savin Hill, but only the Ashmont line gets a white dot indicating the train stops there.  only after Savin Hill do the lines go separate directions.

Tuesday, March 19, 2024

[bgjspxdr] 10 acres in a square furlong

one of the few places that multiples of 10 exist in U.S. customary units is obscure units of area:

10 square chain = acre
10 acre = square furlong

however, this feels awkward because 10 congruent squares cannot be arranged into a larger square.  it would have been nice if our counting system were based on a square number.

acre is a square with side length sqrt(10) ~= 3.162277660168379332 chain, or 0.3162277660168379332 furlong.

compare this with the metric system which does area in powers of 100: square meter, are, hectare, square kilometer, (megaare? megare?), (hectomegaare?), square megameter.  (but previously on sqrt(10) elsewhere in the metric system.)

64 square furlong in a square mile, realizable as an 8x8 array of square furlongs.  100 square chain in a square furlong.

partition a square into 10 congruent pieces.  10 strips, or a 2x5 array of rectangles, work.  are there any other ways?

an acre is a strip 1 chain by 10 chain (22 yard by 220 yard).

(a football field is (53 + 1/3) yard wide, or (2 + 14/33) chain.  including end zones, it has area (1 + 117/363) = (1 + 39/121) acre.  excluding end zones, (1 + 37/363) acre.)

partition a square into 10 regions of equal area, optimizing for compactness of the regions by some measure.

Monday, March 18, 2024

[kdxqnhaz] Xingham, Xington

Arlington is the town where people "arl". Birmingham is the ham (old French for "village") where people "birm".

no one knows what those words mean, so invent something:

having lived in Arlington, I can confirm that people there actually do arl, a lot.  I will never forget the looks on the faces of those gerbils.

Sunday, March 17, 2024

[fojocgym] no music of the sphere

prove that spherically symmetric redistributions of mass do not emit gravitational waves.   (you are smarter than Einstein.)

[ybzzorsd] Truth Airlines

"welcome aboard __________ Airlines, where are priorities are

  1. profit
  2. safety"

Saturday, March 16, 2024

[vsibrkyz] astronomically rare dice rolls

obtaining a whole bunch of regular dice (d6) and rolling them simultaneously seems not very difficult.  (Amazon currently sells sets of as many as 100 for under $20.)  consider rolling until they all come up 6.  doing such an exercise allows viscerally trying to experience very low probabilities.  humans generally have difficulty understanding low probabilities.  for a given low probability, you can map it to a number of dice.

below are the reciprocals of probabilities of N dice up to 100, interspersed with some orders of magnitude in base 10 and base 2.  for example, all sixes on 2 dice has a probability of 1 in 36.  100 dice is approximately the probability of breaking 258-bit security by random chance.

is it practically difficult to roll many dice simultaneously?  maybe they land leaned against each other, interfering with landing flat.  beyond a certain number, it becomes difficult to verify between rolls that you haven't lost any.

coins are also easy to obtain, but when flipping many coins simultaneously, it's likely some will roll quite far on their edges before landing on a side.  collisions among dice also might occasionally propel some of them a very long distance.

1 6 (6.0e0)
2 36 (3.6e1)
3 216 (2.2e2)
4 1,296 (1.3e3)
5 7,776 (7.8e3)
6 46,656 (4.7e4)
7 279,936 (2.8e5)
million
8 1,679,616 (1.7e6)
9 10,077,696 (1.0e7)
10 60,466,176 (6.0e7)
11 362,797,056 (3.6e8)
billion
12 2,176,782,336 (2.2e9)
13 13,060,694,016 (1.3e10)
14 78,364,164,096 (7.8e10)
15 470,184,984,576 (4.7e11)
trillion
16 2,821,109,907,456 (2.8e12)
17 16,926,659,444,736 (1.7e13)
18 101,559,956,668,416 (1.0e14)
19 609,359,740,010,496 (6.1e14)
quadrillion
20 3,656,158,440,062,976 (3.7e15)
21 21,936,950,640,377,856 (2.2e16)
22 131,621,703,842,267,136 (1.3e17)
23 789,730,223,053,602,816 (7.9e17)
24 4,738,381,338,321,616,896 (4.7e18)
64 bits
25 28,430,288,029,929,701,376 (2.8e19)
26 170,581,728,179,578,208,256 (1.7e20)
27 1,023,490,369,077,469,249,536 (1.0e21)
28 6,140,942,214,464,815,497,216 (6.1e21)
29 36,845,653,286,788,892,983,296 (3.7e22)
30 221,073,919,720,733,357,899,776 (2.2e23)
31 1,326,443,518,324,400,147,398,656 (1.3e24)
32 7,958,661,109,946,400,884,391,936 (8.0e24)
33 47,751,966,659,678,405,306,351,616 (4.8e25)
34 286,511,799,958,070,431,838,109,696 (2.9e26)
35 1,719,070,799,748,422,591,028,658,176 (1.7e27)
36 10,314,424,798,490,535,546,171,949,056 (1.0e28)
37 61,886,548,790,943,213,277,031,694,336 (6.2e28)
38 371,319,292,745,659,279,662,190,166,016 (3.7e29)
39 2,227,915,756,473,955,677,973,140,996,096 (2.2e30)
40 13,367,494,538,843,734,067,838,845,976,576 (1.3e31)
41 80,204,967,233,062,404,407,033,075,859,456 (8.0e31)
42 481,229,803,398,374,426,442,198,455,156,736 (4.8e32)
43 2,887,378,820,390,246,558,653,190,730,940,416 (2.9e33)
44 17,324,272,922,341,479,351,919,144,385,642,496 (1.7e34)
45 103,945,637,534,048,876,111,514,866,313,854,976 (1.0e35)
46 623,673,825,204,293,256,669,089,197,883,129,856 (6.2e35)
47 3,742,042,951,225,759,540,014,535,187,298,779,136 (3.7e36)
48 22,452,257,707,354,557,240,087,211,123,792,674,816 (2.2e37)
49 134,713,546,244,127,343,440,523,266,742,756,048,896 (1.3e38)
128 bits
50 808,281,277,464,764,060,643,139,600,456,536,293,376 (8.1e38)
51 4,849,687,664,788,584,363,858,837,602,739,217,760,256 (4.8e39)
52 29,098,125,988,731,506,183,153,025,616,435,306,561,536 (2.9e40)
53 174,588,755,932,389,037,098,918,153,698,611,839,369,216 (1.7e41)
54 1,047,532,535,594,334,222,593,508,922,191,671,036,215,296 (1.0e42)
55 6,285,195,213,566,005,335,561,053,533,150,026,217,291,776 (6.3e42)
56 37,711,171,281,396,032,013,366,321,198,900,157,303,750,656 (3.8e43)
57 226,267,027,688,376,192,080,197,927,193,400,943,822,503,936 (2.3e44)
58 1,357,602,166,130,257,152,481,187,563,160,405,662,935,023,616 (1.4e45)
59 8,145,612,996,781,542,914,887,125,378,962,433,977,610,141,696 (8.1e45)
60 48,873,677,980,689,257,489,322,752,273,774,603,865,660,850,176 (4.9e46)
61 293,242,067,884,135,544,935,936,513,642,647,623,193,965,101,056 (2.9e47)
62 1,759,452,407,304,813,269,615,619,081,855,885,739,163,790,606,336 (1.8e48)
63 10,556,714,443,828,879,617,693,714,491,135,314,434,982,743,638,016 (1.1e49)
64 63,340,286,662,973,277,706,162,286,946,811,886,609,896,461,828,096 (6.3e49)
65 380,041,719,977,839,666,236,973,721,680,871,319,659,378,770,968,576 (3.8e50)
66 2,280,250,319,867,037,997,421,842,330,085,227,917,956,272,625,811,456 (2.3e51)
67 13,681,501,919,202,227,984,531,053,980,511,367,507,737,635,754,868,736 (1.4e52)
68 82,089,011,515,213,367,907,186,323,883,068,205,046,425,814,529,212,416 (8.2e52)
69 492,534,069,091,280,207,443,117,943,298,409,230,278,554,887,175,274,496 (4.9e53)
70 2,955,204,414,547,681,244,658,707,659,790,455,381,671,329,323,051,646,976 (3.0e54)
71 17,731,226,487,286,087,467,952,245,958,742,732,290,027,975,938,309,881,856 (1.8e55)
72 106,387,358,923,716,524,807,713,475,752,456,393,740,167,855,629,859,291,136 (1.1e56)
73 638,324,153,542,299,148,846,280,854,514,738,362,441,007,133,779,155,746,816 (6.4e56)
74 3,829,944,921,253,794,893,077,685,127,088,430,174,646,042,802,674,934,480,896 (3.8e57)
192 bits
75 22,979,669,527,522,769,358,466,110,762,530,581,047,876,256,816,049,606,885,376 (2.3e58)
76 137,878,017,165,136,616,150,796,664,575,183,486,287,257,540,896,297,641,312,256 (1.4e59)
77 827,268,102,990,819,696,904,779,987,451,100,917,723,545,245,377,785,847,873,536 (8.3e59)
78 4,963,608,617,944,918,181,428,679,924,706,605,506,341,271,472,266,715,087,241,216 (5.0e60)
79 29,781,651,707,669,509,088,572,079,548,239,633,038,047,628,833,600,290,523,447,296 (3.0e61)
80 178,689,910,246,017,054,531,432,477,289,437,798,228,285,773,001,601,743,140,683,776 (1.8e62)
81 1,072,139,461,476,102,327,188,594,863,736,626,789,369,714,638,009,610,458,844,102,656 (1.1e63)
82 6,432,836,768,856,613,963,131,569,182,419,760,736,218,287,828,057,662,753,064,615,936 (6.4e63)
83 38,597,020,613,139,683,778,789,415,094,518,564,417,309,726,968,345,976,518,387,695,616 (3.9e64)
84 231,582,123,678,838,102,672,736,490,567,111,386,503,858,361,810,075,859,110,326,173,696 (2.3e65)
85 1,389,492,742,073,028,616,036,418,943,402,668,319,023,150,170,860,455,154,661,957,042,176 (1.4e66)
86 8,336,956,452,438,171,696,218,513,660,416,009,914,138,901,025,162,730,927,971,742,253,056 (8.3e66)
87 50,021,738,714,629,030,177,311,081,962,496,059,484,833,406,150,976,385,567,830,453,518,336 (5.0e67)
88 300,130,432,287,774,181,063,866,491,774,976,356,909,000,436,905,858,313,406,982,721,110,016 (3.0e68)
89 1,800,782,593,726,645,086,383,198,950,649,858,141,454,002,621,435,149,880,441,896,326,660,096 (1.8e69)
90 10,804,695,562,359,870,518,299,193,703,899,148,848,724,015,728,610,899,282,651,377,959,960,576 (1.1e70)
91 64,828,173,374,159,223,109,795,162,223,394,893,092,344,094,371,665,395,695,908,267,759,763,456 (6.5e70)
92 388,969,040,244,955,338,658,770,973,340,369,358,554,064,566,229,992,374,175,449,606,558,580,736 (3.9e71)
93 2,333,814,241,469,732,031,952,625,840,042,216,151,324,387,397,379,954,245,052,697,639,351,484,416 (2.3e72)
94 14,002,885,448,818,392,191,715,755,040,253,296,907,946,324,384,279,725,470,316,185,836,108,906,496 (1.4e73)
95 84,017,312,692,910,353,150,294,530,241,519,781,447,677,946,305,678,352,821,897,115,016,653,438,976 (8.4e73)
96 504,103,876,157,462,118,901,767,181,449,118,688,686,067,677,834,070,116,931,382,690,099,920,633,856 (5.0e74)
97 3,024,623,256,944,772,713,410,603,088,694,712,132,116,406,067,004,420,701,588,296,140,599,523,803,136 (3.0e75)
98 18,147,739,541,668,636,280,463,618,532,168,272,792,698,436,402,026,524,209,529,776,843,597,142,818,816 (1.8e76)
99 108,886,437,250,011,817,682,781,711,193,009,636,756,190,618,412,159,145,257,178,661,061,582,856,912,896 (1.1e77)
256 bits
100 653,318,623,500,070,906,096,690,267,158,057,820,537,143,710,472,954,871,543,071,966,369,497,141,477,376 (6.5e77)

[bvvsscqe] irony of fear about vaccines rewriting your DNA

it is deeply ironic that one of the fears antivaxxers have about COVID-19 vaccination is the fear that mRNA vaccines will rewrite your DNA.  it is ironic because COVID-19 the disease will absolutely definitely rewrite your DNA.  because that's what viruses do: they rewrite your DNA, reprogramming your own cells to become virus factories.  viruses are very good at rewriting your DNA.

if it turns out that children and future descendants of people infected with COVID-19 have a higher rate of birth defects or autism or homosexuality or whatever, no biologist will be very surprised, because that's what viruses do: they rewrite your DNA.  most of the time, the COVID-19 virus (SARS-CoV-2) infects and rewrites the DNA of cells in your respiratory system, but everything is connected inside your body, so it is completely plausible that the virus might manage to infect a gamete (sperm or egg cell) and thereby rewrite the DNA of your yet-to-be-conceived children and all your future descendants.

the human genome is absolutely littered with the DNA of viruses which successfully rewrote the DNA of some human ancestor.  most of those virus sequences have been rendered inert by evolution (virus rewrites the human DNA of something critical, baby is stillborn, that virus sequence then fails to propagate through human DNA), but it is an open research question how much virus DNA is still active, how much of what makes us human is actually the result of ancestral viruses which rewrote our DNA.  previously.

if you want to protect the sanctity of your DNA, get vaccinated.

(counterargument: presume that the government (secretly puppeteered of course by the Illuminati, Rothschilds, Freemasons, Lizard People, etc.) and COVID-19 are both equally competent at rewriting your DNA if they are allowed to introduce a foreign substance into your body.  in choosing whether to get vaccinated or let the disease put virus into you, you are trying to choose the lesser evil.  the government has both a documented history of being evil and plainly visible incentives to continue to be evil in order to maintain power.)

[usnvbffm] Puny Gods

mashup: Small Gods (by Terry Pratchett) and MCU (Loki as described by Hulk).

Saturday, March 09, 2024

[aoypoxfn] factorization challenges easy to type

each composite number below consists of repetitions of the digit string 1234567890 except the final few digits.  the smaller factors are large enough that quadratic sieve is probably more efficient than elliptic curve method (ECM).

previously similar for base 2, assuming you have an expression parser.

40 digits: 1234567890123456789012345678901234567759 = 5284744045008013 * 233609779321220631386443

50 digits: 12345678901234567890123456789012345678901234567633 = 92279162895906968524229 * 133786203881810018387538077

60 digits: 123456789012345678901234567890123456789012345678901234567831 = 87988560978576315942371700757 * 1403100444413510291678340665083

70 digits: 1234567890123456789012345678901234567890123456789012345678901234566713 = 61208527479308458227554760703 * 20169867516267279020392646921656369545671

80 digits: 12345678901234567890123456789012345678901234567890123456789012345678901234567751 = 575099128882847693294536030177708942207 * 21467045038333698701383939676398791777593

90 digits: 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567597 = 40166540925345636983244707230202848993 * 3073622626399545288925403158158369054873454157207629

[cvqnvaxd] flying droplets on a ocean planet

model an incompressible liquid under the influence of its own gravity.  the completely static solution is a sphere, and there is probably a rotating hydrostatic solution the shape of an oblate ellipsoid.  exactly which ellipsoidoid (because might not exactly be an ellipsoid)?

what if general relativity?

if the fluid is allowed to move, then things likely become insane due to Navier-Stokes.  turbulence might cause droplets to break off and be ejected faster than escape velocity.

Sunday, March 03, 2024

[zrewobac] Debian t64 suffix packages

the plethora of packages whose names end in "t64" recently added to Debian Sid (Unstable) change the time_t data type from 32 to 64 bits, pushing off the Year 2038 Problem to the year 292,277,026,596.  (previously, 835 bits should be enough for everyone.)

some package examples seen starting 2024-02-28:
libapt-pkg6.0t64
libdb5.3t64
libpam0t64
libssl3t64

Wednesday, February 07, 2024

[zlftyvld] CSB parody

the US Chemical Safety Board's YouTube videos featuring 3D animations of industrial accidents are quite entertaining.  create parody videos in similar style of imaginary fictional accidents, because 3D animation is not too difficult these days.

consult with chemical engineers to get the science right.  or not: invent your own science to make things entertaining.

while it would be easy to invent accidents causing huge loss of life (a large fire under the right weather conditions burning down a city), perhaps the running gag is that the amount of death is always "second only to the Bhopal disaster of 1984".

inspired by an episode that started with a plant that made metal powders, but, despite that initial tease, the accident did not involve a thermite reaction, only a "regular" explosion and fire.

Tuesday, February 06, 2024

[ddfbzyds] sorted Goldberg polyhedra

Goldberg polyhedra are the dual of geodesic polyhedra.  here are the first few Goldberg polyhedra of icosahedral symmetry, sorted by number of faces.  all these Goldberg polyhedra have 12 regular pentagonal faces and the rest are hexagons, usually not regular.  (other than truncated icosahedron, are there any regular hexagons?)

12 faces: GP(1,0) regular dodecahedron
32 faces: GP(1,1) truncated icosahedron
42 faces: GP(2,0) chamfered dodecahedron
72 faces: GP(2,1)
92 faces: GP(3,0)
122 faces: GP(2,2)
132 faces: GP(3,1)
162 faces: GP(4,0)
192 faces: GP(3,2)
212 faces: GP(4,1)
252 faces: GP(5,0)
272 faces: GP(3,3)
282 faces: GP(4,2)
312 faces: GP(5,1)
362 faces: GP(6,0)
372 faces: GP(4,3)
392 faces: GP(5,2)
432 faces: GP(6,1)
482 faces: GP(4,4)
492 faces: GP(5,3)
492 faces: GP(7,0)

we stopped at the first instance where the number of faces does not uniquely identify the polyhedron.

number of faces of GP(m,n) = 2 + 10*((m+n)^2 - m*n), according to Wikipedia.  what is the growth rate of the sorted sequence?

do Goldberg polyhedra have freedom to adjust location of face centers?  as spherical polyhedra, can the faces be adjusted while keeping the same topology so that the faces are more uniform in area?  perhaps move the face centers then Voronoi.

Monday, January 29, 2024

[bpkzwput] parnextprime

parallel version of nextprime in Pari/GP, demonstrating that functions like return and break can be used in the sequential block of an infinite parfor.  (does the runtime system kill speculatively initiated threads?  it probably has to.)

parnextprime(start) = parfor(n=start, +oo, ispseudoprime(n), r, if(r,return(n)))

? #
timer = 1 (on)

? parnextprime(2^5011)-2^5011
cpu time = 3min, 21,456 ms, real time = 17,149 ms.
32405

? nextprime(2^5011)-2^5011
cpu time = 1min, 49,876 ms, real time = 1min, 49,885 ms.
32405

future work: more experiments with the sequential block.

previous pedagogical post on Pari/GP parallel processing.

[bieckfov] next subway train "right behind us", actually 17 minutes behind

MBTA Red Line subway, Park Street station, southbound, 2022-12-17 (13 months ago), 15:46, vehicle 1861 according to Boston Bus Map app.

likely trying to speed up boarding by fooling people into not boarding a crowded train, the conductor lies over the PA speakers: "we do have a train right behind us."

the electronic displays indicate the next southbound subway train is 17 minutes away, definitely not "right behind us".

is it MBTA policy to always say this regardless of how far behind the next train is?

in the event of an emergency, passengers need to trust the conductor's instructions, need to trust that what the conductor says is the truth, need to trust that the conductor has the passengers' best interest in mind.  previous lies break that trust.

Tuesday, January 09, 2024

[hvrryxye] trial division before ispseudoprime in Pari/GP

below is Pari/GP code which prints out a table for the optimal amount of trial division to do before calling ispseudoprime on large primes, automating some of previously discussed.  the table is specific to the computer on which the code is run, specific to the relative speeds of trial division and modular exponentiation.

ispseudoprime internally does trial division only up to 101, so parithreshold is 102.  to confirm this, we use Mersenne prime 2^19937-1.  the first call to ispseudoprome returns immediately.

? #
timer = 1 (on)

? y=2^19937-1;
? ispseudoprime(101*y)
0

? ispseudoprime(103*y)
cpu time = 1,313 ms, real time = 1,316 ms.
0

we construct a composite which will pass ispseudoprime's internal trial division by multiplying large random primes (primes approximately 2^1000 = growthrate).  (unfixed bug: asking for a random prime less than 2^1000 might, with miniscule probability, generate a prime less than 102.)

we do some fine adjustment of growthrate so that the composites are approximately 1000n+buffer bits (buffer = 5) to make the table pretty.  calling randomprime with argument 2^(x+1) will, on average, provide a prime of size 2^x.

the variable "dummy" is to make sure the calls to mod and ispseudoprime do not get optimized away.  this might be more cautious than necessary.

after its small amount of trial division, ispseudoprime does the BPSW primality test, which starts with a Miller-Rabin test with base 2.  when given a composite, with high probability this first test fails, and we assume that this is always the case.  if we are unlucky and hit a composite which has to do the rest of BPSW, then that line's entry in the second column will be too large by a factor of 3 or 4.

the output is probabilistic; do multiple runs to assure yourself of results.

the columns are (1) width in bits of the composite being tested, (2) milliseconds for a failing ispseudoprime test, (3) milliseconds for one trial division, (4) how far (with forprime) you should do trial division for numbers of that size.  for example, if you are testing primality of 10000-bit numbers on the same computer as tested below, you should define a function like this:

mypseudoprime(n) = forprime(p=100, 301720, if(n%p==0,return(0))); ispseudoprime(n)

future work: fit output to a curve; interpolate and extrapolate.

the code:

? print("(bits) (miller-rabin ms) (trial division ms) (forprime limit)"); buffer=5; growthrate=1000; trialdivisioniterations=500000; parithreshold=102; endprime= prime(primepi(parithreshold)+trialdivisioniterations); millerrabiniterations=10; k=randomprime(2^(growthrate+buffer+1)); for(i=2,+oo,desired=growthrate*i+buffer; thisgrow=desired-round(log(k)/log(2)); k*=randomprime(2^(thisgrow+1)); dummy=0; gettime; for(j=1,millerrabiniterations,dummy+=ispseudoprime(k)); timemillerrabin=gettime/millerrabiniterations; forprime(p=parithreshold,endprime,if(k%p==0,dummy+=1)); timetrialdivision=gettime/trialdivisioniterations; printf("%.1f %.1f (%.2e) %.1f\n", log(k)/log(2), timemillerrabin, timetrialdivision, timemillerrabin/timetrialdivision))

example output:

(bits) (miller-rabin ms) (trial division ms) (forprime limit)
2004.2 4.1 (3.12 e-4) 13141.0
3005.2 13.2 (3.84 e-4) 34375.0
4004.5 25.1 (4.50 e-4) 55777.8
5005.4 44.7 (5.20 e-4) 85961.5
6005.5 73.2 (5.92 e-4) 123648.6
7005.7 110.6 (6.60 e-4) 167575.8
8005.7 149.9 (7.26 e-4) 206473.8
8995.9 199.4 (8.00 e-4) 249250.0
10005.2 263.1 (8.72 e-4) 301720.2
11003.1 335.0 (9.40 e-4) 356383.0
12000.7 420.4 (1.01 e-3) 417892.6
13005.2 519.3 (1.07 e-3) 484421.6
14003.4 612.3 (1.14 e-3) 535227.3
15005.9 724.0 (1.22 e-3) 595394.7
16005.6 861.0 (1.29 e-3) 668478.3
17004.4 1011.3 (1.35 e-3) 746898.1
18005.0 1173.8 (1.43 e-3) 818549.5
19003.5 1351.4 (1.49 e-3) 904551.5
20006.1 1556.2 (1.58 e-3) 986185.0
21005.0 1732.7 (1.63 e-3) 1064312.0
22005.3 1909.5 (1.70 e-3) 1123235.3
23005.8 2152.0 (1.77 e-3) 1213077.8
24002.6 2414.8 (1.84 e-3) 1310966.3
25004.9 2666.9 (1.91 e-3) 1399213.0
26005.4 2958.1 (1.98 e-3) 1495500.5
27006.0 3245.6 (2.04 e-3) 1589422.1
28006.0 3560.3 (2.12 e-3) 1677804.0
29005.8 3913.1 (2.19 e-3) 1790073.2
30004.0 4247.4 (2.25 e-3) 1886056.8
31004.0 4618.4 (2.32 e-3) 1987263.3
32004.6 5003.2 (2.39 e-3) 2091638.8
33000.0 5349.2 (2.46 e-3) 2170941.6
34003.2 5781.2 (2.55 e-3) 2265360.5
35004.9 6213.4 (2.60 e-3) 2386098.3
36003.3 6713.6 (2.67 e-3) 2512574.9
37002.1 7305.4 (2.75 e-3) 2656509.1
38005.1 8087.1 (2.81 e-3) 2875924.6
39003.6 8526.0 (2.88 e-3) 2960416.7
39997.8 8835.2 (3.00 e-3) 2943104.6
41005.1 9398.1 (3.02 e-3) 3114015.9
42005.8 9832.8 (3.09 e-3) 3184196.9
43003.1 10339.4 (3.16 e-3) 3267825.5
44005.6 11007.1 (3.23 e-3) 3409882.3
45003.5 11644.2 (3.29 e-3) 3537120.3
46004.8 12352.8 (3.37 e-3) 3667696.0
47005.6 13060.3 (3.44 e-3) 3798807.4
48005.5 13850.3 (3.50 e-3) 3952711.2
49003.3 14825.6 (3.58 e-3) 4145861.3
50005.9 15435.8 (3.65 e-3) 4231304.8
51005.6 16128.1 (3.71 e-3) 4347196.8
52004.8 16998.9 (3.78 e-3) 4497063.5
53005.0 17837.7 (3.85 e-3) 4637987.5
54004.5 18631.3 (3.92 e-3) 4752882.7
55004.8 19613.3 (4.00 e-3) 4903325.0
56004.1 20424.9 (4.06 e-3) 5025812.0
57005.9 21383.3 (4.13 e-3) 5177554.5
58004.2 22470.3 (4.19 e-3) 5357725.3
59003.3 23287.9 (4.27 e-3) 5458954.5
60006.3 24412.8 (4.34 e-3) 5627662.5
61005.9 25196.2 (4.40 e-3) 5726409.1
62003.8 25857.4 (4.48 e-3) 5766592.3
63004.8 26956.6 (4.54 e-3) 5932350.4
64005.4 27839.4 (4.61 e-3) 6038915.4
65005.5 29078.7 (4.70 e-3) 6192227.4
66005.4 29854.0 (4.76 e-3) 6266582.7
67003.5 30966.1 (4.82 e-3) 6424502.1
68006.4 32222.3 (4.90 e-3) 6570615.8
69005.0 33446.1 (4.97 e-3) 6732306.8
70005.6 34635.7 (5.05 e-3) 6861271.8
71005.0 35762.7 (5.10 e-3) 7012294.1
72005.1 36893.8 (5.17 e-3) 7130614.6
73003.9 38375.0 (5.23 e-3) 7334671.3
74005.5 39864.7 (5.32 e-3) 7496182.8

^C
    ***   at top-level: ...errabiniterations,dummy+=ispseudoprime(k));ti
    ***                                             ^--------------------
    *** ispseudoprime: user interrupt after 2h, 29min, 5,695 ms
    ***   Break loop: <Return> to continue; 'break' to go back to GP prompt 
break> break