I tried thinking about this way but couldn't see any patterns which k-s are giving prime as a result and which are not
Suppose \(\displaystyle k\) is odd and \(\displaystyle k \ge 3\). Then we can say: \(\displaystyle 2^{k} + 1 = 2^{2n + 1} + 1, \: n \in \mathbb{Z^+}\). Going one step further, we have \(\displaystyle (2n + 1) = (2n - 1) + 2\) and thus \(\displaystyle 2^{2n + 1} = 4 \cdot 2^{2n - 1}\). Using this result, what can you say about:
\(\displaystyle (2^{2n + 1} + 1) - (2^{2n - 1} + 1) = \text{???}\)
What does that tell you about if \(\displaystyle 2^k + 1\) is prime for odd \(\displaystyle k \ge 3\)? Can you see why \(\displaystyle k = 1\) is a special case and needs to be handled separately?
Next suppose \(\displaystyle k\) is even and \(\displaystyle k = 4n +2, \: n \in \mathbb{Z^+}\) (i.e. \(\displaystyle k\) is not a multiple of 4). By a similar logic to above, we have \(\displaystyle (4n + 2) = (4n - 2) + 4\) and thus \(\displaystyle 2^{4n + 2} = 16 \cdot 2^{4n - 2}\). Using this result, what can you say about:
\(\displaystyle (2^{4n + 2} + 1) - (2^{4n - 2} + 1) = \text{???}\)
What does that tell you about if \(\displaystyle 2^k + 1\) is prime for \(\displaystyle k = 4n + 2 \ge 6\)? Can you see why \(\displaystyle k = 2\) is a special case and needs to be handled separately?
That leaves only the cases where \(\displaystyle k = 4n, \: n \in \mathbb{Z}\) (i.e. \(\displaystyle k\)
is a multiple of 4), for which I don't see any obvious rules off the top of my head. For some multiples of 4, \(\displaystyle 2^k + 1\) is prime (e.g. \(\displaystyle 2^8 + 1 = 257, \: 2^{16} + 1 = 65537\)) but for others it's composite (e.g. \(\displaystyle 2^{12} + 1 = 4097, \: 2^{24} + 1 = 16777217\))