n can be any nonnegative integral power of 2.
If n has an odd divisor d≥3, then 2d−1∣2n−1∣m2+81. Since 2d−1≡3(mod4) and 3∤2d−1, there exists an odd prime p>3 such that p≡3(mod4) and p∣2d−1. This implies p∣m2+81. However, this means m2≡−92(modp), and hence (9−1m)2≡−1(modp). This is impossible as p≡3(mod4). Therefore, n has no odd divisor greater than 1. Thus, n=2k for some nonnegative integer k.
It remains to find an m such that 22k−1∣m2+81. Firstly, note that
22k−1=(2+1)(22+1)⋯(22k−1+1).
The factors on the right are pairwise relatively prime. Indeed, if r<s, then 22r+1∣22s−1, and (22s−1,22s+1)=(22s−1,2)=1, so that (22r+1,22s+1)=1. Now, by the Chinese remainder theorem, there exists m∈Z+ such that 3∣m and
m≡9⋅22j−1(mod22j+1)
for j=1,2,…,k−1. For this m, we have 3∣m2+81 and
m2+81≡81(22j+1)≡0(mod22j+1).
Hence, 22k−1∣m2+81 as desired.