OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
William Banks, Paul Pollack and Carl Pomerance, Symmetric primes revisited, arXiv:1908.06161 [math.NT], 2019.
Rob Burns, Extremely symmetric primes, arXiv:2005.02922 [math.NT], 2020.
P. Fletcher, W. Lindgren and C. Pomerance, Symmetric and asymmetric primes, J. Number Theory 58 (1996) 89-99.
A. B. Kalmynin, On the Symmetry Graph of Prime Numbers, INTEGERS 21 (2021), #A2.
EXAMPLE
Any twin prime is symmetric since 2=gcd(p-1,p+1) for any odd prime p.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Steven Finch, Jan 21 2004
EXTENSIONS
More terms from Robert G. Wilson v, Sep 19 2004
STATUS
approved