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 A263292 #37 Apr 07 2022 10:41:24 %S A263292 1,1,1,2,4,8,13,26,44,76,119,238,324,648,1008,1492,2116,4232,5680, %T A263292 11360,15272,21872,33536,67072,83168,121376,185496,249072,328416, %U A263292 656832,790656,1581312,1980192,2758624,4193040,5555616,6532896,13065792,19845216 %N A263292 Number of distinct values of |product(A) - product(B)| where A and B are a partition of {1,2,...,n}. %C A263292 The problem of showing that no number k is equal to |product(A)-product(B)| for infinitely many different values of n appears in a Hungarian journal for high school students in math and physics (see KöMaL link). %C A263292 Compare to A038667, which provided the smallest value of |product(A) - product(B)|. %C A263292 Also the number of distinct values <= sqrt(n!) of element products of subsets of [n]. - _Alois P. Heinz_, Oct 17 2015 %H A263292 KöMaL-Mathematical and Physical Journal for Secondary Schools, <a href="http://www.komal.hu/verseny/feladat.cgi?a=honap&h=201509&t=mat&l=en">Problems in Mathematics</a>, September 2015. %e A263292 For n = 4, the four possible values of |product(A) - product(B)| are 2, 5, 10, and 23. %p A263292 b:= proc(n) option remember; local f, g, h; %p A263292 if n<2 then {1} %p A263292 else f, g, h:= n!, y-> `if`(y^2<=f, y, NULL), (n-1)!; %p A263292 map(x-> {x, g(x*n), g(h/x)}[], b(n-1)) %p A263292 fi %p A263292 end: %p A263292 a:= n-> nops(b(n)): %p A263292 seq(a(n), n=0..25); # _Alois P. Heinz_, Oct 17 2015 %t A263292 a[n_] := Block[{v = Times @@@ Subsets[ Range[2, n], Floor[n/2]]}, Length@ Union@ Abs[v - n!/v]]; Array[a, 20] (* _Giovanni Resta_, Oct 17 2015 *) %o A263292 (Python) %o A263292 from math import prod, factorial %o A263292 from itertools import combinations %o A263292 def A263292(n): %o A263292 m = factorial(n) %o A263292 return 1 if n == 0 else len(set(abs((p:=prod(d))-m//p) for l in range(n,n//2,-1) for d in combinations(range(1,n+1),l))) # _Chai Wah Wu_, Apr 07 2022 %Y A263292 Cf. A038667. %K A263292 nonn %O A263292 0,4 %A A263292 _Jerrold Grossman_, Oct 13 2015 %E A263292 a(21)-a(27) from _Giovanni Resta_, Oct 17 2015 %E A263292 a(28)-a(38) from _Alois P. Heinz_, Oct 17 2015