login
A211858
Number of partitions of n into parts <= 3 with the property that all parts have distinct multiplicities.
8
1, 1, 2, 2, 3, 4, 5, 7, 7, 8, 10, 14, 12, 19, 19, 19, 23, 30, 26, 37, 35, 37, 43, 52, 45, 60, 59, 61, 68, 80, 70, 90, 88, 91, 100, 113, 101, 126, 124, 127, 136, 153, 139, 168, 165, 168, 180, 199, 182, 216, 212, 216, 229, 251, 232, 269, 265, 270, 285, 309, 286
OFFSET
0,3
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
KEYWORD
nonn,easy
AUTHOR
Matthew C. Russell, Apr 25 2012
STATUS
approved