HINT: The following procedure is a sort of descent proving the impossibility of solution.
It is obvious that the denominator cannot be even so $n$ should be even and the quotient (supposing it is integer) should be odd.
$$2^{2n}+1=(2n+1)(2k+1)\iff2^{2n}=4kn+2(k+n)\iff2^{2n-1}=2kn+k+n$$ It follows that $k$ and $n$ have the same parity. We have to consider the two possible cases which give
$$►(1)\text{ both odd: } 2^{2n-1}==2^3k_1n_1+(2+1)(k_1+n_1)+2^2$$
$$►(2)\text{ both even: } 2^{2n-1}=2^3k_1n_1+2(k_1+n_1) $$
$(1)$ and $(2)$ give respectively $$2^{n-2}=2^2k_1n_1+(2+1)(k_1+n_1)+2\\2^{n-2}=2^2k_1n_1+k_1+n_1$$
Both cases require $k_1$ and $n_1$ have the same parity.
Iterating the procedure we get in each step $k_i$ and $n_i$ have the same parity
which leads, after sufficient iterations, to an equality in which an integer is equal to another greater integer. Contradiction.
$$\text{ A concise example}$$ $$(2^6+1)=(6+1)(2k+1)=14k+6+1\iff2^6=14k+6\iff2^5=7k+3\\ 2^5=7k+3\Rightarrow2^5=7(2k_1+1)+3=14k_1+10\iff2^4=7k_1+5\\2^4=7k_1+5\Rightarrow2^4=7(2k_2+1)+5=14k_2+12\iff2^3=7k_2+6\text{
absurde }.$$
I reccomend you to distinguish clearly between the element of $\mathbb{Z}$ (or its extension) and that of $\mathbb{F}_{P_k}$.
(Some readers may be not familiar with the term "ring" or "ring homomorphism" (as I was so before), but they are the term to describe many things precisely.)
So instead of stating "$a = \sum_{1 \leq i \leq n, i\neq k}{a_i}\sqrt{p_i}$ is an element of $\mathbb{F}_{P_k}$", the formal description is that:
There exist a ring homomorphism $f:\mathbb{Z} [ \sqrt{p_1},..\sqrt{p_{k-1}},\sqrt{p_{k+1}},\sqrt{p_n}]→\mathbb{F}_{P_k}$.
(The notation $\mathbb{Z}[\sqrt{p_1},..\sqrt{p_{k-1}},\sqrt{p_{k+1}},\sqrt{p_n}]$ means the set of linear combination of $\sqrt{p_1},..\sqrt{p_{k-1}},\sqrt{p_{k+1}},\sqrt{p_n}$ with coefficients in $\mathbb{Z}$.)
Then the discussion will go as:
$f$ sends $a^2$ to a square element in $\mathbb{F}_{P_k}$ while it sends $a_k^2p_k$ to non-square element unless $a_k=0$, (which contradict to $a^2=a_k^2p_k$ and the property of $f$ being ring homomorphism).
・Minor point:
It is better to declare $1\leq k \leq n$ when $k$ first appears.
Best Answer
If $n$ is a natural number and $a$ and $b$ are integers, when we say $$a\equiv b\bmod n,$$ we just mean that $n$ divides $b-a$. This clearly implies that any factor of $n$ also divides $b-a$, so that if $m$ is any factor of $n$, we also have $a\equiv b\bmod m$.
Thus, if we start with our integer $a$, and there exists an integer $x$ such that $a\equiv x^2\bmod n$, we must also have $a\equiv x^2\bmod m$ for any number $m$ that divides $n$, and in particular, $a\equiv x^2\bmod p$ for any prime factor $p$ of $n$.