All 1 digit numbers, 0,1,2,3, are solutions when, say, b=5. (Of course, d∈{0,1,2,3} works for any base b of absolute value greater than d but not equal to 4 .) Consider now positive integers n=(ad…a1a0)4 with more than one digit, so d≥1,ad=0, and 0≤ak≤3 for k=0,1,…,d. Then n has the same representation in base b if and only if ∣b∣>maxak and ∑k=0dak(−4)k=∑k=0dakbk, or equivalently, ∑k=0dak(bk−(−4)k)=0. First we prove that b≤3. Indeed, if b≥4, then b=4⟹b≥5, so bk−(−4)k is positive for all k≥1 (and zero for k=0 ). But then ∑k=0dak(bk−(−4)k)≥ad(bd−(−4)d) must be positive, and cannot vanish. Next, we show b≥2. Assume otherwise for the sake of contradiction; b cannot be 0,±1 (these bases don't make sense in general) or -4 , so we may label two distinct negative integers −r,−s with r−1≥s≥2 such that {r,s}={4,−b},s>maxak, and ∑k=0dak((−r)k−(−s)k)=0, which, combined with the fact that rk−sk≥0 (equality only at k=0 ), yields rd−sd≤ad(rd−sd)=k=0∑d−1(−1)d−1−kak(rk−sk)≤k=0∑d−1(s−1)(rk−sk)=(s−1)r−1rd−1−(sd−1) Hence rd−1≤(s−1)r−1rd−1<(r−1)r−1rd−1=rd−1, which is absurd. Thus b≥2, and since b≤3 we must either have b=2 or b=3. In particular, all ak must be at most b−1. We now rewrite our condition as ad(4d−(−b)d)=k=0∑d−1(−1)d−1−kak(4k−(−b)k) Since 4k−(−b)k≥0 for k≥0, with equality only at k=0, we deduce ad(4d−(−b)d)≤k≡d−1∑(b−1)(4k−(−b)k) If d−1 is even (d is odd ), this gives ad(4d+bd)≤(b−1)42−14d+1−40−(b−1)b2−1bd+1−b0 so 4d<(b−1)154d+1⟹b>1+415, which is impossible. Thus d−1 is odd ( d is even), and we get ad(4d−bd)≤(b−1)42−14d+1−41+(b−1)b2−1bd+1−b1⟺4d−1bd−1≥ad+b+1bad−154(b−1) If b=2, then ad=1, so 2d+11=4d−12d−1≥2511, which is clearly impossible (d≥2). If b=3 and ad=2, then 16d/2−19d/2−1≤158. Since d is even, it's easy to check this holds only for d/2=1, with equality, so ak=b−1 if k≡d−1(mod2). Thus (ad,…,a0)=(2,2,a0), yielding solutions (22x)3 (which do work; note that the last digit doesn't matter). Otherwise, if b=3 and ad=14, then 16d/2−19d/2−1≤154. It's easy to check d/2∈{1,2}. If d/2=1, we're solving 16a2−4a1+a0=9a2+3a1+a0⟺a2=a1. We thus obtain the working solution (11x)3. (Note that 110=21220 in bases −4,3.) If d/2=2, we want 256a4−64a3+16a2−4a1+a0=81a4+27a3+9a2+3a1+a0, or 175=91a3−7a2+7a1, which simplifies to 25=13a3−a2+a1. This gives the working solutions (1210x)3,(1221x)3. (Note that 12100=1102 and 12210=1102+110 in bases −4,3.) The list of all nontrivial ( ≥2-digit) solutions (in base -4 and b ) is then 11x,22x,1210x,1221x, where b=3 and x∈{0,1,2}. In base 10 , they are 12+x,2⋅12+x,122+x,122+12+x, with sum 3(2⋅122+4⋅12)+4(0+1+2)=1020 Finally, we need to include the trivial solutions n=1,2,3, for a total sum of 1026.