Generates Ulam Spiral in various formats