Encodes any integer into a base(n) string