Even-length cycle laid out as a star

After the manipulations, the result won't be an integer any more. Rather, you'll get numbers like 1.0, where .0 is interpreted as an anchor. Therefore I suggest

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
 \begin{tikzpicture}[nodes={circle, draw}]
        \foreach \i in {1,...,10}
        {
            \pgfmathisodd{\i};
            \node (N\i) at (360/10*\i:\pgfmathresult?18mm:9mm) {\i};
        }
        \foreach \i in {1,...,10}
        {
            \pgfmathtruncatemacro{\j}{mod(\i,10)+1}
            \path (N\i) edge (N\j);
        }
    \end{tikzpicture}
\end{document}

enter image description here