OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
Prime(4)=7, and the smallest prime that is greater than 7 and congruent to 4 mod 7 is 11, so a(4)=11.
MATHEMATICA
lst={}; Do[w=1; Label[begin];
If[PrimeQ[w*Prime[n]+n], AppendTo[lst, w*Prime[n]+n], w=w+1; Goto[begin]], {n, 100}]; lst
PROG
(PARI) first(m)={my(v=vector(m), t, p); for(i=1, m, t=i; while(1, p=prime(t); if((p-i)%prime(i)==0, v[i]=p; break, t++); )); v; } /* Anders Hellström, Aug 11 2015 */
(Haskell)
a260416 n = a260416_list !! (n-1)
a260416_list = f 1 a000040_list where
f x (p:ps) = g ps where
g (q:qs) = if (q - x) `mod` p == 0 then q : f (x + 1) ps else g qs
-- Reinhard Zumkeller, Aug 20 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Ivan N. Ianakiev, Jul 25 2015
STATUS
approved