SmallestNonDivisor -- new fn
In the context of the "universal denominator" for a polynomial ideal, it could be useful to find the first prime which does not divide this number.
A possible name is
What exact semantics do we want?
#2 Updated by John Abbott over 1 year ago
After a brief discussion on email, I think it is best to write on redmine.
Robbiano proposes a function to find the "first/smallest" prime which does not divide the "universal denominator".
Proposed names are:
What should the arg(s) be? Obviously an arg must be the number (
BigInt) whose prime divisors we must avoid; a possible second arg could be a lower bound for the prime. Result can be a
JAA wonders whether it might be a good idea to have an iterator which generates a succession of non-dividing primes. A suitable name could be
PrimeNonDivisors. What would the arg(s) be? Just the
BigInt whose prime divisors we wish to avoid? Or perhaps also a lower bound for the prime non-divisors? The iterator would produce
NOTE a quick test in C++ suggests that a simplistic loop works tolerably well. It does not appear to be worth the trouble of trying to remove all powers of prime divisors. Anyway, extreme speed is probably not so important.
#6 Updated by John Abbott about 1 year ago
While preparing an example of a simple ideal with a big "universal denominator" I encountered a number with about 330 decimal digits which I wanted to factorize.
It turned out that a better approach was to take all denominators of all coeffs of all polys in all RGBs and then call
GCDFreeBasis. Finally I had to use
SmoothFactor on the few numbers which were not
IsPrime; this allowed me to obtain the full factorization (with some primes > 10^10).
Could there be any interest/utility in trying to produce a factorized form of the universal denominator?