Generalisation
Given a set called an alphabet $\{1, 2,\ldots , n\}$, the number of arrangements of $k_1$ $1$s, $k_2$ $2$s, ..., $k_n$ $n$s such that no two adjacent elements are the same is given by
$$A(k_1,k_2,\ldots , k_n)=\int_{0}^{\infty} e^{-t}\prod_{i=1}^{n} (-1)^{k_i}L_{k_i}^{(-1)}(t)\: dt\tag{*}\label{*}$$
where
$$L_{k_i}^{(\alpha)}(t)=\displaystyle\sum_{j=0}^{k_i}(-1)^j\dbinom{k_i+\alpha}{k_i-j}\frac{t^{j}}{j!}$$
are Modified Laguerre Polynomials.
Explanation
Consider a regular expression $R$ (see my answer here for more details on regular expressions) that generates all words using our alphabet such that no two identical letters are adjacent.
Also consider the regular expressions $R_i$ for valid words ending with letter $i$. Then we must have
$$R=\epsilon+\sum_{i=1}^{n}R_i$$
where $\epsilon$ is the empty word.
Now, any valid word that ends in an $\textbf{i}$ must be a valid word that does not end in a $\textbf{i}$ with an $\textbf{i}$ appended hence
$$R_i=(R-R_i)\textbf{i}$$
Then the generating function equivalents of the regular expressions are
$$g(x_1,x_2,\ldots ,x_n)=1+\sum_{i=1}^{n}g_i(x_1,x_2,\ldots ,x_n)$$
or simply
$$g=1+\sum_{i=1}^{n}g_i$$
and
$$g_i=(g-g_i)x_i$$
$$\implies g_i=\frac{gx_i}{1+x_i}$$
then we have the generating function
$$g=1+g\sum_{i=1}^{n}\frac{x_i}{1+x_i}$$
$$\implies g=\left(1-\sum_{i=1}^{n}\frac{x_i}{1+x_i}\right)^{-1}$$
Then we have that the desired count is the coefficient $\prod_{i=1}^{n}x_i^{k_i}$ in $g$, in other words
\begin{align}
A(k_1,k_2,\ldots k_n)&=\left[\prod_{i=1}^{n}x_i^{k_i}\right]g\\
&=\left[\prod_{i=1}^{n}x_i^{k_i}\right]\left(1-\sum_{i=1}^{n}\frac{x_i}{1+x_i}\right)^{-1}
\tag{1}\label{1}\end{align}
Now, it is straightforward to prove that for some function $f=f(x_1,x_2,\ldots x_n)$
$$\int_{0}^{\infty}e^{-t}e^{tf}\: dt=\frac{1}{1-f}\tag{2}\label{2}$$
by performing a Taylor expansion of $e^{tf}$ in $t$ and noting that
$$\int_{0}^{\infty}e^{-t}t^r=r!$$
for $r\in \mathbb{N}\cup\{0\}$.
So we may, in fact express $\eqref{1}$ using $\eqref{2}$
$$\begin{align}
A(k_1,k_2,\ldots k_n)&=\left[\prod_{i=1}^{n}x_i^{k_i}\right]\int_{0}^{\infty}e^{-t}\exp\left(t\sum_{i=1}^{n}\frac{x_i}{1+x_i}\right)\: dt\\
&=\left[\prod_{i=1}^{n}x_i^{k_i}\right]\int_{0}^{\infty}e^{-t}\prod_{i=1}^{n}\exp\left(t\cdot\frac{x_i}{1+x_i}\right)\: dt\\
&=\int_{0}^{\infty}e^{-t}\prod_{i=1}^{n}[x_i^{k_i}]\exp\left(t\cdot\frac{x_i}{1+x_i}\right)\: dt
\tag{3}\label{3}\end{align}$$
The next thing we will need is the generating function for $(-1)^lL_l^{(-1)}(t)$, we can show it is
$$\begin{align}\exp\left(\frac{ty}{1+y}\right)&=\sum_{j\ge 0}\frac{(-t)^j}{j!}\left(\frac{-y}{1+y}\right)^j\\
&=\sum_{j\ge 0}(-1)^j\frac{t^j}{j!}\sum_{l\ge j}(-1)^l\binom{l-1}{l-j}y^l\\
&=\sum_{l\ge 0}y^l(-1)^l\left(\sum_{j=0}^{l}\frac{1}{j!}(-1)^j\binom{l-1}{l-j}t^j\right)\\
&=\sum_{l\ge 0}y^l(-1)^lL_l^{(-1)}(t) \end{align}$$
Hence
$$[y^l]\exp\left(\frac{ty}{1+y}\right)=(-1)^lL_l^{(-1)}(t)$$
Thus, substituting this into $\eqref{3}$ for $y=x_i$
$$A(k_1,k_2,\ldots k_n)=\int_{0}^{\infty}e^{-t}\prod_{i=1}^{n}(-1)^{k_i}L_{k_i}^{(-1)}(t) \: dt$$
As asserted.
As an example consider the simple case of the alphabet $\{1,2,3,4\}$ and $k_1=4,\, k_2=3,\, k_3=3,\, k_4=2$ then
$$\begin{align}A(4,3,3,2)&=\int_{0}^{\infty}e^{-t}\left(\frac{1}{24}t^4-\frac{1}{2}t^3+\frac{3}{2}t^2-t\right)\left(\frac{1}{6}t^3-t^2+t\right)^2\left(\frac{1}{2}t^2-t\right)\: dt\\
&=23\,254
\end{align}$$
This is not an answer to the question (which I think is well-addressed by Micah's comment above) but a compendium of miscellaneous observations.
First, Micah's comment points out that it would be very surprising if there were not a solution for all sufficiently large $N$, and computer search bears this out: there are solutions for $N=1,15,16,17, 23,$ and all numbers between $25 $ and $50$, at which point I stopped checking. As $N$ increases, the number of solutions increases very rapidly; there is 1 solution for $N=15$, ten solutions for $N=25$, and $17,175$ for $N=35$. The $N=15$ case is atypically constrained.
Finding the solution when $N=15$ is very easy. One can begin by observing that $9$ is adjacent only to $7$, and $8$ only to $1$, so the solution, if it exists, must begin with $9$ and end with $8$. (Or vice-versa, giving the same solutions in reverse, which we henceforth disregard.) But the moves from $9$ are forced: $9-7-2-14-11-5-4-12-13-3$ is the only sequence possible. From $3$ one can go to $1$ or to $6$, and since going to $1$ evidently doesn't work (since we know $1$ is next-to-last) it must end $3-6-10-15-1-8$ and that is the only solution.
Consider the graph whose nodes are $\{1,\ldots, 15\}$ in which has two nodes are connected whenever their sum is a square. A solution to the problem is exactly a hamiltonian path in this graph. When we look at this graph, the uniqueness of the solution is completely obvious:
and even a child can see that there is only a single hamiltonian path. (I know because I checked with my six-year-old daughter, who agrees.) The graphs for $N=16$ and $N=17$ are similarly trivial, and a glance at the graph for $N=18$ or $N=19$ shows why there is no solution for those values:
In $N=20, 21, 22$ the lack of solutions is still easy to see, although the troublesome dead end at 16 has been connected to 5 via 20. For $N=24$ I did not see any obvious reason why there is no solution, but I think a simple argument could probably be made involving the disposition of $11, 22, $ and $23$.
I have not done much investigation of the analogous problem where two numbers are connected if their sum is a perfect cube. For $N=100$ the graph is not even connected. For $N=200$ it is connected, but has many leaves. Even for $N=300$ I suspect there is a fairly easy proof that there is no solution, involving the relatively independent cluster of $\{29, 35, 90, 126, 217, 253, 259\}$ which has only 4 connections to the rest of the graph.
Best Answer
Look at the numbers 16, 17, 18: We have 16 < 16+x < 36, 16 < 17+y < 36, 16 < 18+z < 36. Therefore 16+x = 17+y = 18+z = 25, making x = 9, y = 8, z = 7. Therefore each of these numbers has only one possible neighbour and therefore must be the first or last of the sequence. Which is not possible, since we have three of them.
(Sorry, doesn't quite answer the question. )