A243119 Number of compositions of n in which the maximal multiplicity of parts equals 2.
1, 0, 4, 6, 10, 21, 40, 87, 121, 219, 421, 690, 1159, 1782, 3304, 5190, 8212, 12897, 22084, 33255, 53617, 82539, 124849, 206172, 313339, 472056, 714976, 1077996, 1682806, 2502645, 3804460, 5674305, 8340535, 12245241, 18851899, 27570366, 40385431, 59314572
Offset: 2
Keywords
Examples
a(6) = 10: [1,1,2,2], [1,2,1,2], [1,2,2,1], [2,1,1,2], [2,1,2,1], [2,2,1,1], [3,3], [1,1,4], [1,4,1], [4,1,1].
Links
- Alois P. Heinz, Table of n, a(n) for n = 2..1000
Crossrefs
Column k=2 of A242447.
Programs
-
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..min(n/i, k)))) end: a:= n-> b(n$2, 0, 2) -b(n$2, 0, 1): seq(a(n), n=2..45);