How do I find all the permutations of a list excluding cyclic permutations?
This problem has arisen due to a coding project I'm working on. I'm currently unsure if this was more appropriate for the math stack exchange or the coding one however the answer I'm looking for is (hopefully) very maths based which is why I'm here, though do let me know if it would sit better in stack overflow. I have done my research but most of the things that I've looked at are either beyond my understanding of code and/or math so a simple logical solution would help a lot!
So far, I've realized that to find the permutations excluding cyclic ones can be found by removing the first element (say $[1,2,3,4] \to [2,3,4]$), and permuting the remaining subset, appending the removed element to the beginning of each permutation ($[1,2,3,4], [1,2,4,3], [1,3,2,4], [1,3,4,2]$ etc...). This method, however breaks down when duplicate numbers appear: $[1,1,2,3]$, with this method becomes: $[1,1,2,3], [1,1,3,2], [1,2,3,1], [1,2,1,3], [1,3,1,2], [1,3,2,1]$; and we can see that $[1,1,2,3]$ is cyclic to $[1,2,3,1]$. This list should be $[1,1,2,3], [1,1,3,2], [1,2,1,3]$.
I'm looking for a method that can do this (without duplicates if possible) and an equation to find the number of non-cyclic permutations given a list without actually finding them.
Apologies if my mathematical language is incorrect, feel free to correct me!