How can I express this expression without ceiling function: $\left\lceil \frac {1003}{3000}×2^{2n-1} \right\rceil$

210 Views Asked by At

I think the following equality is correct for $n\in \mathbb{Z^{+}}$

$$\left\lceil \frac 13×2^{2n-1} \right\rceil=\frac 13×(2^{2n-1}+1)$$

Now, I need to find such a equality for the following expression:

$$\left\lceil \frac {1003}{3000}×2^{2n-1} \right\rceil$$

I am looking for a such equality without ceiling function.

I could not find..

2

There are 2 best solutions below

4
On BEST ANSWER

More generally, the expression $$ \left\lceil \frac {1003}{3000}×2^{n} \right\rceil $$ represents the fractional part of $\frac {1003}{3000}$ rounded up to $n$ binary bits. I don't expect a simple expression for that.

The reason we get a nice expression here $$ \left\lceil \frac 13×2^{2n-1} \right\rceil=\frac 13×(2^{2n-1}+1) $$ is that the binary digits of $\frac 13$ are very predictable: $$ \frac 13 = 0.010101010101010101010101010101 \cdots = 0.\overline{01} $$

The binary digits of $\frac {1003}{3000}$ are of course predictable: $$\tiny \frac {1003}{3000} = 0.010\overline{1010110010110110111101000110010100001000110111111110101000100111100110000011110000010011000111010101} $$ but that does not mean there is a nicer formula.

0
On

We have for comparison $$\lceil 13\times 2^n/30\rceil = \frac{13\times 2^n+b(n)}{30},$$ where $b(n) = 4, 8, 16, 2, 4, 8, 16, 2,\ldots$ (for $n\ge 1$) is a 4-periodic function of $n$. In a similar way $$a(n) \equiv \lceil 103\times 2^n/300\rceil = \frac{103\times 2^n}{300}+c(n)$$ where $75 c(n) =47, 19, 38, 1, 2, 4, 8, 16, 32, 64, 53, 31, 62, 49, 23, 46, 17 ,34, 68, 61, 47, 19, 38\ldots$ for $n\ge 2$ has a period of length 21. In a similar fashion ceiling or floor functions of fractional multiples of powers have periodic residuals.

These residuals (1, 2, 4, 8 ,16, 32,..) are just the remainders of 2^n modulo 75 in this case. See for example $2^7$ mod 75 = 53, $2^8$ mod 75 = 31 and so on. The best numerical use of that periodicity is the recurrence $$a(n) = 2a(n-1)+a(n-20)-2a(n-21)$$, which avoids fractions once a sufficiently large number of initial integer values of $a(n)$ are known.