OFFSET
0,2
COMMENTS
a(n) = -1 for n > 29.
EXAMPLE
a(5) = 32 = 2^5 has distinct decimal digits and 5 prime factors counted with multiplicity.
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);
PROG
(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
CROSSREFS
KEYWORD
sign,base
AUTHOR
Zak Seidov and Robert Israel, Jul 02 2023
STATUS
approved