OFFSET
1,5
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
FORMULA
a(n) = A328598(n) + 1. - Gus Wiseman, Nov 04 2019
EXAMPLE
The a(10) = 13 compositions:
(10)
(7,3) (3,7) (6,4) (4,6)
(5,3,2) (5,2,3) (3,5,2) (3,2,5) (2,5,3) (2,3,5)
(3,2,3,2) (2,3,2,3)
The a(11) = 12 compositions:
(11)
(9,2) (2,9) (8,3) (3,8) (7,4) (4,7) (6,5) (5,6)
(5,2,4) (4,5,2) (2,4,5)
MATHEMATICA
Table[Select[Join@@Permutations/@IntegerPartitions[n], !MatchQ[#, ({___, x_, y_, ___}/; Divisible[x, y])|({y_, ___, x_}/; Divisible[x, y])]&]//Length, {n, 20}]
PROG
(PARI)
b(n, k, pred)={my(M=matrix(n, n)); for(n=1, n, M[n, n]=pred(k, n); for(j=1, n-1, M[n, j]=sum(i=1, n-j, if(pred(i, j), M[n-j, i], 0)))); sum(i=1, n, if(pred(i, k), M[n, i], 0))}
a(n)={1 + sum(k=1, n-1, b(n-k, k, (i, j)->i%j<>0))} \\ Andrew Howroyd, Sep 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 02 2018
EXTENSIONS
a(21)-a(28) from Robert Price, Sep 08 2018
Terms a(29) and beyond from Andrew Howroyd, Sep 08 2018
Name corrected by Gus Wiseman, Nov 04 2019
STATUS
approved