  Let $X_1, X_2, \ldots$ be i.i.d. random variables with values in
$\mathbb{Z}^d$ satisfying $\mathbb{P} \left(X_1=x\right) = \mathbb{P}
\left(X_1=-x\right) = \Theta \left(\|x\|^{-s}\right)$ for some $s>d$. We show
that the random walk defined by $S_n = \sum_{k=1}^{n} X_k$ is recurrent for
$d\in \{1,2\}$ and $s \geq 2d$, and transient otherwise. This also shows that
for an electric network in dimension $d\in \{1,2\}$ the condition $c_{\{x,y\}}
\leq C \|x-y\|^{-2d}$ implies recurrence, whereas $c_{\{x,y\}} \geq c
\|x-y\|^{-s}$ for some $c>0$ and $s<2d$ implies transience. This fact was
already previously known, but we give a new proof of it that uses only electric
networks. We also use these results to show the recurrence of random walks on
certain long-range percolation clusters. In particular, we show recurrence for
several cases of the two-dimensional weight-dependent random connection model,
which was previously studied by Gracar et al. [Electron. J. Probab. 27. 1-31
(2022)].
