OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
EXAMPLE
a(7) = 14, because 14 partitions of 7 have no parts with multiplicity 7: [1,1,1,1,1,2], [1,1,1,2,2], [1,2,2,2], [1,1,1,1,3], [1,1,2,3], [2,2,3], [1,3,3], [1,1,1,4], [1,2,4], [3,4], [1,1,5], [2,5], [1,6], [7].
MAPLE
b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, [0, 0],
add((l->`if`(j=7, [l[1]$2], l))(b(n-i*j, i-1)), j=0..n/i)))
end:
a:= n-> (l-> l[1]-l[2])(b(n, n)):
seq(a(n), n=0..50);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, {1, 0}, If[i < 1, {0, 0}, Sum[Function[l, If[j == 7, {l[[1]], l[[1]]}, l]][b[n - i*j, i - 1]], {j, 0, n/i}]]];
a[n_] := b[n, n][[1]] - b[n, n][[2]];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)
Table[Count[IntegerPartitions[n], _?(FreeQ[Length/@Split[#], 7]&)], {n, 0, 50}] (* Harvey P. Dale, Sep 21 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jan 18 2011
STATUS
approved