Hi Dears
First I must find all primes in the form p=8k+1 or p=8k+7 in range 1.
Second I should find the all integers a and b such that p=a^2-2b^2 in
range 1.
Could you please help me for writing this program?
On 7/24/11, raman kurdi raman.kurdi2...@gmail.com wrote:
Dear Prof.Stein
Hi Dears
First I must find all primes in the form p=8k+1 or p=8k+7 in range
1.
Second I should find the all integers a and b such that p=a^2-2b^2 in
range 1.
Could you please help me for writing this program?
--
To post to this group, send email to sage-support@googlegroups.com
To
On Jul 24, 1:24 pm, raman raman.kurdi2...@gmail.com wrote:
Hi Dears
First I must find all primes in the form p=8k+1 or p=8k+7 in range
1.
[p for p in prime_range(10^4) if p%8 in [1,7]]
Second I should find the all integers a and b such that p=a^2-2b^2 in
range 1.
For the first question, since Sage has the prime_range() function: [p
for p in prime_range(1) if mod(p, 8) in (1, 7)]. There are several
ways of filtering a list in Python, but I tend to choose list
comprehensions (http://en.wikipedia.org/wiki/
List_comprehension#Python)
On Jul 24, 8:24 am,
On Sun, Jul 24, 2011 at 10:46 AM, John Cremona john.crem...@gmail.comwrote:
On Jul 24, 1:24 pm, raman raman.kurdi2...@gmail.com wrote:
Hi Dears
First I must find all primes in the form p=8k+1 or p=8k+7 in range
1.
[p for p in prime_range(10^4) if p%8 in [1,7]]
Second I should
Hi people,
I have a little doubt about ticks in plots. I'd like to know whether the
following tasks are possible:
- eliminate all ticks of a plot.
- eliminate the dependent variable ticks.
- changing the number by letter, either 1 by \eta and 2 by 2\eta or 1 by
\eta and 1.2 by \xi.
I want to declare c to be of the type defined by the class Rational.
I'm sure this is easy, but what I want to do is this:
from sage.rings.rational import Rational
cdef Rational c
but that doesn't work. Neither does cimport (which I found in a file
somewhere, albeit commented out, and
On Sun, Jul 24, 2011 at 5:47 PM, john_perry_usm john.pe...@usm.edu wrote:
I want to declare c to be of the type defined by the class Rational.
I'm sure this is easy, but what I want to do is this:
from sage.rings.rational import Rational
cdef Rational c
but that doesn't work. Neither
What about not-the-notebook? :-) For example, I have the following
file, called test_rational.pyx:
from sage.rings.rational import Rational
cpdef Rational add(a, b):
return a + b
When I try to attach it to sage, I get: [lots of output removed]
On Sunday, July 24, 2011, john_perry_usm john.pe...@usm.edu wrote:
What about not-the-notebook? :-) For example, I have the following
file, called test_rational.pyx:
from sage.rings.rational import Rational
import --- cimport ?!
cpdef Rational add(a, b):
return a + b
When I
10 matches
Mail list logo