Arithmetic patterns