I needed a 6 digit integer with no zeroes so I did this:
Enum.map(0..5, fn _ -> Enum.random(1..9) end) |> Integer.undigits
I wouldn't use this for anything large, but I consider it acceptable for a few digits and infrequent use.