$\lfloor x \rceil = m$ if and only if $m \in {\mathbb Z}$ and $m- \frac{1}{2} \leq x \lt m+\frac{1}{2}$.
by definition: | $\bigl\lfloor \sqrt{n} \bigr\rceil = q$ | $\Leftrightarrow$ | $q - \frac{1}{2} \leq \sqrt{n} \lt q + \frac{1}{2}$ |
by squaring positive numbers |
$\Leftrightarrow$ | $q^2 - q + \frac{1}{4} \leq n \lt q^2 + q + \frac{1}{4}$ | |
since $n, q \in {\mathbb Z}_+$ |
$\Leftrightarrow$ | $q^2 - q \lt n \leq q^2 + q$ | |
adding $q$ |
$\Leftrightarrow$ | $q^2 \lt n + q \leq q^2 + 2q$ | |
since $n, q \in {\mathbb Z}_+$ |
$\Leftrightarrow$ | $q^2 \lt n + q \lt q^2 + 2q + 1$ | |
complete square |
$\Leftrightarrow$ | $q^2 \lt n + q \lt (q + 1)^2$ |
by definition: | $\bigl\lfloor \sqrt{p} \bigr\rfloor = r$ | $\Leftrightarrow$ | $r \leq \sqrt{p} \lt r + 1$ |
by squaring positive numbers |
$\Leftrightarrow$ | $r^2 \leq p \lt (r+1)^2$ |
$n + \bigl\lfloor \sqrt{n} \bigr\rceil = p$ | $\Leftrightarrow$ | $\bigl(\bigl\lfloor \sqrt{n} \bigr\rceil = q\bigr) \, \wedge \, \bigl( n+q = p \bigr) $ | |
by the final equivalence in Step 1 |
$\Leftrightarrow$ | $\bigl(q^2 \lt p \lt (q+1)^2\bigr) \, \wedge\, \bigl( n+q = p \bigr)$ | |
by the final equivalence in Step 2 |
$\Leftrightarrow$ | $(p \not\in {\mathbb S}) \, \wedge \,\bigl( \bigl\lfloor \sqrt{p} \bigr\rfloor = q \bigr) \wedge\, \bigl( n+q = p \bigr) $ | |
by substitution |
$\Leftrightarrow$ | $ (p \not\in {\mathbb S}) \, \wedge\, \bigl( n+\bigl\lfloor \sqrt{p} \bigr\rfloor = p \bigr) $ | |
by algebra |
$\Leftrightarrow$ | $ (p \not\in {\mathbb S}) \, \wedge\, \bigl( n = p - \bigl\lfloor \sqrt{p} \bigr\rfloor \bigr) $ |
$\bigl\lfloor \sqrt{2n} + \frac{1}{2} \bigr\rfloor = q \ $ if and only if $ \ \dfrac{q(q-1)}{2} \lt n \leq \dfrac{q(q+1)}{2}$.
Grid 1 | Grid 2 | Grid 3 | Grid 4 |
---|---|---|---|
In the Gregorian calendar, the current standard calendar in most of the world, most years that are evenly divisible by 4 are leap years. In each leap year, the month of February has 29 days instead of 28. Adding an extra day to the calendar every four years compensates for the fact that a period of 365 days is shorter than a solar year by almost 6 hours. Some exceptions to this rule are required since the duration of a solar year is slightly less than 365.25 days. Years that are evenly divisible by 100 are not leap years, unless they are also evenly divisible by 400, in which case they are leap years.
$p\ $ stands for: | $q\ $ stands for: | $r\ $ stands for: |
$\dfrac{Y}{4}\ $ is an integer. | $\dfrac{Y}{100}\ $ is an integer. | $\dfrac{Y}{400}\ $ is an integer. |