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.

A090190 Symmetric primes: an odd prime p is symmetric if there exists an odd prime q such that |p-q| = gcd(p-1,q-1).

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 29, 31, 37, 41, 43, 53, 59, 61, 67, 71, 73, 79, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 269, 271, 277, 281, 283, 293, 307, 311
Offset: 1

Views

Author

Steven Finch, Jan 21 2004

Keywords

Examples

			Any twin prime is symmetric since 2=gcd(p-1,p+1) for any odd prime p.
		

Crossrefs

Complement (in A000040) gives A090191.

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]]]; Select[ Prime[ Range[2, 100]], f[ # ] != 0 &] (* Robert G. Wilson v, Sep 19 2004 *)
  • PARI
    \\ Assumes n is an odd prime
    is(p)=fordiv(p-1,d, if(isprime(p-d) || isprime(p+d), return(1))); 0 \\ Charles R Greathouse IV, Aug 24 2021

Extensions

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