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.

A090191 Asymmetric primes: an odd prime p is asymmetric if there is no odd prime q such that |p-q|=gcd(p-1,q-1).

Original entry on oeis.org

23, 47, 83, 167, 173, 263, 359, 383, 389, 467, 479, 503, 509, 557, 563, 587, 653, 719, 797, 839, 863, 887, 907, 971, 983, 1103, 1187, 1259, 1283, 1307, 1367, 1439, 1499, 1511, 1523, 1571, 1579, 1637, 1733, 1823, 1907, 1913, 2039, 2063, 2099, 2203, 2207
Offset: 1

Views

Author

Steven Finch, Jan 21 2004

Keywords

Examples

			23 is asymmetric since gcd(22,q-1)=2<23-q for all odd primes q<23, gcd(22,22)=22>0 and gcd(22,q-1)=2<q-23 for all odd primes 23<q<67.
		

Crossrefs

Complement gives A090190.

Programs

  • Mathematica
    f[n_] := Block[{k = 2}, While[k < 10^3 && Abs[n - Prime[k]] != GCD[n - 1, Prime[k] - 1], k++ ]; If[k == 10^3, 0, Prime[k]]]; Complement[ Prime[ Range[2, 500]], Select[ Prime[ Range[2, 500]], f[ # ] != 0 &]] (* Robert G. Wilson v, Sep 19 2004 *)
  • PARI
    is(n)=if(!isprime(n), return(0)); forprime(q=2,2*n, if(abs(n-q)==gcd(n-1,q-1), return(0))); 1 \\ Charles R Greathouse IV, Aug 08 2016
    
  • PARI
    is(n)=if(!isprime(n), return(0)); fordiv(n\2, d, if(isprime(n-2*d) && gcd(n-1,n-2*d-1)==2*d, return(0)); if(isprime(n+2*d) && gcd(n-1,n+2*d-1)==2*d, return(0))); n>2 \\ Charles R Greathouse IV, Aug 08 2016

Extensions

More terms from Robert G. Wilson v, Sep 19 2004