figure(1);
hold on;
t = linspace(0,20,1000);
a0 = 1;
soln = a0*ones(1,length(t));
a(1) = 0;
soln = soln + a(1)*t;
a(2) = -a0/2;
soln = soln + a(2)*t.^2;
for n = 1:51
    a(n+2) = -a(n)/((n+2)*(n+1));
    soln = soln + a(n+2)*t.^(n+2);
end
plot(t,soln,'k');
axis([0 20 -2 2]);