%I #10 Mar 29 2017 19:44:09
%S 3,7,11,239,23,443,647,1103,47,59,2543,3923,83,9203,6299,107,7907,
%T 8663,11927,14627,12119,15959,167,179,20759,20807,23279,23327,28559,
%U 227,37847,263,43019,54767,53939,54059,54323,54443,66467,347,359,69143,383
%N Smallest prime p such that p == 1 (mod prime(n)) and not p == 1 (mod k) for 2 < k < prime(n).
%C a(n) > 2*prime(n) for n > 1.
%C a(n) = 2*prime(n)+1 if prime(n) is in A005384. Otherwise, a(n) > 2*prime(n)^2+1 for n > 1. - _Robert Israel_, Mar 29 2017
%H Robert Israel, <a href="/A116605/b116605.txt">Table of n, a(n) for n = 1..408</a>
%e a(1) = 3 since prime(1) = 2 and 3 == 1 (mod 2).
%e a(4) = 239 since prime(4) = 7, 239 == 1 (mod 7) and for each of the primes q smaller than 239 with q == 1 (mod 7) there is a k (2 < k < 7) such that q == 1 (mod k): 29 == 1 (mod 4), 43 == 1 (mod 6), 71 == 1 (mod 5), 113 == 1 (mod 4), 127 == 1 (mod 3), 197 == 1 (mod 4), 211 == 1 (mod 5), whereas 239 == 2 (mod 3), 3 (mod 4), 4 (mod 5), 5
%e (mod 6).
%p V:= {seq(4*i+2,i=1..10^5)}: A[1]:= 3:
%p for n from 2 do
%p pn:= ithprime(n);
%p R:= select(t -> t mod pn = 0, V);
%p found:= false;
%p for r in R do
%p if isprime(r+1) then
%p found:= true;
%p A[n]:= r+1;
%p break
%p fi
%p od;
%p if not found then break fi;
%p V:= V minus R;
%p od:
%p seq(A[i],i=1..n-1); # _Robert Israel_, Mar 29 2017
%Y Cf. A034694, A116606.
%K nonn
%O 1,1
%A _Klaus Brockhaus_, Feb 19 2006