OFFSET
1,2
COMMENTS
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1) * ... * prime(y_k), so these are numbers whose prime indices are powers of 2 and whose sum of prime indices is also a power of 2. 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.
1 is in the sequence because it has prime indices {} with sum 0 = 2^(-infinity).
EXAMPLE
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
3: {2}
4: {1,1}
7: {4}
9: {2,2}
12: {1,1,2}
16: {1,1,1,1}
19: {8}
49: {4,4}
53: {16}
63: {2,2,4}
81: {2,2,2,2}
84: {1,1,2,4}
108: {1,1,2,2,2}
112: {1,1,1,1,4}
131: {32}
144: {1,1,1,1,2,2}
192: {1,1,1,1,1,1,2}
256: {1,1,1,1,1,1,1,1}
311: {64}
MAPLE
q:= n-> andmap(t-> t=2^ilog2(t), (l-> [l[], add(i, i=l)])(
map(i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]))):
select(q, [$1..15000])[]; # Alois P. Heinz, Mar 28 2019
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
pow2Q[n_]:=IntegerQ[Log[2, n]];
Select[Range[1000], #==1||pow2Q[Total[primeMS[#]]]&&And@@pow2Q/@primeMS[#]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 27 2019
STATUS
approved