If $$x = \left(\frac{n+1}{4}\right)^{(n+1)/2},$$ then how many bits do we need to represent $x$ in binary?
Asked
Active
Viewed 498 times
0
-
1Hint: if you can find $w\in\mathbb N$ such that $2^{w-1}\leq x\leq 2^w$, that's your solution. Of course, finding $w$ isn't necesarily easy. – theage Jul 16 '15 at 01:17
1 Answers
2
If $n = 2$ or any even integer not one less than a perfect square, you will need infinite digits to the right of the decimal point.
In all cases you will need $1 + \Big\lfloor\dfrac{n+1}{2}\log_2\Big(\dfrac{n+1}{4}\Big)\Big\rfloor$ digits to the left of the decimal point.
Let $d_r = $ digits needed to right of decimal point.
$d_r = \begin{cases} \frac{n+1}{2}, & \text{if } n \equiv 1 (\mod 4), \\ 0, & \text{if } n \equiv 3 (\mod 4), \\ n+1, & \text{if } n \equiv 0 (\mod 4)\text{ and } n=s^2-1, \\ \infty, & \text{otherwise}. \end{cases}$
Because:
- $\text{if } n \equiv 1 (\mod 4)$, the base if of the form $p.1$, raised to $\frac{n+1}{2}$ power
- $\text{if } n \equiv 3 (\mod 4)$, the base is a whole number
- $\text{if } n \equiv 0 (\mod 4)\text{ and } n=s^2-1$, the base is of the form $p.q1$, raised to $\frac{n+1}{2}$ power
- result is irrational otherwise
Marconius
- 5,635