% = an array of first n approximations to pi
%   using Euler's formula
%
%   pi*pi/6 = 1/(1*1) + 1/(2*2) + 1/(3*3) + ...
%
%   Precondition: n > 0
function result= Euler(n)
num= ones(1,n);
den= (1:n) .^ 2;
e= cumsum(num ./ den);
result= sqrt(6 .* e);
