OFFSET
1,3
LINKS
Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 1..2000 (first 400 terms from Alois P. Heinz)
Vaclav Kotesovec, Graph a(n)/2^n
FORMULA
a(n) = 2^(n-1) - A240085(n). - Gus Wiseman, Nov 25 2019
EXAMPLE
From Gus Wiseman, Nov 25 2019: (Start)
The a(1) = 1 through a(5) = 15 compositions:
(1) (2) (3) (4) (5)
(1,2) (1,3) (1,4)
(2,1) (3,1) (2,3)
(1,1,2) (3,2)
(1,2,1) (4,1)
(2,1,1) (1,1,3)
(1,2,2)
(1,3,1)
(2,1,2)
(2,2,1)
(3,1,1)
(1,1,1,2)
(1,1,2,1)
(1,2,1,1)
(2,1,1,1)
(End)
MAPLE
b:= proc(n, i, p, k) option remember; `if`(n=0, p!, `if`(i<1, 0,
add(b(n-i*j, i-1, p+j, k)/j!, j=[0, $max(1, k)..n/i])))
end:
a:= n-> b(n$2, 0, 1) -b(n$2, 0, 2):
seq(a(n), n=1..50);
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Min@@Length/@Split[Sort[#]]==1&]], {n, 0, 10}] (* Gus Wiseman, Nov 25 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 21 2014
STATUS
approved