If $s(n)=2n+[\log_2n]-1$ what is $s(n+1)-s(n)$? 
Question: If $s(n)=2n+[\log_2n]-1$ what is $s(n+1)-s(n)$ ?

Let $n$ be positive nonzero integer. I write $[a]$ to denote the greatest integer less than or equal to $a$. If $s(n)=2n+[\log_2n]-1$ then what is $s(n+1)-s(n)$ equal to? I have by numerical inspection 
$$s(n+1)-s(n) =
\begin{cases}
3,  & \text{if $\color{blue}{n+1=2^t}$ for some integer $t>0$} \\[2ex]
2, & \text{otherwise}
\end{cases}$$
Surely I only need to calculate ? $$\left(2(n+1)+[\log_2(n+1)]-1\right)-\left(2n+[\log_2n]-1\right) $$
But when I reduce the above expression I get $2$. Here are two working examples:

Example 1: Suppose $n=5$. Then $2*5+[\log_25]-1=10+2-1=11$. On the other hand $n+1=6$ and  $2*6+[\log_26]-1=12+2-1=13$. So
  $$s(6)-s(5)=13-11=2$$

also

Example 2: Suppose $n=15$. Then $2*15+[\log_215]-1=30+3-1=32$. On the other hand $n+1=16=2^4$ and $2*16+[\log_216]-1=32+4-1=35$ So
  $$s(16)-s(15)=35-32=3$$

 A: Consider $$s\left(2^n\right)-s\left(2^n-1\right)=\left\lfloor \log _2(2^n)\right\rfloor +2 \cdot 2^n-1-\left(\left\lfloor \log _2(2^n-1)\right\rfloor +2 \cdot(2^n-1)-1\right)$$
we have that $\log_2 (2^n)=n$ 
while $n-1<\log_2(2^n-1)<n$ thus $\lfloor\log_2(2^n-1)\rfloor=n-1$
Therefore the previous calculation gives
$$s\left(2^n\right)-s\left(2^n-1\right)=n+2^{n+1}-1-(n-1)-2^{n+1}+2+1=3$$
If the argument of $s(n)$ is not a power of $2$ we have
$$s(n+1)-s(n)=\left\lfloor \log _2(n)\right\rfloor +2 n-1-(\left\lfloor \log _2(n-1)\right\rfloor +2 (n-1)-1)=2$$
because $\left\lfloor \log _2(n)\right\rfloor=\left\lfloor \log _2(n-1)\right\rfloor$ if $n\ne 2^k$ for some $k$
Hope this helps
A: Per the comments (I am just answerizing what they wrote) @Galc127 and @Wojowu
We need to calculate 
$$\left(2(n+1)+[\log_2(n+1)]-1\right)-\left(2n+[\log_2n]-1\right)$$
Expanding terms yields $$2n+2+[\log_2(n+1)]-1-2n-[\log_2n]+1$$ Simplifying terms yields $$2+[\log_2(n+1)]-[\log_2n]$$ Now suppose that $n=2^t$ for some nonzero integer $t$. Then $[\log_2(n+1)]=[\log_22^t]$. Now $\log_22^{t-1}<\log_2(2^t-1)<\log_22^t$ consequently $t-1<\log_2(2^t-1)<t$; which implies that $[\log_2(n+1)]-[\log_2n]=t-(t-1)=1$. In particular if $n$ is a power of $2$ then $$2+[\log_2(n+1)]-[\log_2n]=2+1=3$$ Otherwise we have that $[\log_2(n+1)]-[\log_2n]=0$ and so $2+[\log_2(n+1)]-[\log_2n]=2$.
