Consider $\psi(x)=\langle x|\psi\rangle$. Such a wavefunction must have dimensions of inverse square root length to satisfy the normalization condition. Why then does $\langle x | p \rangle = \frac{1}{\sqrt{2\pi\hbar}}e^{-ikx}$ have units of inverse square root action? (We can flip this question around and ask why $\langle p | x\rangle$ doesn't have units of inverse root momentum too.)
This came up when I considered the expectation value of operator $X^n$ for a momentum eigenket. What's wrong with this calculation? The units make no sense!
\begin{align} \langle X^n\rangle &=\langle p|X^n|p\rangle \\ &= \langle p |\int dx |x\rangle \langle x|X^n|p\rangle \\ &= \int dx\ x^n \langle p |x\rangle \langle x|p\rangle \\ &= \int \frac{dx}{2\pi\hbar} x^n \\ &= \lim_{a\to\infty}\frac{x^{n+1}}{(n+1)2\pi\hbar} \bigg|_{-a}^a \end{align} such that $\langle X^n\rangle$ seems to vanishes for $n$ odd and diverge for $n$ even. That's strange enough, but prior to evaluation, the units of the formal integral are those of $[x^n]/[p]$ - not what I expected... I feel the issue may be rooted in the first part of my question, and perhaps is linked to the assumptions in QM behind defining position and momentum eigenkets.