x=n^2 + cos(n); y=x*sin(x); y+2*nThe value returned by the last command is taken over as an; in this case an = (n2+cos(n))sin(n2+cos(n)) + 2n .
function f(x) {if (sin(x)>0) return 1/x; else return -1/x} f(n)
u=0 for (i=1;i<=n;i=i+1) u=u+1/i^2A sequence of this type is usually called a series.