Solution:
By definition of Dn, taking a=Dn we see that Dn divides Dnn+(Dn+1)n+(Dn+2)n, and taking a=Dn+1 we also get that Dn divides (Dn+1)n+(Dn+2)n+(Dn+3)n. By subtraction Dn divides ((Dn+1)n+(Dn+2)n+(Dn+3)n)−(Dnn+(Dn+1)n+(Dn+2)n)=(Dn+3)n−Dnn, and since clearly Dn divides Dnn, again by subtraction we deduce that Dn divides (Dn+3)n. Let us now expand (Dn+3)n: it is a sum of terms of the form Dnb3n−b, where b ranges between 0 and n, and therefore each of them is divisible by Dn, with the sole exception of the single term with b=0. We can therefore write (Dn+3)n=3n+ multiples of Dn, from which we deduce that Dn divides 3n: it follows that Dn itself is a power of 3, as desired.
Let us first observe that D2=1: indeed D2 is a power of 3 (by part a) and by definition divides 12+22+32=14, which forces D2=1.
We then have D1=3: taking a=1 we obtain that D1 divides 6, hence (since it is a power of 3) D1 is 1 or 3. But on the other hand for every a the number a+(a+1)+(a+2)=3(a+1) is a multiple of 3, so D1=3.
We now want to show that for every k≥0 we have D3k=3k+1. For k=0 we have just verified it. Since D3k is a power of 3, it suffices to see that D3k is divisible by 3k+1 but not by 3k+2. Since one passes from an+(a+1)n+(a+2)n to (a+1)n+(a+2)n+(a+3)n by adding (a+3)n−an, to prove that 3k+1 divides D3k it suffices to check that 3k+1 divides 13k+23k+33k and each of the differences (a+3)3k−a3k. To prove that D3k is not divisible by 3k+2 it suffices to prove that 13k+23k+33k is not divisible by 3k+2.
Let us first deal with the statement about the differences, by induction on k: for k=0 it is obvious. Suppose then that, for some k, (a+3)3k−a3k is a multiple of 3k+1. We can write (a+3)3k=a3k+c⋅3k+1, and raising to the cube we find (a+3)3k+1=a3k+1+3a2⋅3k⋅c⋅3k+1+3a3k⋅c2⋅32(k+1)+c3⋅33(k+1), that is (a+3)3k+1−a3k+1=a2⋅3k⋅c⋅3k+2+a3k⋅c2⋅32k+3+c3⋅33k+3, which is clearly divisible by 3k+2, as desired.
As for 13k+23k+33k, we prove at the same time that it is divisible by 3k+1 but not by 3k+2. The statement is trivial for k=0, since 1+2+3 is divisible by 3 but not by 9. For k≥1 we observe that 33k is divisible by 3k+2, so it suffices to prove the statement for 13k+23k instead of for 13k+23k+33k. Again, we use induction on k. For k=1 we have that 1+23 is divisible by 32 but not by 33. Suppose now that 1+23k is divisible by 3k+1 but not by 3k+2: this means that 1+23k=3k+1⋅c, where c is not a multiple of 3. We then have 1+23k+1=1+(23k)3=1+(3k+1c−1)3=3k+2(c−3k+1c2+32k+2c3). The right-hand side is a multiple of 3k+2 but not of 3k+3: indeed (c−3k+1c2+32k+2c3) is not divisible by 3, since it is the sum of multiples of 3 and of c, which by hypothesis is not divisible by 3. This concludes the proof.