login
Least positive integer whose multiset of prime indices has exactly n distinct semi-sums.
7

%I #28 Nov 20 2023 11:53:55

%S 1,4,12,30,60,210,330,660,2730,3570,6270,12540,53130,79170,110670,

%T 221340,514140,1799490,2284590,4196010,6750870,13501740,37532220,

%U 97350330,131362770,189620970,379241940,735844830,1471689660

%N Least positive integer whose multiset of prime indices has exactly n distinct semi-sums.

%C A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

%C We define a semi-sum of a multiset to be any sum of a 2-element submultiset. This is different from sums of pairs of elements. For example, 2 is the sum of a pair of elements of {1}, but there are no semi-sums.

%C From _David A. Corneth_, Nov 15 2023: (Start)

%C Terms are cubefree.

%C bigomega(a(n)) = A001222(a(n)) >= A002024(n) + 1 = floor(sqrt(2n) + 1/2) + 1 for n > 0. (End)

%F 2 | a(n) for n > 0. - _David A. Corneth_, Nov 13 2023

%e The prime indices of 60 are {1,1,2,3}, with four semi-sums {2,3,4,5}, and 60 is the first number whose prime indices have four semi-sums, so a(4) = 60.

%e The terms together with their prime indices begin:

%e 1: {}

%e 4: {1,1}

%e 12: {1,1,2}

%e 30: {1,2,3}

%e 60: {1,1,2,3}

%e 210: {1,2,3,4}

%e 330: {1,2,3,5}

%e 660: {1,1,2,3,5}

%e 2730: {1,2,3,4,6}

%e 3570: {1,2,3,4,7}

%e 6270: {1,2,3,5,8}

%e 12540: {1,1,2,3,5,8}

%e 53130: {1,2,3,4,5,9}

%e 79170: {1,2,3,4,6,10}

%e 110670: {1,2,3,4,7,11}

%e 221340: {1,1,2,3,4,7,11}

%e 514140: {1,1,2,3,5,8,13}

%t nn=1000;

%t w=Table[Length[Union[Total/@Subsets[prix[n],{2}]]],{n,nn}];

%t spnm[y_]:=Max@@NestWhile[Most,y,Union[#]!=Range[0,Max@@#]&];

%t v=Table[Position[w,k][[1,1]],{k,0,spnm[w]}]

%o (Python)

%o from itertools import count

%o from sympy import factorint, primepi

%o from sympy.utilities.iterables import multiset_combinations

%o def A367097(n): return next(k for k in count(1) if len({sum(s) for s in multiset_combinations({primepi(i):j for i,j in factorint(k).items()},2)}) == n) # _Chai Wah Wu_, Nov 13 2023

%Y The non-binary version is A259941, firsts of A299701.

%Y These are the positions of first appearances in A366739.

%Y A001222 counts prime factors (or prime indices), distinct A001221.

%Y A001358 lists semiprimes, squarefree A006881, complement A100959.

%Y A056239 adds up prime indices, row sums of A112798.

%Y A299702 ranks knapsack partitions, counted by A108917.

%Y A366738 counts semi-sums of partitions, strict A366741.

%Y Semiprime divisors are listed by A367096 and have:

%Y - square count: A056170

%Y - sum: A076290

%Y - squarefree count: A079275

%Y - count: A086971

%Y - firsts: A220264

%Y Cf. A000720, A001248, A002024, A004709, A304793, A365920, A366740, A366753, A367093, A367095.

%K nonn,more

%O 0,2

%A _Gus Wiseman_, Nov 09 2023

%E a(17)-a(22) from _Chai Wah Wu_, Nov 13 2023

%E a(23)-a(28) from _David A. Corneth_, Nov 13 2023