This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A328599 #12 Oct 27 2019 05:00:14 %S A328599 1,0,0,0,0,2,0,4,2,4,12,8,22,14,36,44,62,114,130,206,264,414,602,822, %T A328599 1250,1672,2520,3518,5146,7408,10448,15224,21496,31284,44718,64170, %U A328599 92314,131618,190084,271870,391188,560978,804264,1155976,1656428,2381306,3414846 %N A328599 Number of compositions of n with no part circularly followed by a divisor or a multiple. %C A328599 A composition of n is a finite sequence of positive integers summing to n. %C A328599 Circularity means the last part is followed by the first. %H A328599 Andrew Howroyd, <a href="/A328599/b328599.txt">Table of n, a(n) for n = 0..200</a> %e A328599 The a(0) = 1 through a(12) = 22 compositions (empty columns not shown): %e A328599 () (2,3) (2,5) (3,5) (2,7) (3,7) (2,9) (5,7) %e A328599 (3,2) (3,4) (5,3) (4,5) (4,6) (3,8) (7,5) %e A328599 (4,3) (5,4) (6,4) (4,7) (2,3,7) %e A328599 (5,2) (7,2) (7,3) (5,6) (2,7,3) %e A328599 (2,3,5) (6,5) (3,2,7) %e A328599 (2,5,3) (7,4) (3,4,5) %e A328599 (3,2,5) (8,3) (3,5,4) %e A328599 (3,5,2) (9,2) (3,7,2) %e A328599 (5,2,3) (4,3,5) %e A328599 (5,3,2) (4,5,3) %e A328599 (2,3,2,3) (5,3,4) %e A328599 (3,2,3,2) (5,4,3) %e A328599 (7,2,3) %e A328599 (7,3,2) %e A328599 (2,3,2,5) %e A328599 (2,3,4,3) %e A328599 (2,5,2,3) %e A328599 (3,2,3,4) %e A328599 (3,2,5,2) %e A328599 (3,4,3,2) %e A328599 (4,3,2,3) %e A328599 (5,2,3,2) %t A328599 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Not/@Divisible@@@Partition[#,2,1,1]&&And@@Not/@Divisible@@@Reverse/@Partition[#,2,1,1]&]],{n,0,10}] %o A328599 (PARI) %o A328599 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 A328599 seq(n)={concat([1], sum(k=1, n, b(n, k, (i,j)->i%j<>0&&j%i<>0)))} \\ _Andrew Howroyd_, Oct 26 2019 %Y A328599 The necklace version is A328601. %Y A328599 The case forbidding only divisors (not multiples) is A328598. %Y A328599 The non-circular version is A328508. %Y A328599 Partitions with no part followed by a divisor are A328171. %Y A328599 Cf. A000740, A008965, A167606, A318729, A318748, A328460, A328593, A328600, A328603, A328608, A328609, A328674. %K A328599 nonn %O A328599 0,6 %A A328599 _Gus Wiseman_, Oct 25 2019 %E A328599 Terms a(26) and beyond from _Andrew Howroyd_, Oct 26 2019