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 A318748 #16 Nov 04 2019 10:39:48 %S A318748 1,1,2,4,7,13,24,43,82,151,285,535,1005,1883,3533,6631,12460,23407, %T A318748 43952,82538,154999,291088,546674,1026687,1928118,3621017,6800300, %U A318748 12771086,23984329,45042959,84591339,158863807,298348613,560303342,1052258402,1976157510 %N A318748 Number of integer compositions of n that have only one part or whose consecutive parts are coprime and the last and first part are also coprime. %H A318748 Andrew Howroyd, <a href="/A318748/b318748.txt">Table of n, a(n) for n = 0..200</a> %F A318748 a(n) = A328609(n) + 1 for n > 1. - _Andrew Howroyd_, Nov 01 2019 %e A318748 The a(5) = 13 compositions with adjacent parts coprime: %e A318748 (5) %e A318748 (41) (14) (32) (23) %e A318748 (311) (131) (113) %e A318748 (2111) (1211) (1121) (1112) %e A318748 (11111) %e A318748 Missing from this list are (221), (212), and (122). %t A318748 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Or[Length[#]==1,And@@CoprimeQ@@@Partition[#,2,1,1]]&]],{n,20}] %o A318748 (PARI) %o A318748 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 A318748 seq(n)={concat([1], vector(n, i, i > 1) + sum(k=1, n, b(n, k, (i, j)->gcd(i, j)==1)))} \\ _Andrew Howroyd_, Nov 01 2019 %Y A318748 Cf. A000740, A008965, A059966, A100953, A167606, A296302, A318726, A318727, A318728, A318745, A328609. %K A318748 nonn %O A318748 0,3 %A A318748 _Gus Wiseman_, Sep 02 2018 %E A318748 a(21)-a(35) from _Alois P. Heinz_, Sep 02 2018 %E A318748 Name corrected by _Gus Wiseman_, Nov 04 2019