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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A318747 Number of Lyndon compositions (aperiodic necklaces of positive integers) with sum n and adjacent parts (including the last with the first part) being indivisible (either way). 3

%I #11 Nov 01 2019 22:19:31

%S 1,1,1,1,2,1,3,2,3,5,5,8,7,12,14,20,31,37,51,64,96,129,177,246,328,

%T 465,630,889,1230,1692,2370,3250,4587,6354,8895,12384,17252,24180,

%U 33777,47336,66254,92752,130142,182337,256246,359500,505231,709787,997951,1403883

%N Number of Lyndon compositions (aperiodic necklaces of positive integers) with sum n and adjacent parts (including the last with the first part) being indivisible (either way).

%H Andrew Howroyd, <a href="/A318747/b318747.txt">Table of n, a(n) for n = 1..100</a>

%e The a(14) = 12 Lyndon compositions with adjacent parts indivisible either way:

%e (14)

%e (3,11) (4,10) (5,9) (6,8)

%e (2,5,7) (2,7,5) (3,4,7) (3,7,4)

%e (2,3,2,7) (2,3,4,5) (2,5,4,3)

%t LyndonQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ];

%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Or[Length[#]==1,And[LyndonQ[#],And@@Not/@Divisible@@@Partition[#,2,1,1],And@@Not/@Divisible@@@Reverse/@Partition[#,2,1,1]]]&]],{n,20}]

%o (PARI)

%o b(n, q, pred)={my(M=matrix(n, n)); for(k=1, n, M[k, k]=pred(q, k); for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); M[q, ]}

%o seq(n)={my(v=sum(k=1, n, k*b(n, k, (i, j)->i%j<>0 && j%i<>0))); vector(n, n, 1 + sumdiv(n, d, moebius(d)*v[n/d])/n)} \\ _Andrew Howroyd_, Nov 01 2019

%Y Cf. A000740, A008965, A059966, A285573, A303362, A318726, A318727, A318729, A318730, A318731, A318745, A318746.

%K nonn

%O 1,5

%A _Gus Wiseman_, Sep 02 2018

%E Terms a(21) and beyond from _Andrew Howroyd_, Sep 08 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 11:09 EDT 2024. Contains 375965 sequences. (Running on oeis4.)