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