cp's OEIS Frontend

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.

A318730 Number of cyclic compositions (necklaces of positive integers) summing to n with adjacent parts (including the last and first part) being indivisible (either way).

This page as a plain text file.
%I A318730 #11 Oct 27 2019 12:02:04
%S A318730 1,1,1,1,2,1,3,2,3,6,5,8,7,14,15,21,31,39,51,69,98,133,177,254,329,
%T A318730 471,632,902,1230,1710,2370,3270,4591,6384,8898,12429,17252,24230,
%U A318730 33783,47405,66254,92860,130142,182469,256262,359676,505231,710059,997953,1404215
%N A318730 Number of cyclic compositions (necklaces of positive integers) summing to n with adjacent parts (including the last and first part) being indivisible (either way).
%H A318730 Andrew Howroyd, <a href="/A318730/b318730.txt">Table of n, a(n) for n = 1..100</a>
%F A318730 a(n) = A328601(n) + 1. - _Andrew Howroyd_, Oct 27 2019
%e A318730 The a(14) = 14 cyclic compositions with adjacent parts indivisible either way:
%e A318730   (14)
%e A318730   (3,11) (4,10) (5,9) (6,8)
%e A318730   (2,5,7) (2,7,5) (3,4,7) (3,7,4)
%e A318730   (2,3,2,7) (2,3,4,5) (2,5,2,5) (2,5,4,3) (3,4,3,4)
%t A318730 neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
%t A318730 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Or[Length[#]==1,And[neckQ[#],And@@Not/@Divisible@@@Partition[#,2,1,1],And@@Not/@Divisible@@@Reverse/@Partition[#,2,1,1]]]&]],{n,20}]
%o A318730 (PARI)
%o A318730 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 A318730 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, eulerphi(d)*v[n/d])/n)} \\ _Andrew Howroyd_, Oct 27 2019
%Y A318730 Cf. A000740, A008965, A059966, A167606, A285573, A303362, A304713, A316476, A318726, A318727, A318728, A318729, A328601.
%K A318730 nonn
%O A318730 1,5
%A A318730 _Gus Wiseman_, Sep 02 2018
%E A318730 Terms a(21) and beyond from _Andrew Howroyd_, Sep 08 2018