OFFSET
1,12
COMMENTS
EXAMPLE
a(1) = 0; a(2) = 1 since the divisors of 2, {1, 2} sum to 3;
a(18) = 2 since the divisors of 18, {1, 2, 3, 6, 9, 18}, have two subsets, {1, 18}, {1, 3, 6, 9} which sum to 19;
a(12) = 3 since the divisors of 12, {1, 2, 3, 4, 6, 12}, have three subsets, {1, 12}, {3, 4, 6}, {1, 2, 4, 6} which sum to 13;
a(162) = 4 since its divisors are {1, 2, 3, 6, 9, 18, 27, 54, 81, 162}, have four subsets, {1, 162}, {1, 27, 54, 81}, {1, 9, 18, 54, 81}, {1, 3, 6, 18, 54, 81} which sum to 163;
a(24) = 5 since its divisors {1, 2, 3, 4, 6, 8, 12, 24} have five subsets {1, 24}, {1, 4, 8, 12}, {2, 3, 8, 12}, {3, 4, 6, 12}, {1, 2, 4, 6, 12} which sum to 25; etc.
MATHEMATICA
a[n_] := Block[{c = k =1, d = Most@ Divisors@ n}, lgth = Length@ d; If[lgth < 18, c = 1 + Count[Total /@ Subsets@ d, n +1], While[k < 1 + 2^(lgth - 18), c += Count[Total /@ Subsets[d, All, {1 + (k -1)*2^18, k*2^18}], n +1]; k++]]; c]; Array[a, 100] (* or *)
a[n_] := Block[{d = Divisors@ n}, SeriesCoefficient[ Series[ Product[1 + x^d[[i]], {i, Length@ d}], {x, 0, n +1}], n +1]]; Array[a, 100]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Dec 19 2022
STATUS
approved