%I #12 Mar 28 2019 13:05:01
%S 1,2,3,6,7,14,19,21,38,42,53,57,106,114,131,133,159,262,266,311,318,
%T 371,393,399,622,719,742,786,798,917,933,1007,1113,1438,1619,1834,
%U 1866,2014,2157,2177,2226,2489,2751,3021,3238,3671,4314,4354,4857,4978,5033
%N Heinz numbers of integer partitions into distinct powers of 2.
%C The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1) * ... * prime(y_k), so these are squarefree numbers whose prime indices are powers 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.
%H Robert Israel, <a href="/A325093/b325093.txt">Table of n, a(n) for n = 1..10000</a>
%e The sequence of terms together with their prime indices begins:
%e 1: {}
%e 2: {1}
%e 3: {2}
%e 6: {1,2}
%e 7: {4}
%e 14: {1,4}
%e 19: {8}
%e 21: {2,4}
%e 38: {1,8}
%e 42: {1,2,4}
%e 53: {16}
%e 57: {2,8}
%e 106: {1,16}
%e 114: {1,2,8}
%e 131: {32}
%e 133: {4,8}
%e 159: {2,16}
%e 262: {1,32}
%e 266: {1,4,8}
%e 311: {64}
%p P:= [seq(ithprime(2^i),i=0..20)]:f:= proc(S,N) option remember;
%p if S = [] or S[1]>N then return {1} fi;
%p procname(S[2..-1],N) union
%p map(t -> S[1]*t, procname(S[2..-1], floor(N/S[1])))end proc:
%p sort(convert(f(P, P[20]),list)); # _Robert Israel_, Mar 28 2019
%t Select[Range[1000],SquareFreeQ[#]&&And@@IntegerQ/@Log[2,Cases[If[#==1,{},FactorInteger[#]],{p_,_}:>PrimePi[p]]]&]
%o (PARI) isp2(q) = (q == 1) || (q == 2) || (ispower(q,,&p) && (p==2));
%o isok(n) = {if (issquarefree(n), my(f=factor(n)[,1]); for (k=1, #f, if (! isp2(primepi(f[k])), return (0));); return (1);); return (0);} \\ _Michel Marcus_, Mar 28 2019
%Y Cf. A000720, A001222, A018819, A033844, A056239, A102378, A112798, A318400, A325091, A325092.
%K nonn
%O 1,2
%A _Gus Wiseman_, Mar 27 2019