Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Mar 09 2021 05:07:53
%S 0,1,3,6,15,26,43,81,138,218,320,514,751,1131,1570,2319,3159,4457,
%T 6077,8344,11224,15337,20297,26908,35773,46434,60711,78433,100987,
%U 129222,166590,209719,267120,335842,423341,527739,659974,816805,1015990,1251686,1543864
%N Sum over all partitions of n of the LCM of the number of parts and the number of distinct parts.
%H Alois P. Heinz, <a href="/A339394/b339394.txt">Table of n, a(n) for n = 0..1000</a>
%p b:= proc(n, i, p, d) option remember; `if`(n=0, ilcm(p, d),
%p add(b(n-i*j, i-1, p+j, d+signum(j)), j=`if`(i>1, 0..n/i, n)))
%p end:
%p a:= n-> b(n$2, 0$2):
%p seq(a(n), n=0..50);
%t b[n_, i_, p_, d_] := b[n, i, p, d] = If[n == 0, LCM[p, d],
%t Sum[b[n - i*j, i - 1, p + j, d + Sign[j]],
%t {j, If[i > 1, Range[0, n/i], {n}]}]];
%t a[n_] := b[n, n, 0, 0];
%t a /@ Range[0, 50] (* _Jean-François Alcover_, Mar 09 2021, after _Alois P. Heinz_ *)
%Y Cf. A003990, A051173, A339312.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Dec 02 2020