Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Symmetric primes: an odd prime p is symmetric if there exists an odd prime q such that |p-q| = gcd(p-1,q-1).
5

%I #37 Nov 02 2022 14:26:01

%S 3,5,7,11,13,17,19,29,31,37,41,43,53,59,61,67,71,73,79,89,97,101,103,

%T 107,109,113,127,131,137,139,149,151,157,163,179,181,191,193,197,199,

%U 211,223,227,229,233,239,241,251,257,269,271,277,281,283,293,307,311

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

%H Charles R Greathouse IV, <a href="/A090190/b090190.txt">Table of n, a(n) for n = 1..10000</a>

%H William Banks, Paul Pollack and Carl Pomerance, <a href="https://arxiv.org/abs/1908.06161">Symmetric primes revisited</a>, arXiv:1908.06161 [math.NT], 2019.

%H Rob Burns, <a href="https://arxiv.org/abs/2005.02922">Extremely symmetric primes</a>, arXiv:2005.02922 [math.NT], 2020.

%H P. Fletcher, W. Lindgren and C. Pomerance, <a href="https://doi.org/10.1006/jnth.1996.0066">Symmetric and asymmetric primes</a>, J. Number Theory 58 (1996) 89-99.

%H A. B. Kalmynin, <a href="http://math.colgate.edu/~integers/v2/v2.pdf">On the Symmetry Graph of Prime Numbers</a>, INTEGERS 21 (2021), #A2.

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

%t 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 *)

%o (PARI) \\ Assumes n is an odd prime

%o is(p)=fordiv(p-1,d, if(isprime(p-d) || isprime(p+d), return(1))); 0 \\ _Charles R Greathouse IV_, Aug 24 2021

%Y Complement (in A000040) gives A090191.

%K nonn

%O 1,1

%A _Steven Finch_, Jan 21 2004

%E More terms from _Robert G. Wilson v_, Sep 19 2004