OFFSET
0,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..500
Doron Zeilberger, Using generatingfunctionology to enumerate distinct-multiplicity partitions.
FORMULA
G.f.: -(2*x^17 +3*x^16 +5*x^15 +5*x^14 +4*x^13 +2*x^11 +2*x^9 +3*x^8 +5*x^7 +5*x^6 +6*x^5 +6*x^4 +5*x^3 +4*x^2 +2*x+1) / ((x^2-x+1) *(x^4+x^3+x^2+x+1) *(x^2+1) *(x+1)^2 *(x^2+x+1)^2 *(x-1)^3). - Alois P. Heinz, Apr 26 2012
EXAMPLE
For n=3 the a(3)=2 partitions are {3} and {1,1,1}. Note that {2,1} does not count, as 1 and 2 appear with the same nonzero multiplicity.
PROG
(Haskell)
a211858 n = p 0 [] [1..3] n where
p m ms _ 0 = if m `elem` ms then 0 else 1
p _ _ [] _ = 0
p m ms ks'@(k:ks) x
| x < k = 0
| m == 0 = p 1 ms ks' (x - k) + p 0 ms ks x
| m `elem` ms = p (m + 1) ms ks' (x - k)
| otherwise = p (m + 1) ms ks' (x - k) + p 0 (m : ms) ks x
-- Reinhard Zumkeller, Dec 27 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Matthew C. Russell, Apr 25 2012
STATUS
approved