Problem

Source: 2018 Ecuador Juniors (OMEC) L2 p5

Tags: number theory, remainder, Digits



We call a positive integer interesting if the number and the number with its digits written in reverse order both leave remainder $2$ in division by $4$. a) Determine if $2018$ is an interesting number. b) For every positive integer $n$, find how many interesting $n$-digit numbers there are.