Package: pari-stable
Version: 2.7.3

moebius(factor(18)) returns 1 rather than 0. It appears that whenever moebus is pased a factorization matrix it checks only the first exponent rather than all the exponents. Other numbers it fails at include 50, 54, 75, 90, 98; in fact I tested that the pattern holds up to 10^8.

Generally I think something like
v=[1..100];fv=apply(factor,v);
apply(f, v) == apply(f, fv)
would be a reasonable test for all the arithmetic functions accepting factorizations.

The primary use case here is avoiding duplicate factorizations:

myfunc(n)=
{
  my(f=factor(n));
  moebius(f) * sigma(f) * eulerphi(f);
}

Charles Greathouse
Analyst/Programmer
Case Western Reserve University