Numbers permutation Given $n$ numbers and $k$ positions I want the total number of permutations of these n numbers on these $k$ positions if repetition is allowed and if the following two arrangements are considered similar : 
1 Two arrangements $(A$ and  $B)$ are similar if $B$ is a cyclic shift of $A$.
Example : ${2 3 1}$ is cyclic shift of ${1 2 3}$
2 Two arrangements $(A$ and $B)$ are similar if $B$ is a reversed cyclic shift of $A$.
Example : ${3 2 1 5 4}$ is reversed cyclic shift of ${1 2 3 4 5}$.
 A: Let $X$ be the set of all functions $f : \{1,\ldots,k\} \to \{1,\ldots,n\}$. Each function in $X$ should be thought of as an $n$-colouring of the vertices of a regular $k$-gon.   Let $D_{2k}$ act on these functions by the rule
$$\sigma \cdot f = f \circ \sigma^{-1}.$$
The inverse is not really important. Without it you get an antiaction of $D_{2k}$ on $X$. Convince yourself that you are counting the number of orbits of this group action. From the article I linked in the comments, the count is
$$ \frac{1}{2k} \sum_{\sigma \in D_{2k}} n^{c(\sigma)} $$
where $c(\sigma)$ is the number of cycles in the cycle-decomposition of $\sigma$. So, everything comes down to studying the cycle structure of the permutations in $D_{2k}$. These fall into two types: there are $k$ rotations, and $k$ reflections. 
Reflections, $k$ even: 


*

*For $k/2$ reflections $\sigma$, the line of symmetry does not contain any vertex of the $k$-gon. Such reflections decompose as the product of $k/2$ disjoint tranpositions, each vertex being paired with its mirror image. So, in this case, $c(\sigma) = k/2$. 

*For the other $k/2$ reflections $\sigma$, the line of symmetry contains two vertices.  Such reflections have 2 fixed points and $(k-2)/2$ disjoint transpositions in their cycle structure. So, $c(\sigma) = (k-2)/2 + 2= k/2 + 1$
Reflections, $k$ odd


*

*In this case, all $k$ reflections $\sigma$ have one vertex on their line of symmetry and their cycle structure consists of 1 fixed point and $(k-1)/2$ disjoint transpositions. So $c(\sigma) = (k-1)/2 + 1 = (k+1)/2$.


Rotations
Let $\sigma$ be the rotation sending $1 \mapsto 2 \mapsto \cdots \mapsto k \mapsto 1$. Then all of the $k$ rotations are $\sigma^p$ where $p=1,\ldots,k$. Note that, for each rotation $\sigma^p$, all the cycles have the same size $o_p$, the order of the rotation. The order of $\sigma^p$ equals $\frac{\operatorname{lcm}(k,p)}{p}$ and so $c(\sigma^k) = k/o_p = \frac{p \cdot k}{\operatorname{lcm}(k,p)} = \operatorname{gcd}$. 
Totalling things up:
If $k$ is even, the count is
$$ \frac{1}{2k} \left( \frac{k}{2} \cdot n^{\frac{k}{2}} + \frac{k}{2} \cdot n^{\frac{k}{2} + 1} + \sum_{p=1}^{k} n^{\operatorname{gcd}(k,p) 
} \right) $$
If $k$ is odd, the count is
$$ \frac{1}{2k} \left( k \cdot n^\frac{k+1}{2} + \sum_{p=1}^{k} n^{\operatorname{gcd}(k,p)
} \right)$$
Something to think about, can the summation be simplified? Maybe look it up in the O.I.E.S.
