The answer is 2146.
Note that 2188=4×547, where 547 is a prime. So 2188=40(547) (base 547 representation). Let k=ab(547). If k is not divisible by 547, then b>0. By Lucas' theorem,
(k2188)=(ab(547)40(547))≡(a4)(b0)=0(mod547).
This shows (k2188) is divisible by 547. If 547∣k, then b=0 and a≤4. By Lucas' theorem,
(k2188)=(a0(547)40(547))≡(a4)(00)=(a4)≡0(mod547).
This shows (k2188) is not divisible by 547.
Next, let N be the highest power of 2 dividing (k2188). Using binary representation, we have 2188=100010001100(2). By Kummer's theorem, N is the number of carries when k is added to 2188−k in base 2.
Firstly, (k2188) is odd if and only if N=0. This holds if and only if aj is 0 whenever the corresponding digits of 2188 in binary representation are 0. In other words, k=a000b000cd00(2). There are 24=16 such numbers.
Secondly, (k2188) is even and is not divisible by 4 if and only if N=1. This holds if and only if k has the form 0100a000bc00(2), a0000100bc00(2), a000b000c010(2). There are 23×3=24 such numbers.
Finally, (02188)=(21882188)=1 are odd, while 4∣(5472188),(10942188),(16412188) since 547=001000100011(2), 1094=010001000110(2), 1641=011001101001(2). Therefore, the final answer is
2189−5−16−24+2=2146.