Number Pattern Calculator