This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A213237 #12 Dec 07 2020 08:12:32 %S A213237 1,0,1,0,1,1,1,1,1,2,1,2,1,3,3,2,3,1,2,3,3,2,2,4,3,5,3,2,3,3,4,4,5,1, %T A213237 3,2,4,4,6,3,3,2,3,4,9,3,4,9,4,3,5,4,4,4,6,6,5,5,4,7,4,8,6,4,7,3,6,5, %U A213237 3,4,6,5,4,6,6,5,7,4,6,9,7,6,6,8,4,7,5 %N A213237 Number of distinct values v satisfying v = sum of elements in S = product of elements in P for any partition of {1,...,n} into two sets S and P. %H A213237 Alois P. Heinz, <a href="/A213237/b213237.txt">Table of n, a(n) for n = 1..1000</a> %e A213237 a(1) = 1: S={1}, P={}, v=1. %e A213237 a(2) = 0: no partition of {1,2} satisfies the condition. %e A213237 a(3) = 1: S={1,2}, P={3}, v=3. %e A213237 a(10) = 2: three partitions of {1,2,...,10} into S and P satisfy v = Sum_{i:S} i = Product_{k:P} k but there are only two distinct values v: S={2,3,5,6,7,8,9}, P={1,4,10}, v=40; S={4,5,6,8,9,10}, P={1,2,3,7}, v=42; S={1,2,3,4,5,8,9,10}, P={6,7}, v=42. %p A213237 b:= proc(n, s, p) %p A213237 `if`(s=p, {s}, `if`(n<1, {}, {b(n-1, s, p)[], %p A213237 `if`(s-n<p*n, {}, b(n-1, s-n, p*n))[]})) %p A213237 end: %p A213237 a:= n-> nops(b(n, n*(n+1)/2, 1)): %p A213237 seq(a(n), n=1..100); %t A213237 b[n_, s_, p_] := b[n, s, p] = If[s == p, {s}, If[n < 1, {}, Union[b[n - 1, s, p], If[s - n < p n, {}, b[n - 1, s - n, p n]]]]]; %t A213237 a[n_] := Length[b[n, n(n+1)/2, 1]]; %t A213237 Array[a, 100] (* _Jean-François Alcover_, Dec 07 2020, after _Alois P. Heinz_ *) %Y A213237 The values v are in A213238. %Y A213237 Cf. A178830, A207852. %K A213237 nonn %O A213237 1,10 %A A213237 _Alois P. Heinz_, Jun 07 2012