Razorthink Interview Question

Check whether a number is unique or not,print a pattern