hold off
t0=clock;
k=.0333;g=50;
a=(1+k*(g-1))/g;
n1=1000;%p1=2.756250000000000e-001
 %5.677930563756942e-002;% (g=80)  % 0.05145197461537;
m=(1-k)*(1-a);
n=a*(1-k);
b=k*(1-a);
p1=a^(1/(1-k))
p2=p1^2*(m+b)/n;
v=[p1 p2];x=zeros(1,n1-2);
p=[v x];
for i=3:n1,
suma=0;
k=fix(i/2);
l=1;
while (l<k)
suma=suma+p(l)*p(i-l);
l=l+1;
end
if i-2*k>0
	suma=suma+p(k)*p(i-k);
	p(i)=suma*(2*m+i*b)/((i-1)*n);
else
	suma=suma+p(k)^2/2;
	p(i)=suma*(2*m+i*b)/((i-1)*n);
end
end
duratad=etime(clock,t0);
resd=p;
%stem(resd)
x=(1:n1);
%semilogy(x,resd)
loglog(x,resd,'b')
xlabel('g');
ylabel('P(m/5)');
hold on
