You can try
where
If needed I can provide you the way I found this function
Not knowing the 'ceiling function' here is how I got it
First you have to know that
for every n integer such as
n being given, to find k you must have both inequations
and
and are parabolas with the same discriminant 8n+1
for
for
Therefore
There is only one integer k satisfying these inequations because