Multiplication tables and sum of digit