I was trying to formulate some problem. I want to find a relation between a floor and ceiling function. Suppose the Property 1 satisfies that it has $\lfloor \frac{n}{2} \rfloor$ number of $X$. Then the Property 2 satisfies that it has $k = \lceil \frac{d}{2} \rceil$ where $d = \lfloor \frac{n}{2} \rfloor$. I tried to put $k = \lceil \frac{n}{4} \rceil$ but it is contradicting for some values of $n$. Like if I take $n = 9$, then
$d = \lfloor \frac{9}{2} \rfloor$ $\Rightarrow d = 4$ and thus $k = 2$.
But if I take $k = \lceil \frac{n}{4} \rceil$ then $k = \lceil \frac{9}{4} \rceil$ $\Rightarrow k = 3$
which contradicts. Is there any way to find the relation between $n$ and $k$ directly. Kindly help. My data is given below for different values of $n$.

Starting from $n=0$ you have
$$d=0,0,1,1,2,2,3,3,4,4,5,5,6,6,\cdots$$ $$k=0,0,1,1,1,1,2,2,2,2,3,3,3,3,\cdots$$
In the last row, you see that the length of the runs is $4$, but the first run has only two elements.
Hence,
$$k=\left\lfloor\frac{n+2}4\right\rfloor$$
Alternatively,
$$d=\left\lfloor\frac n2\right\rfloor\equiv n=2d+d'$$ where $d'=0,1$.
$$k=\left\lceil\frac d2\right\rceil\equiv d=2k-k'$$ where $k'=0,1$.
Then
$$n=4k-2k'+d'=4k+k''$$ where $k''=-2,-1,0,1$.
By shifting,
$$n+2=4k+k'''$$ where $k'''=0,1,2,3$ and
$$k=\left\lfloor\frac{n+2}4\right\rfloor.$$