OFFSET
1,1
COMMENTS
a(n): A000040(1), A065091(1), A002145(1), A007528(1), A030433(1), A068231(1), A127576(1), A061242(1), A141857(1), A141976(1), A132236(1), A142111(1), A142198(1), A141898(1), A141926(1), A142531(1), A142004(1), A142799(1), A142068(1), A142099(1), ...
Smallest prime q such that (prime(n)^2 + q*prime(n))/(prime(n) + 1) is an integer.
LINKS
Robert Israel, Table of n, a(n) for n = 1..6000
EXAMPLE
a(4) = 5 because 5 == -1 (mod prime(4)-1) and is prime.
MAPLE
for n from 1 to 100 do
k:= ithprime(n)-1;
q:= 2;
while (1 + q) mod k <> 0 do
q:= nextprime(q)
od;
A[n]:= q;
od:
seq(A[i], i=1..1000); # Robert Israel, Oct 26 2015
MATHEMATICA
Table[q = 2; z = Prime@ n - 1; While[Mod[q, z] != z - 1, q = NextPrime@ q]; q, {n, 59}] (* Michael De Vlieger, Oct 26 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Oct 25 2015
EXTENSIONS
Corrected and edited by Robert Israel, Oct 26 2015,
STATUS
approved