f:= proc(n) local P, S, p, i;
P:= numtheory:-factorset(n);
S:= mul(add(x^(p^i), i=1..floor(log[p](n))), p=P);
coeff(S, x, n);
end proc:
V:= Array(0..4): count:= 0:
for n from 1 while count < 5 do
v:= f(n):
if V[v] = 0 then V[v]:= n; count:= count+1 fi;
od: