If $\displaystyle\prod_{i=6}^{2021} (1-\tan^2((2^i)^\circ))$ can be written in the form $a^b$ for positive integers $a,b$ with $a$ squarefree, find $a+b$.

[i]Proposed by Deyuan Li and Andrew Milas[/i]
1. **Simplify the expression \(1 - \tan^2 \theta\):**

   For any angle \(\theta\), we have:
   \[
   1 - \tan^2 \theta = \frac{\cos^2 \theta - \sin^2 \theta}{\cos^2 \theta} = \frac{\cos 2\theta}{\cos^2 \theta}
   \]
   Therefore, the given product can be rewritten as:
   \[
   \prod_{i=6}^{2021} (1 - \tan^2((2^i)^\circ)) = \prod_{i=6}^{2021} \frac{\cos(2^{i+1}^\circ)}{\cos^2(2^i)^\circ}
   \]

2. **Express the product in terms of cosines:**

   The product becomes:
   \[
   \frac{\cos(2^7) \cdot \cos(2^8) \cdots \cos(2^{2022})}{\cos^2(2^6) \cdot \cos^2(2^7) \cdots \cos^2(2^{2021})}
   \]

3. **Simplify using periodicity:**

   Since \(2^{12} \equiv 1 \pmod{360}\), we have:
   \[
   2^{2022} \equiv 2^6 \pmod{360}
   \]
   Therefore, \(\cos(2^{2022}) = \cos(2^6)\).

4. **Simplify the fraction:**

   The fraction simplifies to:
   \[
   \frac{1}{\cos(2^6) \cdot \cos(2^7) \cdots \cos(2^{2021})}
   \]

5. **Group the terms using periodicity:**

   Note that \(\cos(2^6) = \cos(2^{18}) = \cos(2^{30}) = \cdots\) and \(\cos(2^7) = \cos(2^{19}) = \cos(2^{31}) = \cdots\) because \(2^{12} \equiv 1 \pmod{360}\). Thus, the fraction becomes:
   \[
   \left( \frac{1}{\cos(2^6) \cdot \cos(2^7) \cdots \cos(2^{17})} \right)^{168}
   \]

6. **Use the double-angle identity:**

   Using the identity \(\sin 2\theta = 2 \sin \theta \cos \theta\), we can simplify:
   \[
   \frac{1}{\cos(2^6) \cdot \cos(2^7) \cdots \cos(2^{17})} = \frac{2 \sin(2^6)}{2 \sin(2^6) \cos(2^6) \cdot \cos(2^7) \cdots \cos(2^{17})}
   \]
   \[
   = \frac{2 \sin(2^6)}{\sin(2^7) \cdot \cos(2^7) \cdots \cos(2^{17})} = \frac{4 \sin(2^6)}{2 \sin(2^7) \cos(2^7) \cdot \cos(2^8) \cdots \cos(2^{17})}
   \]
   \[
   = \frac{4 \sin(2^6)}{\sin(2^8) \cdot \cos(2^8) \cdots \cos(2^{17})}
   \]
   Continuing this pattern, the fraction simplifies to:
   \[
   \frac{2^{12} \sin(2^6)}{\sin(2^{18})} = 2^{12}
   \]

7. **Calculate the entire product:**

   Therefore, the entire product becomes:
   \[
   (2^{12})^{168} = 2^{2016}
   \]

8. **Determine \(a\) and \(b\):**

   Since \(2^{2016}\) can be written as \(a^b\) with \(a = 2\) and \(b = 2016\), we have:
   \[
   a + b = 2 + 2016 = 2018
   \]

The final answer is \(\boxed{2018}\)