First, we prove that a is even. It follows from the given condition by choosing an even integer n≥6.
Next, we prove that a has no odd prime factor. Suppose the contrary, let p be an odd prime factor of a. If p=3, let n=8, then 2n−n2=192 has a factor 3, but an−na is not divisible by 3, contradicting to (2n−n2)∣(an−na), hence p is not 3.
If p=5, let n=16, then 2n−n2=64⋅110 has a factor 5, but an−na is not divisible by 5, contradicting (2n−n2)∣(an−na), hence p is not 5.
If p≥7, let n=p−1, it follows from Fermat's Little Theorem that 2p−1≡1(modp). As (p−1)2≡1(modp), so p∣(2n−n2). Moreover, since a is even and p∣a, so na≡(p−1)a≡(−1)a≡1(modp) and p∣an, and hence p does not divide (an−na), contradicting (2n−n2)∣(an−na).
Finally, we prove that a is 2 or 4. For this, let a=2t where t is a positive integer, then it follows from (2n−n2)∣(22n−n2t) and (2n−n2)∣(22n−n2t) that (2n−n2)∣(n2t−n2t).
If we choose n to be sufficiently large, it follows from the fact limn→∞2nn2t=0 that n2t−n2t=0, hence 2t=2t. t=1 and t=2 are obvious solutions.
If t≥3, then by the Binomial Theorem, we have t=2t−1=(1+1)t−1>1+(t−1)=t, which is impossible. At last, one can easily check that a=2 and a=4 satisfy the condition in the problem, so the solutions for a are 2 and 4.