OFFSET
0,4
COMMENTS
The number of cyclic permutations with at most 2 descents is equal to L(3,n)-n*L(2,n) where L(k,n) is the number of primitive necklaces (equivalently, the number of Lyndon words) of length n on k letters.
LINKS
I. M. Gessel and C. Reutenauer, Counting permutations with given cycle structure and descent set, J. Combin. Theory, Ser. A, 64, 189-215, (1993).
FORMULA
PROG
(PARI) L2(n) = if(n>1, sumdiv(n, d, moebius(d)*2^(n/d))/n, n+1); \\ A001037
L3(n) = if(n<1, n==0, sumdiv(n, d, moebius(n/d)*3^d)/n); \\ A027376
a(n) = L3(n)-n*L2(n); \\ Michel Marcus, May 17 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Kassie Archer, Apr 18 2018
STATUS
approved