%I #28 Oct 03 2021 04:51:46
%S 2,3,5,7,13,17,29,31,83,89,131,137,197,199,211,223,317,331,349,353,
%T 443,449,461,463,509,521,563,569,587,593,613,617,619,631,727,733,797,
%U 809,821,823,853,857,877,881,947,953,967,971,983,991,991,997,1061,1063
%N Pairs of consecutive primes p, q, for which the smallest primitive root of q is 1 greater than the smallest primitive root of p.
%D Paulo Ribenboim, The new book of prime number records, Springer, 1996, pp. 22-25.
%H Amiram Eldar, <a href="/A048975/b048975.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Pri#primes_root">Index entries for primes by primitive root</a>
%e The primitive roots (mod 13) are 2, 6, 7, and 11, and the primitive roots (mod 17) are 3, 5, 6, 7, 10, 11, 12, and 14, so since 3 = 2 + 1, 13 and 17 are in the sequence.
%e 991 is in the sequence twice because the smallest primitive roots for the three consecutive primes 983, 991, and 997 are 5, 6, and 7, respectively, so 991 appears as the larger of the pair (983,991) since 6 = 5 + 1, and as the smaller of the pair (991,997) since 7 = 6 + 1.
%t Reap[ Do[ If[ PrimitiveRoot[p] + 1 == PrimitiveRoot[np = NextPrime[p]], Sow[p]; Sow[np]], {p, Prime /@ Range[200]}]][[2, 1]] (* _Jean-François Alcover_, Oct 04 2012 *)
%t Flatten[{Prime[#],Prime[#+1]}&/@Flatten[Position[Partition[ PrimitiveRoot[ Prime[ Range[200]]],2,1],_?(#[[2]]-#[[1]]==1&),{1},Heads->False]]] (* _Harvey P. Dale_, Dec 22 2014 *)
%o (PARI) forprime(p=2,1061,if( lift(znprimroot(p)) + 1 == lift(znprimroot(nextprime(p+1))), print(p);print(nextprime(p+1)))) \\ _Michael B. Porter_, Mar 03 2013
%K nice,nonn
%O 1,1
%A _Felice Russo_
%E More terms from _James A. Sellers_, Apr 22 2000
|