Matching Digit Sums (noch nicht übersetzt)

Problem 676

Let d(i,b) be the digit sum of the number i in base b. For example d(9,2)=2, since 9=10012. When using different bases, the respective digit sums most of the time deviate from each other, for example d(9,4)=3d(9,2).

However, for some numbers i there will be a match, like d(17,4)=d(17,2)=2. Let M(n,b1,b2) be the sum of all natural numbers in for which d(i,b1)=d(i,b2). For example, M(10,8,2)=18, M(100,8,2)=292 and M(106,8,2)=19173952.

Find 6k=3k2l=1M(1016,2k,2l), giving the last 16 digits as the answer.