If distinct means that a given denomination can only be used once, the generating function is (1+x)(1+x^2)^2(1+x^3)...(1+x^64)^2. This is very nearly the hyperbinary partition function, save that you have a 1 and a 3 instead of 2 possible 1s. William Keith