A339394 Sum over all partitions of n of the LCM of the number of parts and the number of distinct parts.
0, 1, 3, 6, 15, 26, 43, 81, 138, 218, 320, 514, 751, 1131, 1570, 2319, 3159, 4457, 6077, 8344, 11224, 15337, 20297, 26908, 35773, 46434, 60711, 78433, 100987, 129222, 166590, 209719, 267120, 335842, 423341, 527739, 659974, 816805, 1015990, 1251686, 1543864
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
b:= proc(n, i, p, d) option remember; `if`(n=0, ilcm(p, d), add(b(n-i*j, i-1, p+j, d+signum(j)), j=`if`(i>1, 0..n/i, n))) end: a:= n-> b(n$2, 0$2): seq(a(n), n=0..50);
-
Mathematica
b[n_, i_, p_, d_] := b[n, i, p, d] = If[n == 0, LCM[p, d], Sum[b[n - i*j, i - 1, p + j, d + Sign[j]], {j, If[i > 1, Range[0, n/i], {n}]}]]; a[n_] := b[n, n, 0, 0]; a /@ Range[0, 50] (* Jean-François Alcover, Mar 09 2021, after Alois P. Heinz *)