Mathematical pattern