  Let $K := \mathrm{GL}_n(\mathcal{O})$ denote the maximal compact subgroup of
$\mathrm{GL}_n(F)$, where $F$ is a nonarchimedean local field with ring of
integers $\mathcal{O}$. We study the decomposition of the space of locally
constant functions on the unit sphere in $F^n$ into irreducible $K$-modules;
for $F = \mathbb{Q}_p$, these are the $p$-adic analogues of spherical
harmonics. As an application, we characterise the newform and conductor
exponent of a generic irreducible admissible smooth representation of
$\mathrm{GL}_n(F)$ in terms of distinguished $K$-types. Finally, we compare our
results to analogous results in the archimedean setting.
