OFFSET
0,5
COMMENTS
a(1) = 1 because the partition [1] contains all the prime factors dividing 1, i.e., none. - Giovanni Resta, Feb 04 2014
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
EXAMPLE
With n = 4, 4 = 2^2. Since 4 - (2) = 2, and the partitions of 2 are {(2), (1,1)}, the partitions of 4 that include (2) are (2, 2) and (2, 1, 1), so a(4) = 2.
MAPLE
with(numtheory): with(combinat):
a:= n-> numbpart(n-add(f, f=factorset(n))):
seq(a(n), n=0..100); # Alois P. Heinz, Feb 04 2014
MATHEMATICA
a[n_] := If[PrimeQ[n], 1, Block[{p = First /@ FactorInteger@n}, Length@ Select[ IntegerPartitions[n], Intersection[#, p] == p &]]]; Array[a, 30] (* Giovanni Resta, Feb 04 2014 *)
a[n_] := PartitionsP[n-Sum[f, {f, FactorInteger[n][[All, 1]]}]]; Table[ a[n], {n, 0, 100}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Stauduhar, Feb 03 2014
EXTENSIONS
a(15)-a(56) from Giovanni Resta, Feb 04 2014
STATUS
approved