The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A303117 a(n) is the number of cyclic permutations with at most two descents. 1

%I #20 May 18 2018 20:38:51

%S 1,1,1,2,6,18,62,186,570,1680,4890,14058,40200,114450,325230,923846,

%T 2624730,7465410,21260652,60647370,173288724,496014934,1422211494,

%U 4084793082,11751102060,33857989968,97696908330,282295318536,816759712080,2366027865810,6861963548198,19922800783578,57902584654650

%N a(n) is the number of cyclic permutations with at most two descents.

%C 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.

%H I. M. Gessel and C. Reutenauer, <a href="http://dx.doi.org/10.1016/0097-3165(93)90095-P">Counting permutations with given cycle structure and descent set</a>, J. Combin. Theory, Ser. A, 64, 189-215, (1993).

%F a(n) = A027376(n) - n*A001037(n).

%F a(n) = L(3,n)-n*L(2,n) where L(k,n) is the number of primitive k-ary necklaces (or equivalently, Lyndon words) of length n.

%o (PARI) L2(n) = if(n>1, sumdiv(n, d, moebius(d)*2^(n/d))/n, n+1); \\ A001037

%o L3(n) = if(n<1, n==0, sumdiv(n, d, moebius(n/d)*3^d)/n); \\ A027376

%o a(n) = L3(n)-n*L2(n); \\ _Michel Marcus_, May 17 2018

%Y Cf. A027376, A001037.

%K nonn

%O 0,4

%A _Kassie Archer_, Apr 18 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 12 16:39 EDT 2024. Contains 374251 sequences. (Running on oeis4.)