$\lfloor x \rceil = m$ if and only if $m \in {\mathbb Z}$ and $m- \frac{1}{2} \leq x < m+\frac{1}{2}$.
by definition: | $\bigl\lfloor \sqrt{n} \bigr\rceil = q$ | $\leftrightarrow$ | $q - \frac{1}{2} \leq \sqrt{n} < q + \frac{1}{2}$ |
by squaring positive numbers |
$\leftrightarrow$ | $q^2 - q + \frac{1}{4} \leq n < q^2 + q + \frac{1}{4}$ | |
since $n, q \in {\mathbb Z}_+$ |
$\leftrightarrow$ | $q^2 - q < n \leq q^2 + q$ | |
adding $q$ |
$\leftrightarrow$ | $q^2 < n + q \leq q^2 + 2q$ | |
since $n, q \in {\mathbb Z}_+$ |
$\leftrightarrow$ | $q^2 < n + q < q^2 + 2q + 1$ | |
complete square |
$\leftrightarrow$ | $q^2 < n + q < (q + 1)^2$ |
$\bigl\lfloor \sqrt{2n} + \frac{1}{2} \bigr\rfloor = q \ $ if and only if $ \ \dfrac{q(q-1)}{2} < n \leq \dfrac{q(q+1)}{2}$.
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. |