Primes sorted by relation of largest divisors of p+-1

cino hilliard hillcino368 at hotmail.com
Sat Feb 19 20:30:04 CET 2005


Hi Hugo,

This gets your results in Pari. I  eyeballed and it appears your output is 
correct. sdiv is not used in
your example since 2 will always be the smallest divisor. However it may be 
useful for other
concoctions such as p-2 and p+2, p-m and p+m.

Eg.,
hugo3(n,m) =
          {
          local(p);
           forprime(p=prime(m+1),n,
           if(sdiv(p-m) < sdiv(p+m),print1(p","))
           )
          }
m=2,4 are out there but m=6
17,23,31,37,41,47,53,61,67,71,73,83,97,101,103,107,131,151,157,167,173,181,191,193,
211,223,227,233,241,251,257,263,271,277,281,293,307,311,331,347,353,367,373,...
is new. Ah yes, another infinitude of sequences!



hugo1(n) =
          {
          local(p);
           forprime(p=3,n,
           if(bdiv(p-1) < bdiv(p+1),print1(p","))
           )
          }

hugo2(n) =
          {
          local(p);
           forprime(p=3,n,
           if(bdiv(p-1) > bdiv(p+1),print1(p","))
           )
          }

bdiv(n) =   \\The biggest prime divisor of n
             {
              local(x);
              x=ifactor(n);
              return(x[length(x)])
              }

sdiv(n) =    \\The smallest prime divisor of n
             {
              local(x);
              x=ifactor(n);
              return(x[1])
              }

ifactor(n,m=0) = \\The vector of the integer factors of n with multiplicity.
           {
            local(f,j,k,flist);
            flist=[];
            f=Vec(factor(n,m));
            for(j=1,length(f[1]),
               for(k = 1,f[2][j],flist = concat(flist,f[1][j])
                );
               );
            return(flist)
           }



Cino




>From: Hugo Pfoertner <all at abouthugo.de>
>To: seqfan at ext.jussieu.fr
>Subject: Primes sorted by relation of largest divisors of p+-1
>Date: Sat, 19 Feb 2005 19:13:04 +0100
>
>SeqFans,
>
>can someone with Mmca, Maple, Pari etc. please check the correctness of
>the two sequences:
>
>%S A103666 5 13 17 19 37 41 43 61 67 73 97 101 109 113 137 151 157 163
>181 193 197 211 229 241 251 257 271 277 281 283 313 331 337 353 379 397
>401 409 421 433 443 457 463 487 491 521 523 541 547 577 601 613 617 631
>641 661 673 677 691 701 709 727 733 751 757 761 769 787
>%N A103666 Primes p such that the largest prime divisor of p-1 is less
>than the largest prime divisor of p+1.
>%e A103666 a(1)=5 because the largest prime divisor of 4 is less than
>the largest prime divisor of 6.
>%Y A103666 Cf. A023503 greatest prime divisor of n-th prime - 1, A023509
>greatest prime divisor of n-th prime + 1, A103667.
>%O A103666 1
>%K A103666 ,nonn,
>
>%S A103667 7 11 23 29 31 47 53 59 71 79 83 89 103 107 127 131 139 149
>167 173 179 191 199 223 227 233 239 263 269 293 307 311 317 347 349 359
>367 373 383 389 419 431 439 449 461 467 479 499 503 509 557 563 569 571
>587 593 599 607 619 643 647 653 659 683 719 739 743 773 797 809
>%N A103667 Primes p such that the largest prime divisor of p-1 is
>greater than the largest prime divisor of p+1.
>%e A103667 a(1)=7 because the largest prime divisor of 6 is greater than
>the largest prime divisor of 8.
>%O A103667 1
>%K A103667 ,nonn,
>
>I had to do some manual editing, copy and paste and therefore errors
>might have occurred.
>
>Thanks
>
>Hugo Pfoertner

Have fun,
Cino







More information about the SeqFan mailing list