Integer Inequality for Repeating Intervals

43 Views Asked by At

I've tried poking around a little bit for a more formal way of asking this question, but can't seem to find anything. So you'll forgive my ignorance and (undoubtedly) sloppy notation/ terminology. Let's say I have a repeating discontinuous interval:

$$ \bigcup_{n=1}^N [a + n(b+c),a+n(2b+c)], \qquad a,b,c,N\in\mathbb{N}^+ $$

For the sake of example, take $a=100, b=200, c=500$, then the interval is:

$$ [800,1000] \cup [1500,1700] \cup [2200,2400] \cup \cdots $$

Now, take some arbitrary $x\in\mathbb{N}^+$. Is there a closed-form way to find:

  1. Whether $x$ lies in any of these intervals, and if so;
  2. Which interval, $n$, does it lie in?

I've tried fiddling with integer inequalities, which leads me to the following. For $x$ to be valid, we have

$$ a + n(b+c) \leq x \leq a + n(2b+c) $$

and after a bit of rearranging:

$$ \frac{x-a}{b+c} \geq n \geq \frac{x-a}{2b+c} $$

The range will contain an integer if $x$ is valid, otherwise it won't, e.g. let $x=900$:

$$ \frac{8}{7} \geq n \geq \frac{8}{9} $$

and we have $n=1$. Contrastingly, let $x=1200$:

$$ \frac{11}{7} \geq n \geq \frac{11}{9} $$

which has no solutions for $n\in\mathbb{N}^+$.

But this appears to fall down. Let $a=100, b=500, c=1500$, such that we get:

$$ [2100,2600]\cup[4100,4600]\cup[6100,6600]\cup[8100,8600]\cup\cdots $$

Then selecting $x=7200$,we have:

$$ \frac{71}{20} \geq n \geq \frac{71}{25} \quad\implies\quad 3.55 \geq n \geq 2.84 $$

and so $n=3$ is a valid solution. But the third interval is $[6100,6600]$, within which $x$ clearly does not reside. Any ideas what I'm doing wrong?

1

There are 1 best solutions below

1
On

For $x>3$, let $a = x-3$, $n = b = c = 1$. For $x = 3$, choose $a = n = b = c = 1$. For $x = 1$ and $x = 2$, there is no such interval because the smallest lower bound of your interval is $1+1\cdot (1+1) = 3$.