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!)
A318745 Number of Lyndon compositions (aperiodic necklaces of positive integers) with sum n and adjacent parts (including the last with the first part) being coprime. 7

%I #12 Nov 01 2019 22:19:15

%S 1,1,2,3,5,7,12,19,32,53,94,158,279,480,847,1487,2647,4676,8349,14865,

%T 26630,47700,85778,154290,278318,502437,908880,1645713,2984546,

%U 5417743,9847189,17914494,32625523,59467893,108493134,198089610,361965238,661883231,1211161991

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

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

%F a(n) = A328669(n) + 1 for n > 1. - _Andrew Howroyd_, Nov 01 2019

%e The a(7) = 12 Lyndon compositions with adjacent parts coprime:

%e (7)

%e (16) (25) (34)

%e (115)

%e (1114) (1213) (1132) (1123)

%e (11113) (11212)

%e (111112)

%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,LyndonQ[#]&&And@@CoprimeQ@@@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)->gcd(i, j)==1))); vector(n, n, (n > 1) + sumdiv(n, d, moebius(d)*v[n/d])/n)} \\ _Andrew Howroyd_, Nov 01 2019

%Y Cf. A000740, A008965, A059966, A100953, A167606, A296302, A318728, A318731, A318746, A318747.

%K nonn

%O 1,3

%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 5 12:56 EDT 2024. Contains 375696 sequences. (Running on oeis4.)