OFFSET
0,2
COMMENTS
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.
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.
Are all primorials after 210 included?
EXAMPLE
The terms together with their prime indices begin:
1: {}
90: {1,2,2,3}
630: {1,2,2,3,4}
2310: {1,2,3,4,5}
6930: {1,2,2,3,4,5}
34650: {1,2,2,3,3,4,5}
30030: {1,2,3,4,5,6}
90090: {1,2,2,3,4,5,6}
450450: {1,2,2,3,3,4,5,6}
570570: {1,2,3,4,5,6,8}
510510: {1,2,3,4,5,6,7}
MATHEMATICA
nn=10000;
w=Table[Length[Union[Subsets[prix[n], {2}]]]-Length[Union[Total/@Subsets[prix[n], {2}]]], {n, nn}];
spnm[y_]:=Max@@NestWhile[Most, y, Union[#]!=Range[0, Max@@#]&];
Table[Position[w, k][[1, 1]], {k, 0, spnm[w]}]
PROG
(Python)
from itertools import count
from sympy import factorint, primepi
from sympy.utilities.iterables import multiset_combinations
def A367093(n):
for k in count(1):
c, a = 0, set()
for s in (sum(p) for p in multiset_combinations({primepi(i):j for i, j in factorint(k).items()}, 2)):
if s not in a:
a.add(s)
else:
c += 1
if c > n:
break
if c == n:
return k # Chai Wah Wu, Nov 13 2023
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Nov 05 2023
EXTENSIONS
a(12)-a(16) from Chai Wah Wu, Nov 13 2023
a(17) from Chai Wah Wu, Nov 18 2023
STATUS
approved