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.

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

A174222 Number of symmetric primes in the interval [prime(n)^2, prime(n)*prime(n+1)].

Original entry on oeis.org

1, 2, 2, 6, 4, 7, 5, 10, 18, 6, 24, 18, 10, 21, 35, 29, 14, 33, 27, 14, 44, 32, 43, 64, 36, 16, 36, 17, 38, 133, 41, 71, 16, 123, 21, 71, 72, 49, 90, 85, 36, 158, 34, 66, 31, 190, 184, 73, 39, 73, 109, 33, 188, 109, 117, 110, 35, 126, 85, 36, 221, 298, 99, 41, 95, 320, 136, 237
Offset: 1

Views

Author

Jaspal Singh Cheema, Mar 18 2010

Keywords

Comments

If you graph a(n) vs. n, an interesting pattern with random-looking fluctuations begins to emerge.
As you go farther along the n-axis, greater are the number of symmetric primes, on average.
The smallest count of a(.)=1 occurs only once at the very beginning.
I suspect all a(n) are > 0. If one could prove this, it would imply that Symmetric primes are infinite.

Examples

			The square of the first prime is 2^2=4 and the product of the first and second prime is 2*3=6. Within this interval, there is 1 symmetric prime, which is 5. Hence a(1)=1.
The second term, a(2)=2, refers to the two symmetric primes 11 and 13 within the interval (9,15).
		

Crossrefs

Programs

  • PARI
    issym(p) = fordiv(p-1, d, if(isprime(p-d) || isprime(p+d), return(1))); 0; \\ A090190
    a(n) = my(p=prime(n), nb=0); forprime(q=p^2, p*nextprime(p+1), if (issym(q), nb++)); nb; \\ Michel Marcus, Nov 03 2022

Formula

#{ A090190(j): A001248(n) < A090190(j) < A006094(n)}.

Extensions

Edited by R. J. Mathar, Mar 31 2010
Showing 1-2 of 2 results.