OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..777
EXAMPLE
a(2) = 7 is the first prime p such that 5+p is divisible by 3.
a(3) = 3 is the first prime p such that 7+p is divisible by 5.
a(4) = 11 is the first prime p such that 3+p is divisible by 7.
MAPLE
q:= 3: p:= 5: R:= 3, 5:
for i from 2 to 50 do
t:= (-p) mod q;
while not isprime(t) do t:= t+q od;
q:= p; p:= t; R:= R, p;
od:
R;
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Robert Israel, Dec 18 2020
STATUS
approved