OFFSET
1,1
COMMENTS
a(n) > 2*prime(n) for n > 1.
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
LINKS
Robert Israel, Table of n, a(n) for n = 1..408
EXAMPLE
a(1) = 3 since prime(1) = 2 and 3 == 1 (mod 2).
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
(mod 6).
MAPLE
V:= {seq(4*i+2, i=1..10^5)}: A[1]:= 3:
for n from 2 do
pn:= ithprime(n);
R:= select(t -> t mod pn = 0, V);
found:= false;
for r in R do
if isprime(r+1) then
found:= true;
A[n]:= r+1;
break
fi
od;
if not found then break fi;
V:= V minus R;
od:
seq(A[i], i=1..n-1); # Robert Israel, Mar 29 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Feb 19 2006
STATUS
approved