A325094
Write n as a sum of distinct powers of 2, then take the primes of those powers of 2 and multiply them together.
Original entry on oeis.org
1, 2, 3, 6, 7, 14, 21, 42, 19, 38, 57, 114, 133, 266, 399, 798, 53, 106, 159, 318, 371, 742, 1113, 2226, 1007, 2014, 3021, 6042, 7049, 14098, 21147, 42294, 131, 262, 393, 786, 917, 1834, 2751, 5502, 2489, 4978, 7467, 14934, 17423, 34846, 52269, 104538, 6943
Offset: 0
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
3: {2}
6: {1,2}
7: {4}
14: {1,4}
21: {2,4}
42: {1,2,4}
19: {8}
38: {1,8}
57: {2,8}
114: {1,2,8}
133: {4,8}
266: {1,4,8}
399: {2,4,8}
798: {1,2,4,8}
53: {16}
106: {1,16}
159: {2,16}
318: {1,2,16}
371: {4,16}
Cf.
A000720,
A001222,
A005117,
A018819,
A019565,
A033844,
A056239,
A102378,
A112798,
A247935,
A318400.
-
P:= [seq(ithprime(2^i),i=0..10)]:
f:= proc(n) local L,i;
L:= convert(n,base,2);
mul(P[i]^L[i],i=1..nops(L))
end proc:
map(f, [$0..100]); # Robert Israel, Mar 28 2019
-
Table[Times@@MapIndexed[If[#1==0,1,Prime[2^(#2[[1]]-1)]]&,Reverse[IntegerDigits[n,2]]],{n,0,100}]
A325093
Heinz numbers of integer partitions into distinct powers of 2.
Original entry on oeis.org
1, 2, 3, 6, 7, 14, 19, 21, 38, 42, 53, 57, 106, 114, 131, 133, 159, 262, 266, 311, 318, 371, 393, 399, 622, 719, 742, 786, 798, 917, 933, 1007, 1113, 1438, 1619, 1834, 1866, 2014, 2157, 2177, 2226, 2489, 2751, 3021, 3238, 3671, 4314, 4354, 4857, 4978, 5033
Offset: 1
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}
-
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
-
Select[Range[1000],SquareFreeQ[#]&&And@@IntegerQ/@Log[2,Cases[If[#==1,{},FactorInteger[#]],{p_,_}:>PrimePi[p]]]&]
-
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
A325092
Heinz numbers of integer partitions of powers of 2 into powers of 2.
Original entry on oeis.org
1, 2, 3, 4, 7, 9, 12, 16, 19, 49, 53, 63, 81, 84, 108, 112, 131, 144, 192, 256, 311, 361, 719, 931, 1197, 1539, 1596, 1619, 2052, 2128, 2401, 2736, 2809, 3087, 3648, 3671, 3969, 4116, 4864, 5103, 5292, 5488, 6561, 6804, 7056, 8161, 8748, 9072, 9408, 11664, 12096
Offset: 1
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}
-
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
-
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[#]&]
Showing 1-3 of 3 results.
Comments