The development of children's understanding of mathematical patterns through mathematical activities