On Tuesday, March 27, 2018 at 8:07:41 AM UTC+1, Ralf Stephan wrote: > > Hello, > I thought I'd try Sage for a casual computation. I was interested in which > numbers of the form (2^n - (-1)^n)/3 are prime. I first tried out n=23: > > sage: (2^23+1)/3 > 2796203 > sage: _.is_prime() > False > sage: factor(2796203) > 2796203 > > It turns out that Rational.is_prime does not exist and the fallback gives > false answers. >
It's a bug, I think - in a field the notion of prime makes little sense, and thus an error should be raised. > > Then, I tried to print a list of primes of the above form, using the > global is_prime: > > sage: for n in range(1,100): > ....: if is_prime((2^n - (-1)^n)/3): > ....: print((2^n - (-1)^n)/3) > ....: > sage: > > No output. Turns out `is_prime(ZZ((2^n - (-1)^n)/3))` works. Really? How > long does Sage exist without a fix to that? This goes beyond "serious lack > of reviewers" and "dev shortage". > > There was always the notion that you shouldn't "team up" for ticket > review. I'm now breaking it. If YOU are interested in fixing the above or > similar problems please mail me. There are also about 25 calculus tickets > from me waiting for review. But probably noone is really interested in that > either. The algebraists can have their Sage back. Good job. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.