The following two PARI functions compute whether or not an
integer is -power-smooth and also the power-smoothness of
.
{ispowersmooth(n, B) = \\ true if and only if n is B-powersmooth local(F,i); F = factor(n); for(i=1,matsize(F)[1],if(F[i,1]^F[i,2]>B,return(0))); return(1); } {powersmoothness(n) = \\ the powersmoothness of n. local(F,L,i); F = factor(n); L = 1; for(i=1,matsize(F)[1],L=max(L,F[i,1]^F[i,2])); return(L); }