Reference for convergence of $\sum_{\mathbf k\in\mathbb Z^3\setminus\{0\}} \lvert\mathbf k\rvert^{-p}$ I would like a reference/proof for the following statement:

Statement. For $p\in\mathbb R$, the sum $$\sum_{\mathbf k\in\mathbb Z^n\setminus\{0\}}  \lvert\mathbf k\rvert^{-p}$$
converges (in the sense of the Lebesgue integral with respect to the counting measure) if and only if $p>n$, where $\lvert\mathbf k\rvert$ is the usual Euclidean norm of a vector. (I.e. the square root of the sum of its coordinates.)

Example. For $n=1$, this is equivalent to saying that $\sum_{k=1}^\infty k^{-p}$ converges if and only if $p>1$, which is a classically well-known result.
The obvious way to proceed in proving the statement would be to compare the sum to the integral $$\int \lvert x\rvert^{-p} \, dx,$$ which can then be treated using polar coordinates. However, getting the integration bounds right is tedious. Therefore I was wondering if there is some solid reference for this.
 A: I just noticed that this is essentially reuns comment. But anyway...


*The sum is of positive terms so allow the value $\infty$ and then we don't need to tip-toe around convergence issues$^A$. The divergence for $p\le 1$ is immediate as the 1D sum is smaller than this sum, being a sum over only $(0,\dots,0,k_n)\in\mathbb Z^n\setminus\{0\}$.


*Since $k\in\mathbb Z^n\setminus\{ 0\}$, $|k|\ge 1$ and hence $2|k|^2\ge |k|^2 + 1.$ There's also an obvious upper bound $|k|^2 \le |k|^2+1$. Hence, up to an irrelevant constant, it suffices to consider the finiteness of $$\sum_{k\in\mathbb Z^d} (1+|k|^2)^{-p/2} $$


*On the box of size 1 around $k$, $x\in\prod _i [k_i-1/2,k_i+1/2]=:C_k$,  we have
$$  x_i^2 \le (k_i + 1/2)^2 \le 2k_i^2 + 1/2, \implies |x|^2+1\le 2|k|^2 +n+1 \le (n+1)(|k|^2+1),$$
and since we also have $k\in\prod _i [x_i-1/2,x_i+1/2]$,
$$  \frac1{n+1}(|x|^2+1)\le |k|^2 +1 \le (n+1)( |x|^2+1). $$


*The boxes $C_k$ partition $\mathbb R^n$ (up to null sets$^B$) and have measure 1. Hence, integrating the above inequality over each $C_k$ and summing, we obtain (having dispensed of the case $p<0$)
$$\frac1{(n+1)^{p/2}}\int_{\mathbb R^n} (|x|^2+1)^{-p/2} dx \le \sum_{k\in\mathbb Z^d} (1+|k|^2)^{-p/2} \le (n+1)^{p/2} \int_{\mathbb R^n} (|x|^2+1)^{-p/2} dx  $$
and the result follows from the easy result for integrals$^C$.

$^A$: An approach I am confident in suggesting to someone who tries to understand a sum as an integral over counting measure...
$^B$: easy from first principles, as the intersections can be written as a countable union of hyperplanes, which are themselves null.
$^C$: I see that your own answer requires explicitly writing out the  change of variables to polar. This isn't necessary for the stated result. By the AM-GM inequality,
$$ ((1+x_1^2)(1+x_2^2)\dots (1+x_n^2))^{1/n} \le 1 +x_1^2 + \dots + x_n^2 . $$
and hence by Tonelli's theorem, the finiteness for $p>n$ follows from the 1D result. Up to a multiplicative constant depending only on $n$, the AM-GM inequality can also be reversed. So the divergence result for $p\le n$ holds as well.
...OK, I don't know an elementary proof of the reverse AM-GM, but you can also use a much simpler change of variables, namely scaling. I can't remember the formula for polar coordinates but I could probably drunk-prove  $d(\lambda x) = \lambda^n dx$. The above establishes that it is enough to check the convergence/divergence of $$ \int_{|x|>1} |x|^{-p} dx = \sum_{k=0}^\infty \int_{2^k <|x|<2^{k+1}} |x|^{-p} dx = \left(\sum_{k=0}^\infty 2^{k(n-p)}\right) \int_{1<|x|<2}|x|^{-p} dx. $$ as $|x|^{-p} \in L^1( 1<|x|<2 )$, the LHS integral diverges or converges as $\sum_{k=0}^\infty 2^{k(n-p)}$ does, QED.
A: Another approach that avoids using polar coordinates to evaluate an integral is to use "polar coordinates" for the sum. It suffices to consider the sum
$$\sum_{k \in \mathbb{N}^n}|k|^{-p}.$$
Since all norms on $\mathbb{R}^n$ are equivalent, we can use $|k| = \max(|k_1|, \dots, |k_n|)$. For $r \in \mathbb{N}$, let
$$F(r) = \#\{k \in \mathbb{N}^n : |k| \leq r\} = r^n,$$
$$f(r) = \#\{k \in \mathbb{N}^n : |k| = r\} = F(r) - F(r - 1) = r^n - (r - 1)^n.$$
Then
$$\sum_{k \in \mathbb{N}^n}|k|^{-p} = \sum_{r = 1}^{\infty}f(r)r^{-p} = \sum_{r = 1}^{\infty}r^{-p}(r^{n} - (r - 1)^n).$$
Note $r^n - (r - 1)^n \sim nr^{n - 1}$ as $r \to \infty$. Hence $r^{-p}(r^{n} - (r - 1)^n) \sim nr^{-p + n - 1}$. Applying the $n = 1$ case gives the result.
A: In this answer, I will make my intuition of comparing the series to an integral rigorous.
From now on, $n$ always denotes any natural number and a vector $x\in\mathbb R^n$ or $x\in\mathbb Z^n$ will be written as $x=(x^1,\dots, x^n)$.

Theorem. For $p\in\mathbb R$, the sum $$\sum_{\mathbf k\in\mathbb Z^n\setminus\{0\}}  \lvert\mathbf k\rvert^{-p}$$
converges (in the sense of the Lebesgue integral with respect to the counting measure) if and only if $p>n$, where $\lvert\mathbf k\rvert=\sqrt{\sum_{j=1}^n (\mathbf k^j)^2}$ denotes the usual Euclidean norm of $\mathbf k$.

Lemma 1. For any $n\in\mathbb N$ and $p\in\mathbb R$, $$\sum_{\mathbf k\in\mathbb Z^n\setminus\{0\}} \lvert\mathbf k\rvert^{-p}=2^n\sum_{\mathbf k\in\mathbb N^n}\lvert\mathbf k\rvert^{-p},$$
where both sides may be infinite.
Lemma 2. For $p\in\mathbb R$, the integral $$\int_{[1,\infty[^n} \lvert x\rvert^{-p}\,\mathrm dx,$$ in the Lebesgue sense, is finite if and only if $p>n$.
Lemma 3. For any $p\in\mathbb R$, $$\sum_{\mathbb k\in(\mathbb N\setminus\{1\})^n}\lvert\mathbf k\rvert^{-p}\le\int_{[1,\infty[^n} \lvert x\rvert^{-p}\,\mathrm dx.$$
Proof of the part of the Theorem where $p>n$ (by strong induction over $n$). By Lemma 1, the statement to prove is equivalent to $$\sum_{\mathbf k\in\mathbb N^{n}}\lvert\mathbf k\rvert^{-p}<\infty.$$
Base case ($n=1$). Follows directly from improper Riemann integration and the monotone convergence Theorem.
Induction step. Fix $n\in\mathbb N$ and suppose that $\sum_{\mathbf k\in\mathbb N^{m}}\lvert\mathbf k\rvert^{-p}<\infty$ for all $m\in\mathbb N\cap[1,n-1]$. Note $$\mathbb N^n =\bigcup_{X\subset\{1,\dots,n\}} \mathbb N_X,$$ where $$\mathbb N_X\overset{\text{Def.}}=\{\mathbf k\in\mathbb N^n:\mathbf k^x=1\text{ for all }x\in X\text{ and }\mathbf k^x\neq 1\text{ for all }x\not\in X\}.$$
By Lemma 2 and 3, if $p>n$, then $\sum_{\mathbf k\in\mathbb N_{\emptyset}} \lvert\mathbf k\rvert^{-p}<\infty$. By the induction hypothesis, for any $X\subset\{1,\dots,n\}$ which is not the empty set, $$\sum_{\mathbf k\in\mathbb N_{X}} \lvert\mathbf k\rvert^{-p}<\infty.$$
This proves that $$\sum_{\mathbf k\in\mathbb N^{n}}\lvert\mathbf k\rvert^{-p}<\infty.$$ $\square$
Sketch of the proof of the part of the Theorem where $p\le n$. Use the same argumentation as in Lemma 3 to show that $$\sum_{\mathbf k\in\mathbb N^n}\lvert\mathbf k\rvert^{-p}\ge\int_{[1,\infty[^n}\lvert x\rvert^{-p}\,\mathrm dx$$ and conclude using the same argumentation as in Lemma 2.

Proof of Lemmas
Proof of Lemma 1. We may write $$\mathbb Z^n\setminus\{0\}=\bigcup_{s=(s_1,\dots,s_n)\in\{-1,1\}^n} \underbrace{\prod_{j=1}^n (-1)^{s_j} \mathbb N}_{\overset{\text{Def.}}=A_s},$$
where $\prod$ denotes the generalized cartesian product. Now we note that, since $\lvert x\rvert$ is invariant under the changing of sign of any coordinate of $x$, $$\sum_{\mathbf k\in A_{s}}\lvert\mathbf k\rvert^{-p}=\sum_{\mathbf k\in A_{\tilde s}} \lvert \mathbf k\rvert^{-p}$$ for any $s,\tilde s\in \{-1,1\}^n$. (Formally, this can be justified using the Transformationssatz (cf. for instance [1; Theorem 1]) for the pushforward under the flipping of coordinates of $\mathbf k$.)
The right-hand side of the Lemma is therefore $$\sum_{s\in\{-1,1\}^n}\sum_{\mathbf k\in A_{s}}\lvert\mathbf k\rvert^{-p},$$ which therefore equals the left-hand side from linearity of the sum. $\square$
Proof of Lemma 2. We use once again the Transformationssatz. Consider the function \begin{equation*}\begin{split}\Phi:]0,\infty[\times]0,\pi[^{n-2}\times]0,2\pi[&\to\mathbb R^n\\\begin{pmatrix}r\\\phi_1\\\phi_2\\\dots\\\phi_{n-2}\\\phi_{n-1}\end{pmatrix}&\mapsto\begin{pmatrix}r\cos(\phi_1)\\r\sin(\phi_1)\cos(\phi_2)\\r\sin(\phi_1)\sin(\phi_2)\cos(\phi_3)\\\dots\\r\sin(\phi_1)\dots\sin(\phi_{n-2})\cos(\phi_{n-1})\\r\sin(\phi_1)\dots\sin(\phi_{n-2})\sin(\phi_{n-1})\end{pmatrix}.\end{split}\end{equation*}
Exercise. Prove that there exists a Lebesgue-null set $N\subset\mathbb R^n$ such that

*

*$\Phi:]0,\infty[\times]0,\pi[^{n-2}\times]0,2\pi[\to\mathbb R^n\setminus N$ is a $C^1$-diffeomorphism;

*for all $(r,\phi_1,\dots,\phi_{n-1})\subset]0,\infty[\times]0,\pi[^{n-2}\times]0,2\pi[$, we have $$\left\lvert\operatorname{det}\operatorname{Jac}\Phi((]0,\infty[\times]0,\pi[^{n-2}\times]0,2\pi[)^\top)\right\rvert=r^{n-1}\sin^{n-2}(\phi_1)\sin^{n-3}(\phi_2)\dots\sin(\phi_{n-2}).$$

*$\Phi(]1,\infty[\times]0,\pi[^{n-2}\times]0,2\pi[)\supset[1,\infty[^n$.

Hint. First, prove that $\Phi$ is injective. Second, note that, for a fixed $r$, the image of $\Phi$ is $r\mathbb S^{n-1}$, up to a Lebesgue-measurable set of Hausdorff dimension $n-2$. Then conclude that $\Phi$ is surjective up to a Lebesgue-measurable set of Hausdorff dimension $n-1$, i.e. of $n$-Lebesgue measure $0$. For the computation of the Jacobian, see https://en.wikipedia.org/wiki/N-sphere#Spherical_volume_and_area_elements.
Back to the proof of Lemma 2: From 1. and 3. above together with the Transformationssatz [1; Theorem 1] we get $$\int_{[1,\infty[^n} \lvert x\rvert^{-p}\,\mathrm dx\le2\pi^{n-1}\int_1^\infty r^{n-p-1}\,\mathrm dr.$$ This is Lebesgue-integrable iff $p>n$ by improper Riemann integration and the dominated convergence Theorem. $\square$
Proof of Lemma 3. This follows directly from $\sigma$-sub-additivity of the integral together with $$\int_{[\mathbf k^1-1,\mathbf k^1[\times\dots\times[\mathbf k^n-1,\mathbf k^n[}\lvert x\rvert^{-p}\ge\lvert\mathbf k\rvert^{-p}$$ for all $\mathbf k\in\mathbb N^{n}$.
[1]: Ivan Netuka, The Change-of-Variables Theorem
for the Lebesgue Integral. ACTA UNIVERSITATIS MATTHIAE BELII, series MATHEMATICS 19 (2011), 37–42. Available online at https://actamath.savbb.sk/pdf/acta1906.pdf.
