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