Thomas Wieder, Comment on A000041 With P(n) = number of integer partitions of n, T(i,n) = number of parts of the i-th partition of n, t(i,j) = j-th part of the i-th partition of n, D(i,n) = number of different parts of the i-th partition of n, m(i,s) = multiplicity of the s-th different part d(i,s), i=1,...,P(n), j=1,...,T(i,n), s=1,...,D(i,n), we have A000012 = sum_{i=1}^{P(n)} (1/prod_{j=1}^{T(i,n)} t(i,j)) (1/prod_{s=1}^{D(i,n)} m(i,s)!) A000012(n)=1 for n=0,1,2,3,... A000012(4)=1 because we have for partition i=1 [1,1,1,1] (1/1)*(1/24)=1/24, for partition i=2 [1,1,2] (1/2)*(1/2)=1/4, for partition i=3 [2,2] (1/4)*(1/2)=1/8, for partition i=4 [1,3] (1/3)*(1/1)=1/3, for partiton i=5 [4] (1/4)*(1/1)=1/4, and 1/24+1/4+1/8+1/3+1/4=1. See also A110143 and A11041. A110143=sum_{i=1}^{P(n)} prod_{j=1}^{T(i,n)} t(i,j)) prod_{s=1}^{D(i,n)} m(i,s)!) A000012 := proc(n::integer) # Procedure A000012 calculates a certain sum taken over all partitions of n. # Each summand is a product formed by two factors. # The first factor is the product of all parts of a given partition. # The second factor is the product of all multiplicities of that partition. # A000012(1) = 1, A000012(6) = 1, A000012(9) = 1. # Procedure A000012 uses the integer partitions of n, # E.g. the function call partition(5) gives # [1,1,1,1,1], [1,1,1,2], [1,1,3], [1,4], [1,2,2], [2,3], [5]. # ASinglePartition = ListOfPartitions[i] = the i-th integer partition of n. # T = number of parts of the i-th partition ASinglePartition. # D = number of different parts of the i-th partition ASinglePartition. # t(i,j) = op(j,ASinglePartition) = # the j-th part of the i-th partition ASinglePartition. # m(i,s) = op(2,op(s,ListOfDifferentPartsAndMultiplicities)) = # multipliticity of the s-th different part d(i,j) # of the i-th partition ASinglePartition. # In [1,1,1,3,4] there are T=5 parts and D=3 different parts, # namely d(1)=1, d(2)=3, d(3)=4. The part d(1) has a multiplicity of 3. # thomas.wieder@t-online.de # http://www.thomas-wieder.privat.t-online.de/default.html # Letzte Aenderung: 16.10.2006, 13.2.2008. # #A000012(4); # 1, 1/24, 1/24, 1/24 # 1/2, 1/2, 1/4, 7/24 # 1/4, 1/2, 1/8, 5/12 # 1/3, 1, 1/3, 3/4 # 1/4, 1, 1/4, 1 # 4, 1 # local A000012,D,T,i,j,s,ASinglePartition,ListOfPartitions,ListOfDifferentPartsAndMulti plicities, Term1,Term2; ListOfPartitions:=partition(n); A000012 := 0; for i from 1 to nops(ListOfPartitions) do ASinglePartition := ListOfPartitions[i]; T := nops(ASinglePartition); ListOfDifferentPartsAndMultiplicities := convert(ASinglePartition,multiset); D := nops(ListOfDifferentPartsAndMultiplicities); Term1:=(1/mul(op(j,ASinglePartition),j=1..T)); Term2:=(1/mul(op(2,op(s,ListOfDifferentPartsAndMultiplicities))!,s=1..D)); A000012:=A000012+Term1*Term2; #print(i,Term1,Term2,Term1*Term2,A000012); od; print(n,A000012); end proc;