function x=yxy21(x0,n,a1,a2,b,c)
x=x0;x1=a1*b*c*x0;x2=a1*b*c*x1+a2*b*(1-a1)*b*c*x0;
for k=1:n
x(k+2)=a1*b*c*x(k+1)+a2*b*(1-a1)*b*c*x(k);
end
k=(0:20)';
y1=yxy21(100,20,0.5,0.25,0.18,10);y2=yxy21(100,20,0.5,0.25,0.19,10);
y3=yxy21(100,20,0.5,0.25,0.20,10);round([k,y1',y2',y3']);
plot(k,y1,k,y2,':',k,y3,'--');