TITLE: How find this arithmetic sequence of $n$
QUESTION [8 upvotes]: if there exist positive integer sequence $a_{1},a_{2},a_{3},\cdots,a_{n}$,such  that
$$a_{1}a_{2},a_{2}a_{3},a_{3}a_{4},\cdots,a_{n-1}a_{n},a_{n}a_{1}$$ is arithmetic sequence,and the common difference $d=a_{i+1}a_{i+2}-a_{i}a_{i+1}\neq 0,i=1,\cdots,n-1.a_{n+1}=a_{1}$
find the value  $n$
I Think this problem is very nice,Thank you everyone.
my idea: first, we have $n\ge 3$,and
when $n=3$,then 
$$2a_{2}a_{3}=a_{1}a_{2}+a_{3}a_{1}$$
$$\Longrightarrow \dfrac{2}{a_{1}}=\dfrac{1}{a_{2}}+\dfrac{1}{a_{3}}$$
and
$$\dfrac{2}{5}=\dfrac{1}{3}+\dfrac{1}{15}$$
and when $n=4,5,\cdots,$?
\
\
I think $n=2k-1$ is true,but I can't prove it

REPLY [2 votes]: This can be done for any odd $n$. Take $d=n!$ and define $a_1=1\cdot 3 \cdot 5 \cdots$ and $a_2=2 \cdot 4 \cdot 6 \cdots$, in both cases progressing through the odd or even integers up to $n$ until they run out. The sequence of products will be the arithmetic sequence $d,2d,3d,...,nd$ where $nd=n\cdot n!$ The values of the $a_k$ are then determined by the requirement that this be the sequence of products of the adjacent $a_k.$
For example if $n=5$ we put $a_1=1\cdot 3 \cdot 5=15$ and $a_2=2 \cdot 4=8$, obtaining for the sequence of five $a$ values
$$15,\ 8,\ 30,\ 12,\ 40$$
Note that for $n=6$ if we put $a_1=1 \cdot 3 \cdot 5=15$ and $a_2=2 \cdot 4 \cdot 6=48,$ the $a$ are
$$15,\ 48,\ 30,\ 72,\ 40,\ 90,\ 48,$$
but if as required in the OP we use $a_7=a_1=15$ then 
$$a_7a_6-a_6a_5=15\cdot 48 - 48 \cdot 90=-3600.$$
It would come out $720$ had we used the 
value $105=3\cdot 5 \cdot 7$ for $a_7$, which is closely related to $a_1$, and I believe in the even case if one uses $a_{n+1}=(n+1)a_1$ in the $n$ even case we have a solution to a slightly altered problem than asked by math110.
The relations to compute the $a_k$ come from the requirement that the sequence of products be a progression as stated with common difference $d=n!$. We have in general
$$\frac{a_k}{a_{k-2}}=\frac{k-1}{k-2}.$$
This gives each $a_k$ from the one two index values before, and also explains why they all remain integers, since e.g. for the odd indices $a_1$ starts out with the full sequence of odd factors it needs in order not to give a noninteger for $a_3,a_5,\cdots.$
Impossibility for even $n$ (with $d \neq 0$ as stated in OP).
First assume that $d>0$.
Since the $a_k>0$ we have from $a_{k+1}a_k-a_ka_{k-1}=0$ that $a_{k+1}>a_{k-1}$. Therefore
$a_1<a_3<\cdots a_{n-1},$ so that 
$$a_1<a_{n-1}. \tag{1}$$ But then also from
$$a_{n+1}a_{n}-a_na_{n-1}=d$$ from which $a_{n+1}>a_{n-1}$ which contradicts $(1)$.
and since $a_1=a_{n+1}$ this means $a_1>a_{n-1}.$
If instead $d<0$ we can proceed in the same way, with inequalities reversed, and arrive at a similar contradiction.
Note on why it works for $n$ odd: In this case $a_1=1\cdot 3 \cdots n$ with $(n+1)/2$ odd factors, while $a_2=2 \cdot 4 \cdots (n-1)$ with $(n-1)/2$ even factors. In computing $a_{n+1}$ via the recursion, since $n+1$ is even we begin with $a_2$ and apply the recursion $a_{k+2}=a_k \cdot \frac{k+1}{k}$ a total of $(n-1)/2$ times. This gives
$$a_{n+1}=2\cdot 4 \cdots (n-1)\cdot \frac32 \frac54 \cdots \frac{n}{n-1},$$
i.e. $a_{n+1}=3 \cdot 5 \cdots n$, which happens to equal $a_1$ as desired since the first factor of $a_n$ is $1$ and the rest are $3,5,...,n$.