A364040 a(n) is the least positive number with distinct decimal digits and n prime factors, counted with multiplicity, or -1 if there is no such number.
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 98304, 327680, 917504, 786432, 1048576, 3145728, 15728640, 31457280, 2845310976, 6398410752, -1, -1, -1, 536870912
Offset: 0
Examples
a(5) = 32 = 2^5 has distinct decimal digits and 5 prime factors counted with multiplicity.
Crossrefs
Cf. A363963.
Programs
-
Maple
V:= Array(0..29,-1): count:= 0: for m from 1 to 10 do for L in combinat:-permute([$0..9],m) while count < 27 do if L[1] = 0 then next fi; x:= add(L[i]*10^(m-i),i=1..m); v:= numtheory:-bigomega(x); if V[v] = -1 then V[v]:= x; count:= count+1 fi; od; od: convert(V,list);
-
Python
from sympy import primeomega from itertools import count, islice, permutations as P def agen(): # generator of terms adict, n = dict(), 0 D = [p for d in range(1, 11) for p in P("0123456789", d) if p[0] != "0"] for k in (int("".join(t)) for t in D): v = primeomega(k) if v not in adict: adict[v] = k while n in adict: yield adict[n]; n += 1 yield from (adict[n] if n in adict else -1 for n in count(n)) print(list(islice(agen(), 22))) # Michael S. Branicky, Apr 05 2024
Comments