15

This is a real-world question, prompted by some unusual features on my treadmill and which I thus think about while running.

In a sub-menu on my treadmill, I can select a distance that I want to run. If my unit setting is "miles", the distances offered are all multiples of 0.1 miles, but not all multiples are possible! Specifically, if I increase the distance iteratively, the first eight available options are (in units of miles): 0.1, 0.2, 0.4, 0.5, 0.6, 0.7, 0.9, 1.0. As you can see, the distances 0.3mi and 0.8mi are missing!

I decided to collect more data on which distances are possible. It seems easier to work with integer sequences, so for the purposes of this problem, I imagine working in multiples of tenths of a mile (decimile?). Then, the distances up to 100 that cannot be chosen are:

$$ 3, 8, 13, 18, 23, 28, 33, 38, 44, 49, 54, 59, 64, 69, 74, 79, 84, 90, 95, 100. $$

As you can see, the missing distances are usually 5 apart, except sometimes they are 6 apart. I checked as high as I can and this pattern continues. If I just record the missing distances that are 6 higher than the previous missing distance, I get these six before the treadmill refuses to give me distances longer than a marathon:

$$ 44,90,131,172,218,259. $$

I now have a few questions:

  1. How are these possible distances being generated? What is the rule, pattern, or program?

  2. Given a distance (like 49, meaning 4.9mi), how can I mathematically determine whether the distance can be selected?

  3. Asymptotically, what proportion of distances cannot be selected?

(Note: the same restrictions on my treadmill also apply to speeds, expressed in mph, so for example 10mph cannot be selected.)

A. Rex
  • 1,710
  • 8
    If you round the miles converted from every 200 meters you seem to get that sequence. But that does seem absurd so i leave it as a comment. – Rollen S. D'Souza May 06 '24 at 22:07
  • 3
    The distances between the $6$s seem to be (roughly) constant, which suggests a division with rounding. Maybe @RollenS.D'Souza is on the right track (or the right treadmill), – Ethan Bolker May 06 '24 at 22:09
  • @EthanBolker: I wonder whether those successive differences are all either 46 or 41! – A. Rex May 07 '24 at 01:10
  • 3
    @RollenS.D'Souza I suspect you are correct, as 200m is the length of a standard indoor track. – Benjamin Kuykendall May 08 '24 at 02:29
  • @BenjaminKuykendall Wow, neat! That would probably explain it. – Rollen S. D'Souza May 08 '24 at 04:16
  • 2
    Fortunately, it looks like every multiple of $0.1$ miles is the sum of two distances that your treadmill can manage. So, here is a new thing for you to think about as you run: How should I write my preferred distance as a sum of two treadmill numbers? – David E Speyer May 08 '24 at 13:44

2 Answers2

23

@rollen-s-dsouza is correct -- the underlying math is metric, at 200m increments, and the output is converted to miles.

A tenth of a mile is 160.9344m. You can look at values of $\text{round}(\frac{200x}{160.9344})$ and get the exact pattern you observed.

That's not very surprising -- the people responsible for customizing the treadmill for sale in a specific region are probably not the same people writing most its control software.

From here on, let $I=\frac{200}{160.9344} \approx 1.242742$ be our symbol for the increment, in tenths-of-a-mile.

Part 2 A number will appear in the progression if it's close enough to a multiple of $I$. -- specifically, if a multiple lands within 0.05 miles of the desired number.

The nearest multiple can be calculated as follows, if $x$ is in units of 0.1mi, then, $y=I \cdot \text{round}(\frac x I)$. You can then look at $|y-x|$ and see whether it's less than 0.5.

Part 3 We know that the asymptotic slope is $I$ -- so when we get to 100 steps, we've seen 100 numbers but our displayed value is near $100I \approx 124$. So we skipped about 24. The exact formula is $\frac{I-1}{I}=0.195328$ ratio of numbers skipped.

Sahaj
  • 5,355
Alex K
  • 2,213
  • @A.Rex sorry, I meant to follow up with answers earlier. My answer has been updated with the other parts. – Alex K May 07 '24 at 01:19
  • 3
    This looks like it works, thanks! (Nit: $\lvert{y-x}\rvert$ instead of $y-x$, I think?) It seems like this stuff is related to https://en.wikipedia.org/wiki/Beatty_sequence and https://en.wikipedia.org/wiki/Beatty_sequence#Rayleigh_theorem – A. Rex May 07 '24 at 12:51
13

There's a theorem known as Rayleigh's theorem (see https://en.wikipedia.org/wiki/Beatty_sequence) - for irrational numbers $r, s$ with $1/r + 1/s = 1$, the sequences ${\lfloor r \rfloor, \lfloor 2r \rfloor, \lfloor 3r \rfloor, \lfloor 4r \rfloor, \ldots}$ and ${\lfloor s \rfloor, \lfloor 2s \rfloor, \lfloor 3s \rfloor, \lfloor 4s \rfloor, \ldots}$ contain between them every positive integer exactly once.

This appears to generalize such that your sequence of distances which cannot be chosen are $J/2, 3J/2, 5J/2, \ldots$ rounded to the nearest integer, where $I = 200/160.9344$ as defined by @AlexK and $J = I/(I-1) \approx 5.120773$. This is a generalization both in that we're dealing with rounding instead of floors and that $I, J$ are rational.

Michael Lugo
  • 24,422