Example of a Periodic Function is:
e^(1/2)*j$ pi $n
This is discrete sigal.
Therefore (w/2*pi) should be rational.
In this above example the value is (w/2*pi) is 1/4.
Hence it is a periodic function.
Example of a non-periodic function:
cos(n) This is a discrete signal too. Therefore the criteria for it to be peridic is cos(n+N)=cos(n). Where "N" is any integer. In the above example N is 2*pi. Though it looks like it is periodic, N is not an integer. Therefore cos(n) is not a periodic function.