cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A152292 Primes p of the form : (p-n)/(n+1)=prime and (n+1)*p+n=prime. n=2.

Original entry on oeis.org

17, 23, 59, 89, 239, 269, 293, 383, 419, 503, 953, 1013, 1193, 1259, 1823, 1979, 2129, 2633, 2789, 3209, 3389, 4229, 5099, 5333, 6089, 6299, 6803, 7019, 7673, 7853, 8123, 8513, 8753, 8819, 9059, 9203, 10169, 10223, 10589, 10853, 10979, 11159, 12689
Offset: 1

Views

Author

Keywords

Comments

This is the general form : (p-n)/(n+1)=prime and (n+1)*p+n=prime; 'Safe' primes and 'Sophie Germain' primes just one part of this general form; If n=1 then we got 'Safe' primes and 'Sophie Germain' primes.

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [5..2*10^3] | IsPrime(NthPrime(n) div 3) and IsPrime(3*NthPrime(n)+2)]; // Vincenzo Librandi, Mar 08 2018
  • Maple
    Res:= NULL: count:= 0:
    q:= 1:
    while count < 100 do
    q:= nextprime(q);
    if isprime(3*q+2) and isprime(9*q+8)
        then Res:= Res, 3*q+2; count:= count+1
      fi
    od:
    Res; # Robert Israel, Mar 07 2018
  • Mathematica
    lst={};n=2;Do[p=Prime[k];If[PrimeQ[(p-n)/(n+1)]&&PrimeQ[(n+1)*p+n],AppendTo[lst,p]],{k,7!}];lst
  • PARI
    lista(nn) = forprime(p=17, nn, if(isprime(3*p+2) && isprime(p\3), print1(p", "))); \\ Altug Alkan, Mar 07 2018
    

A152388 Primes p such that (p-n)/(n+1) and (n+1)*p+n are both prime, with n=127.

Original entry on oeis.org

6143, 11519, 23039, 205823, 253439, 345599, 417023, 463103, 752639, 1071359, 1474559, 1511423, 1753343, 1766399, 1903103, 2188799, 2271743, 2711039, 2741759, 2747903, 2813183, 2997503, 3032063, 3258623, 3371519, 3463679
Offset: 1

Views

Author

Keywords

Comments

This is the general form : (p-n)/(n+1)=primeand(n+1)*p+n=prime; 'Safe' primes and'Sophie Germain' primes just one part of this general form; If n=1 then we got'Safe' primes and'Sophie Germain' primes.

Crossrefs

Programs

  • Mathematica
    lst={};n=127;Do[p=Prime[k];If[PrimeQ[(p-n)/(n+1)]&&PrimeQ[(n+1)*p+n],AppendTo[lst,p]],{k,2*9!}];lst
    Select[Prime[Range[250000]],AllTrue[{(#-127)/128,128#+127},PrimeQ]&] (* Harvey P. Dale, Apr 30 2023 *)

Extensions

Definition clarified by Harvey P. Dale, Apr 30 2023
Showing 1-2 of 2 results.