for height to be maximum each node should have minimum elements :
for root node its : key =1 child_pointer=2
for other nodes = key=ceil(n/2)-1 child pointer=ceil(n/2)
height key child pointer
0 1 2
1 2*ceil(p/2)-1 2*ceil(p/2)
2 2*(ceil(p/2)-1)(ceil(p/2) 2*ceil(p/2)(ceil(p/2))
3 2*(ceil(p/2)-1)ceil(p/2)2 2*ceil(p/2)3
.
.
h 1*2*(ceil(p/2)-1)ceil(p/2)h-1
---------------------------------------------------------------------------------------------- 1+(2*ceil(p/2)-1)+ 2*(ceil(p/2)-1)(ceil(p/2) +............................. 2* ceil(p/2)h-1 ceil(p/2)-1 = n
-----------------------------------------------------------------------------------------------
=1+ 2*ceil(p/2)-1 ( ceil(p/2)h-1)/(ceil(p/2)-1)
=1+( 2 * (ceil(p/2)h-1) )=n
=2*(ceil(p/2)h-1 =n
= h = log ceil(p/2) ((n+1)/2)
which can be considered as logceil(p/2)(n) answer only when n is very large .