OFFSET
0,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..200
FORMULA
a(n) = A328609(n) + 1 for n > 1. - Andrew Howroyd, Nov 01 2019
EXAMPLE
The a(5) = 13 compositions with adjacent parts coprime:
(5)
(41) (14) (32) (23)
(311) (131) (113)
(2111) (1211) (1121) (1112)
(11111)
Missing from this list are (221), (212), and (122).
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Or[Length[#]==1, And@@CoprimeQ@@@Partition[#, 2, 1, 1]]&]], {n, 20}]
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)={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
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 02 2018
EXTENSIONS
a(21)-a(35) from Alois P. Heinz, Sep 02 2018
Name corrected by Gus Wiseman, Nov 04 2019
STATUS
approved