Deprecated: Optional parameter $pophelp declared before required parameter $event is implicitly treated as a required parameter in /home/bradt/sites/blog.ipsin.org/textpattern/lib/txplib_html.php on line 1425
ipsin.org - Articles tag:blog.ipsin.org,2005:e7bbbf3840bf95cf6fb5759b393ee187/articles Textpattern 2023-02-22T03:17:25Z ipsin bradt@ofb.net https://blog.ipsin.org/ ipsin 2023-02-22T03:11:33Z 2023-02-22T03:17:25Z Taking ReadyNAS NVX to 2023 tag:blog.ipsin.org,2023-02-21:e7bbbf3840bf95cf6fb5759b393ee187/6f7b03f36be12272dfd9a98f6a392a6c ReadyNAS NVX device wakes up from cryo-sleep, and discovers a world that left it behind.

]]>
ipsin 2022-01-24T23:45:33Z 2022-01-24T23:51:04Z If you're looking for a constant... tag:blog.ipsin.org,2022-01-24:e7bbbf3840bf95cf6fb5759b393ee187/1f6301722c11a2e30d590b2e076e3deb If you’re looking for a constant close to these numbers…

0.607
0.608
0.6079
0.60792
0.60793
0.607927
0.6079271
0.60792710
0.607927101
0.607927102
0.6079271018540…

Perhaps the constant you want is 3d5c835c48c6a2b018f64bc1942c938337512a33.

This number is the probability that two large numbers in the range 1..n are coprime, as 9986122ae10c90a07535125d5b7c614135a82519.

If you choose a number in [0,1) and find the closest rational approximation with denominator ≤ n in reduced form, the expected value of the denominator is 45e1c5a0d7b45a77d46f2d507af218e0334cc311 at the same limit.

]]>
ipsin 2022-01-13T01:42:14Z 2022-01-13T02:00:44Z Wordle and the First Word [2] tag:blog.ipsin.org,2022-01-12:e7bbbf3840bf95cf6fb5759b393ee187/08778529093bb8afbe7c1b81a4b2b92b If you’re choosing a first word in Wordle, I think the goal is to minimize the number of remaining candidate words in the worst case.

So for example if you consider the starting word “BAITS”, you can score every possible candidate word against this starting word. Each outcome will be a specific result, which you can store in base 3 (e.g. using “2” for misses, “1” for out of position, and “0” for a match). If you count all the outcomes, the bucket with the largest count is your worst case.

For the first guess the worst-case bucket may be the “22222” bucket (all misses), but not necessarily. You can bucket all the possible words, and the bucket with the most words is that worst case.

Wordle maintains two lists, a list of words that can be chosen as word of the day, and a list of words that will be accepted, but can’t be solutions.

Anagrams are not equivalent in Wordle, because the change in letter order will change which buckets the words go into. So for example, “AROSE” has a worst-case bucket with 867 words in it, but “AEROS” has a worst-case bucket with only 801 words.

Here are some good starting choices.

aisle 906
arise 882
arose 867
saner 840
snare 840
aeros 801
paseo 776
reais 769
serai 697

That would mean that “SERAI” (697) would be the best first word (though it’s never a solution), and “SNARE” or “SANER” (840) would be the best choice that could also be a solution.

]]>
ipsin 2021-06-08T13:46:34Z 2021-06-08T13:50:58Z 250 Problems in Elementary Number Theory tag:blog.ipsin.org,2021-06-08:e7bbbf3840bf95cf6fb5759b393ee187/f63b014369f6fc541fcdbe9616b9a2b4 Since college I’ve had a book, 250 Problems in Elementary Number Theory, with a publication date of 1970. The name and author are printed on the spine.

It fit with my interest in number theory and computation, and the author was “W. Sierpiński”, who is a Big Name in math. I’m wondering if the “W.” was because no one wanted to typeset “Wacław”, but the book was published by Elseview and “PWN – Polish Scientific Publishers” and printed in Poland, so maybe that isn’t it.

The front cover has another imprint “Modern Analytic and Computational Methods in Science and Mathematics, RICHARD BELLMAN, editor”, and it seems like a lot of book sellers think that is the title of books in that series, because it’s so prominent on the front.

The format is great. The first 22 pages lay out 250 problems, usually in two to four lines. For example:

245. Prove that the number 3!!! written in decimal system has more than a thousand digits, and find the number of zeroes at the end of the expansion.

The remainder of the book’s 125 pages are the solutions to the problems, and some of them are pretty interesting.

Some of the problems seemed to involve a lot of work with pen and paper, but I hadn’t really figured out that it was leaning towards computer use. This one caught my attention, though:

96. Prove that the infinite sequence 1, 31, 331, 3331, … contains infinitely many composite numbers, and find the least of them (to solve the second part of the problem, one can use the microfilm containing all primes up to one hundred millions [2])

Under references we have

C.L. Baker and F.J. Gruenberger, The first six millions prime numbers, The RAND Corp., Santa Monica, publ. by the Microcard Foundation, Madison, Wisc., 1959.

I’m curious about the format(s) for this work. At least one source describes them as microprinted cards, which makes sense for “The Microcard Foundation” to publish, but the problem refers to microfilm.

Was it in both formats, and was there a shift from microcards to microfilm? For the curious, generating the first six million primes takes less than half a second now, which is good because I can’t seem to find copies of that microcard anywhere.

time primes 2 | head -6000000 > primes.txt
real    0m0.409s
user    0m0.424s
sys     0m0.075s
]]>
ipsin 2020-08-01T07:29:26Z 2020-08-01T07:41:34Z Infinity is actually kind of big tag:blog.ipsin.org,2020-08-01:e7bbbf3840bf95cf6fb5759b393ee187/ac90474b7800a659c940e7ea39e35432 There’s a fun fact that if you choose two numbers at random, the probability that they have no common factors is 9fea2dc536dd5056cbbe1925641eff440c4d9083, or about 61%.

For the two numbers, if you’re looking at any prime p, they’ll have that factor p in common if both their remainders when divided by p are 0.

And if the numbers are truly “random”, their remainders will be evenly distributed and so the odds that they have p is the same as the odds that they both land on 0, which is 1/p².

And it turns out that that infinite product 003a873d22b9ae9173edd4dd485c3a7efdfd7343 works out to 9fea2dc536dd5056cbbe1925641eff440c4d9083 via math I can’t do. Magic.

But as Wikipedia helpfully points out “There is no way to choose a positive integer at random so that each positive integer occurs with equal probability.”

Intuitively that makes sense. If you pick numbers from a range you’d expect to land “in the middle” on average, but the middle of all integers is unbounded.

I think one of the things that drives that home for me — imagine you spent the rest of your life describing a “RILLY_BIG_NUMBER”. You end up saying “to the power of”, “factorial”, random streams of digits, and stuff like that for the rest of your life. You’re no fun at parties.

At the end you have that RILLY_BIG_NUMBER. But over 99.999…% (say, a RILLY_BIG_NUMBER of 9s) of integers (or primes) are bigger than your number. Because that’s how it is.

]]>