a(n) with n>=3 is too large to be written in data.
The following is a method for finding a(n): Let n be the number of digits shifted, and let m be the smallest positive integer such that 10^m = 2 mod 2*10^n-1. We then look for the smallest positive b that is an n+d digit number and satisfies b = c(10^n-2)/(2*10^d-1), where c is a positive integer. Then a(n) = c(10^n-2)/(2*10^d-1)*10^n+c.
|