more Digit statistics

C, Lua