OFFSET
1,1
EXAMPLE
For n = 3 we have prime(n+1) = 7, prime(n) = 5; 17 is the least prime of form 7 + k*5, so a(3) =17.
MATHEMATICA
lpf[n_]:=Module[{k=1, np=NextPrime[n]}, While[!PrimeQ[k*n+np], k++]; k*n+np]; lpf/@Prime[Range[60]] (* Harvey P. Dale, Jan 23 2016 *)
PROG
(PARI) {m=250; q=2; p=3; while(p<m, k=1; while(!isprime(a=p+k*q), k++); print1(a, ", "); q=p; p=nextprime(p+1))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 02 2004
EXTENSIONS
Edited and extended by Klaus Brockhaus, Jun 03 2004
STATUS
approved