OFFSET
0,4
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = 2^(n-1) - A238351(n) for n >= 1. - Andrew Howroyd, Jan 02 2023
EXAMPLE
The a(0) = 0 through a(5) = 10 compositions (empty column indicated by dot):
. (1) (11) (12) (13) (14)
(111) (22) (32)
(112) (113)
(121) (122)
(1111) (131)
(221)
(1112)
(1121)
(1211)
(11111)
MATHEMATICA
pq[y_]:=Length[Select[Range[Length[y]], #==y[[#]]&]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], pq[#]>0&]], {n, 0, 15}]
PROG
(PARI)
S(v, u, c)={vector(#v, k, c + sum(i=1, k-1, v[k-i]*u[i]))}
seq(n)={my(v=vector(1+n), s=vector(#v, i, 2^(i-2))); v[1]=1; s[1]=0; for(i=1, n, v=S(v, vector(n, j, if(j==i, 'x, 1)), O(x)); s-=apply(p->polcoef(p, 0), v)); s} \\ Andrew Howroyd, Jan 02 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 15 2022
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Jan 02 2023
STATUS
approved