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 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.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
3: {2}
6: {1,2}
7: {4}
14: {1,4}
19: {8}
21: {2,4}
38: {1,8}
42: {1,2,4}
53: {16}
57: {2,8}
106: {1,16}
114: {1,2,8}
131: {32}
133: {4,8}
159: {2,16}
262: {1,32}
266: {1,4,8}
311: {64}
MAPLE
P:= [seq(ithprime(2^i), i=0..20)]:f:= proc(S, N) option remember;
if S = [] or S[1]>N then return {1} fi;
procname(S[2..-1], N) union
map(t -> S[1]*t, procname(S[2..-1], floor(N/S[1])))end proc:
sort(convert(f(P, P[20]), list)); # Robert Israel, Mar 28 2019
MATHEMATICA
Select[Range[1000], SquareFreeQ[#]&&And@@IntegerQ/@Log[2, Cases[If[#==1, {}, FactorInteger[#]], {p_, _}:>PrimePi[p]]]&]
PROG
(PARI) isp2(q) = (q == 1) || (q == 2) || (ispower(q, , &p) && (p==2));
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 27 2019
STATUS
approved