How many solutions for $x^2 = 1$? Let $F$ be an non-archimedean local field, let $o$ be its ring of integers, and let $p$ be the maximal ideal
Is there a closed form for the cardinality
$$ | \{ x \in o / p^N: x^2  = -1 \bmod p^N\} | =A(o, p^N)?$$
I am actually interested in $\chi(p^N) = (-1)^{\frac{p^{N} - p^{N-1}+A(o,p^N)}{2}}$ or $\chi(p^N) / \chi(p^{N-1})$. Are these functions characters? Do they have a name and are they well understood?
 A: Here's a solution for the case when $F$ is an unramified extension of $\mathbf{Q}_2$ (of degree $k$, say).
If $N = 1$, then the only solution is $x = 1$ (obviously, since the Frobenius on $\mathbf{F}_{2^k}$ is injective). 
I claim that for $N \ge 2$, we have $x^2 = 1$ in $\mathcal{O} / 2^N$ if and only if $x = \pm 1$ in $\mathcal{O} / 2^{N - 1}$. Indeed, we must have $x = 1 \mod 2$, so suppose $x = 1 + 2y$ for $y \in \mathcal{O}$. Then $x^2 = 1 + 4y(y+1)$, and $y$ and $y+1$ cannot both be divisible by 2, and the result follows by checking cases. This gives the formula I stated in a comment above,
$A(\mathcal{O}, 2^N) = \begin{cases} 1 & \text{if $N = 1$} \\ 2^{k} & \text{if $N = 2$} \\ 2^{k+1} & \text{if $N \ge 3$.}\end{cases}$
In the ramified 2-adic case, things are going to be messier, but I expect the picture will be similar, with $A(\mathcal{O}, \mathfrak{p}^N)$ stabilizing for $N$ sufficiently large. For instance, when $F = \mathbf{Q}_2(\sqrt{-1})$ we have
$A(\mathcal{O}, 2^N) = \begin{cases} 1 & \text{if $N = 1$} \\ 2 & \text{if $N = 2, 3$} \\ 4 & \text{if $N = 4$} \\ 8 & \text{if $N \ge 5$}\end{cases}$
(I checked as far up as $N = 10$).
