Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Sep 24 2023 13:03:43
%S 0,1,2,2,3,4,4,8,4,15,17,22,48,40,130,88,287,323,543,1084,1145,2938,
%T 3141,6928,9770,15585,29249,37540,78464,103289,194265,299752,475086,
%U 846933,1216749,2261920,3320935,5795349,9292376,14825858,25570823,39030115,68265801,106030947,178696496
%N Number of integer compositions of n with integer geometric mean.
%e The a(6) = 4 through a(9) = 15 compositions:
%e (6) (7) (8) (9)
%e (33) (124) (44) (333)
%e (222) (142) (2222) (1224)
%e (111111) (214) (11111111) (1242)
%e (241) (1422)
%e (412) (2124)
%e (421) (2142)
%e (1111111) (2214)
%e (2241)
%e (2412)
%e (2421)
%e (4122)
%e (4212)
%e (4221)
%e (111111111)
%t Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n],IntegerQ[GeometricMean[#]]&]],{n,0,15}]
%o (Python)
%o from math import prod, factorial
%o from sympy import integer_nthroot
%o from sympy.utilities.iterables import partitions
%o def A357710(n): return sum(factorial(s)//prod(factorial(d) for d in p.values()) for s,p in partitions(n,size=True) if integer_nthroot(prod(a**b for a, b in p.items()),s)[1]) if n else 0 # _Chai Wah Wu_, Sep 24 2023
%Y The unordered version (partitions) is A067539, ranked by A326623.
%Y Compositions with integer average are A271654, partitions A067538.
%Y Subsets whose geometric mean is an integer are A326027.
%Y The version for factorizations is A326028.
%Y The strict case is A339452, partitions A326625.
%Y These compositions are ranked by A357490.
%Y A011782 counts compositions.
%Y Cf. A025047, A051293, A078174, A078175, A102627, A320322, A326622, A326624, A326641, A357182, A357183.
%K nonn
%O 0,3
%A _Gus Wiseman_, Oct 15 2022
%E More terms from _David A. Corneth_, Oct 17 2022