    Van / wxMaxima / 2015

kill(all)$

f:2^15*3^6*5^3*7^2*11*13;

list:makelist([i, f,i!],i,15,17);

isSame(x):=if is(equal(second(x),third(x))) then first(x);

map(isSame,list);