ComplexNumber
AIME
1989
Given a positive integer n, it can be shown that every complex number of the form r+si, where r and s are integers, can be uniquely expressed in the base −n+i using the integers 1,2,…,n2 as digits. That is, the equation
r+si=am(−n+i)m+am−1(−n+i)m−1+⋯+a1(−n+i)+a0
is true for a unique choice of non-negative integer m and digits a0,a1,…,am chosen from the set {0,1,2,…,n2}, with ame0. We write
r+si=(amam−1…a1a0)−n+i
to denote the base −n+i expansion of r+si. There are only finitely many integers k+0i that have four-digit expansions k=(a3a2a1a0)−3+i
a3e0.
Find the sum of all such k.