What values of $n$ is $A=\frac{a_1}{a_2}+\frac{a_2}{a_3}+\cdots +\frac{a_{n-1}}{a_n}+\frac{a_n}{a_1}$ an integer? 
Suppose $a_i\in \mathbb{N} $ such that $a_i\ne a_j$ and $\displaystyle\frac{a_i}{a_{i+1}}\ne \frac{a_j}{a_{j+1}}~$ for $i \ne j$ $($take $a_{n+1}=a_1)$ and $\displaystyle A=\frac{a_1}{a_2}+\frac{a_2}{a_3}+\cdots +\frac{a_{n-1}}{a_n}+\frac{a_n}{a_1}$.
Then for what values of $n\ge  2$ can $A$ be an integer?

I  found that if $a_i=(n-1)^i$ then $A$ is a integer but I realised that this  violates the condition $\displaystyle\frac{a_i}{a_{i+1}}\ne \frac{a_j}{a_{j+1}}~$. It was easy to prove that $A$ is not an integer  for $n=2$, but I was stuck for the cases where for $n>2$. I then I plugged in some values for $a_i$ but for $n>2$ but I found no solution.
Intuitively I think there is no solution but I am unable to prove it. Any help would be appreciated.
Edit-1: As pointed out by @WillJagy it is possible for $n=3,4,5$. So can we actually prove it is true for $n>6$ or are there some $n>6$ for which it isn't true?
Edit-2: I was able to find a solution for $n=5$ from a solution for $n=4$.
$$~~~~~~~~~~\frac{6}{4} + \frac{4}{3} + \frac{3}{1} + \frac{1}{6}  = 6$$
$$\implies \frac{2}{4} + \frac{4}{3} + \frac{3}{1} + \frac{1}{6}  = 5$$
$$\implies \frac{6}{2} +\frac{2}{4} + \frac{4}{3} + \frac{3}{1} + \frac{1}{6}  = 8$$
But I could not find a solution for $n=6$ from a solution for $n=5$  because when I rewrite  $\frac{4}{3} =1+\frac{1}{3}$, the $1$ in the numerator of $\frac{1}{3}$ is used by another $a_i$. I don't know whether we can prove by induction. Any suggestions is welcome.

$$\frac{3}{2}+\frac{4}{3}+\frac{5}{4}+\frac{6}{5}+\frac{15}{6}+\frac{24}{15}+\frac{10}{24}+\frac{2}{10}=10$$
$$\frac{3}{2}+\frac{4}{3}+\frac{5}{4}+\frac{6}{5}+\frac{7}{6}+\frac{30}{7}+\frac{14}{30}+\frac{24}{14}+\frac{2}{24}=13$$
$$\frac{3}{2}+\frac{4}{3}+\frac{5}{4}+\frac{6}{5}+\frac{7}{6}+\frac{9}{7}+\frac{36}{9}+\frac{15}{36}+\frac{42}{15}+\frac{2}{42}=15$$
$$\frac{3}{2}+\frac{4}{3}+\frac{5}{4}+\frac{6}{5}+\frac{7}{6}+\frac{9}{7}+\frac{10}{ 9}+\frac {28}{ 10}+\frac {27}{ 28}+\frac {36}{ 27}+\frac {2}{ 36}=14$$
