https://wikimass.com/php/number-patterns-program