The Origin of Digit patterns