Where does numerology come from?

We human beings are constantly looking for meaningful patterns in our environment, which is a fundamental technique by which we understand the world in which we live. However, we are not always successful in distinguishing between meaningful patterns and meaningless patterns. Numbers, and the many mathematical techniques that can be applied to numbers, yield an endless number of patterns. When we ascribe supernatural meaning to those patterns, we have numerology.