Loading ...
Sorry, an error occurred while loading the content.
 

please

Expand Messages
  • rach
    Won t someone please try this script in my site http://www.1athlet.com the subject of the script is about (conjecture and 2^n-1) please submit a Notice rachid
    Message 1 of 2 , Jun 1, 2010
      Won't someone please try this script in my site http://www.1athlet.com

      the subject of the script is about (conjecture and 2^n-1)

      please submit a Notice
      rachid
    • djbroadhurst
      ... For odd n 1, the application computes the order of 2 modulo n by the following very slow method:
      Message 2 of 2 , Jun 2, 2010
        --- In primenumbers@yahoogroups.com,
        "rach" <maths_forall@...> wrote:

        > http://www.1athlet.com

        For odd n > 1, the application computes the order
        of 2 modulo n by the following very slow method:

        ord(n)=local(m=n,c);while(m,c++;m=(m+if(m%2,0,n)-1)/2);c;

        With n = 8988229, it took 8 seconds:

        gettime;print(ord(8988229)" in "round(gettime/10^3)" seconds");
        8988228 in 8 seconds

        By comparison, Pari-GP's "znorder" is 500000 times faster,
        as I here show by computing the order 1000 times:

        gettime;for(k=1,1000,ans=znorder(Mod(2,8988229)));
        print(ans" in "gettime" microseconds");
        8988228 in 15 microseconds

        Here is a test that the slow method works up to n = 33333:

        forstep(n=3,33333,2,if(ord(n)!=znorder(Mod(2,n)),print(n)));
        [the rest is silence]

        David
      Your message has been successfully submitted and would be delivered to recipients shortly.