OFFSET
1,3
COMMENTS
A sequence is aperiodic if all of its cyclic rotations are different.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
EXAMPLE
The a(1) = 1 through a(6) = 20 compositions (empty column not shown):
(1) (12) (13) (14) (15)
(21) (31) (23) (51)
(112) (32) (114)
(121) (41) (123)
(211) (113) (132)
(131) (141)
(311) (213)
(1112) (231)
(1121) (312)
(1211) (321)
(2111) (411)
(1113)
(1131)
(1311)
(3111)
(11112)
(11121)
(11211)
(12111)
(21111)
MATHEMATICA
aperQ[q_]:=Array[RotateRight[q, #]&, Length[q], 1, UnsameQ];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], aperQ[#]&&And@@CoprimeQ@@@Partition[#, 2, 1, 1]&]], {n, 10}]
PROG
(PARI)
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, ]}
seq(n)={my(v=sum(k=1, n, b(n, k, (i, j)->gcd(i, j)==1))); vector(n, n, sumdiv(n, d, moebius(d)*v[n/d]))} \\ Andrew Howroyd, Nov 01 2019
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 29 2019
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Nov 01 2019
STATUS
approved