new dice problem: #29

I added a new problem (#29 of now 83 problems) to my dice problem collection.

If we roll a die and multiply the results as we go, how many rolls on average will we need until the product is a perfect square?

For a six-sided die the expected number of rolls is 8. Curiously, this is the same as for a five-sided die. The general situation is that the expected number of 2^pi(s) where s is the number of sides of the die and pi(x) is the number of primes less than or equal to x.

Since 6 is not prime, the expected number is the same for 5 and 6-sided dice.

Curiously, it does not matter if the die is fair. As long as, for example, all sides are possible, the expectation is 2^pi(s).

One could ask: for what subsets A of the positive integers does the expected number of rolls until the product is in A depend only on s? This is the case when A is the set of perfects squares. What other A can we consider?

new page of polynomial set root plots and sound

I added a new page to my website.

On it are plots of the roots of all the polynomials in certain sets arising from a given polynomial, P, by taking each coefficient of P and multiplying it by 1 or -1 to create a new polynomial. The plots are all roots of all polynomials generated in this was from a given P. The first is where all of the coefficients of P are 1, so the set of polynomials generated are Littlewood polynomials.

In addition to the plots, I generated sound for each one by treating each root as a sound event. Time runs "right to left" (so the real part of the root determines when its sound event occurs) and the pitch (frequency) is determined (linearly) by the imaginary part of the root. The result is a sound whose spectrogram looks like the plot of the roots.

The range of real parts varies, so the duration of the sounds varies. The extreme case is where the coefficients of P are the factorials of the degree; with such huge coefficients, the roots are quite small, and the result is that the sound is quite short.

another dice problem

I added another problem and solution to my dice collection. It's problem 77.

Here's the problem statement: "Suppose we play a game with a die. We roll once, and this first roll is the score. We may continue to roll and add to the score, but if the roll ever divides the score we start with (e.g., if our score is 15 and we roll a 1, 3, or 5), then we lose everything and end up with nothing. If instead we choose to stop, we win an amount proportional to the score. What strategy will yield the maximum expected value of our final score?"

This is an optimal stopping problem. I've been interested in optimal stopping problems for quite a while, as a result of these dice problems and other things. However, I haven't found a really good introductory text to the general theory of optimal stopping that really appeals to me, so I end up doing things rather "from scratch" whenever I solve such problems. I feel like I might be missing some useful tools, but I'm not sure that is the case for the simple problems I'm solving.

the logistic map, audio version

I've been making audio versions of the logistic map. The idea I'm using is to create a sound such that its spectrogram looks like the bifurcation diagram of the logistic map. So far I've made two versions.

First version

Second version

The second version is lower in pitch, has panning according to pitch (lower pitch more left, higher pitch more right), gets louder when there is "more" chaos, and more quickly reaches the first bifurcation.

new dice problem collection addition

Not much of an addition, but I added some probabilities related to the game Can't Stop (which I only learned about recently) to the collection (see problem 73). I calculated these with some simple code to run through all 1296 possibilities, very straightforward. The game is very complicated; see, e.g., this paper by James Glenn and Christian Aloi. I'm not sure what problems related to the game I might add, but I wanted to get these probabilities added for my own curiosity and in case anyone else is interested.

Eddington numbers

I learned about cycling-related Eddington numbers recently.

They are the largest integer n such that you have ridden at least n kilometers on at least n days (not necessarily consecutively).

I wrote some code to find mine.

With data from 2001 to 2024, my Eddington number is 102.

So, I rode at least 102 kilometers on at least 102 days, and have not ridden at least 103 kilometers on at least 103 days. Apparently, I've ridden at least 103 kilometers on 101 days, so I'll need to do that twice more to get my Eddington number up to 103. Sounds like a nice goal for 2025.

One can also use miles. An amusing thing to note is that you cannot simply convert the Eddington number in kilometers to the Eddington number in miles, since we're counting days.

My Eddington number in miles is 68. 68 miles is about 109 kilometers, so my Eddington number in miles is both larger and smaller than my Eddington number in kilometers.

One can, of course, apply this to running, walking, swimming, or really any other quantifiable activity.

Let me know if you'd like the (simple) code I wrote to calculate these.

update to my dice problem collection

Updated my dice problem collection. The new problem is problem 40: A die is rolled and summed repeatedly until the sum is 100 or more. What is the most likely last roll? What if we roll two dice at time? Three, etc.?

If one die is rolled, then 6 is the most likely last roll, while 7 is the most likely last roll when two dice are rolled. With three dice, the most likely last roll is 12, but for more dice, a very clear pattern emerges: if the number of dice rolled is odd, then the most likely last roll is the most likely roll (greater than the median), while for an even number of dice, it is one more than the most likely roll. (Here we assume a sufficiently large value for "100": for large numbers of dice, we want to extend the threshold so the analysis is smoother.)