# Primjeri nizova

crtaj(niz):=wxplot2d ([discrete, makelist(n,n,1,length(niz)),niz],[style,points],[xlabel, "n"],[ylabel,""]);

a(n):=n^2;

niz1: makelist(a(n),n,1,10);

crtaj(niz1);

b(n):=1/n;

niz2: makelist(b(n),n,1,10);

crtaj(niz2);

c(n):=(-1)^n;

niz3: makelist(c(n),n,1,10);

crtaj(niz3);

d(n):=(-1)^n*n;

niz4: makelist(d(n),n,1,10);

crtaj(niz4);

e(n):=1;

niz5: makelist(e(n),n,1,10);

crtaj(niz5);

x(n):=(1+1/n)^n;

niz6: makelist(x(n),n,1,10);

float(niz6);

crtaj(niz6);

float(x(100));

float(x(1000));

float(x(10000));

limit(x(n), n, inf);

float(%e);

x(n):=(-1)^n / n;

niz7: makelist(x(n),n,1,15);

crtaj(niz7);

x[1]: 2;
x[n]:= 2+x[n-1]/3;

niz8: makelist(x[n],n,1,10);

float(%);

crtaj(niz8);

y[1]:1;
y[n]:=1+2*y[n-1];

makelist(y[n],n,1,10);