Ratio of trigonometric expression

If $ displaystyle theta_ {k} = frac {2 ^ {k-1} pi} {2 ^ n + 1} $ and $ displaystyle a_ {k} = sec ^ 2 ( theta_ {k}) $ and $ displaystyle b_ {k} = csc ^ 2 ( theta_ {k}). $

Then value of $ displaystyle frac { sum ^ {n} _ {k = 1} a_ {k}} { sum ^ {n} _ {k = 1} b_ {k}}. $

what I try

$$ sec ^ 2 bigg ( frac { pi} {2 ^ n + 1} bigg) + sec ^ 2 bigg ( frac {2 pi} {2 ^ n + 1} bigg) + cdots + sec ^ 2 bigg ( frac {2 ^ {n-1}} {2 ^ n + 1} bigg). $$

Did not know how to solve it Please help me