直接由a2n=an+n,可得a512=a256+256=a256+28=a128+128+256=a128+27+28=a64+26+27+28=…=a2+22+23+…+28=a1+1+21+22+…+28=1+1+21+22+…+28,再代入等比数列的求和公式即可求得结论.
【解析】
因为对于任意的正整数n,恒有a2n=an+n,
所以:a512=a256+256=a256+28
=a128+128+256=a128+27+28
=a64+26+27+28
=…
=a2+22+23+…+28
=a1+1+21+22+…+28
=1+1+21+22+…+28
=1+=512.
故选C.