Numbers and patterns: laying foundations in mathematics