OFFSET
1,1
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
MATHEMATICA
f[n_] := Block[{p = Prime@ n}, r = p - 1; While[ !PrimeQ@ r, r += p]; r]; Array[f, 50] (* Robert G. Wilson v, Jun 20 2014 *)
PROG
(PARI) a(n) = {prn = prime(n); p = 2; while(p % prn != prn - 1, p = nextprime(p+1)); p; } \\ Michel Marcus, Aug 04 2013
(Haskell)
a032448 n = head [q | q <- a000040_list, let p = a000040 n,
q `mod` p == p - 1]
-- Reinhard Zumkeller, Aug 08 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 25 2003
EXTENSIONS
Edited by Franklin T. Adams-Watters, Jun 21 2010
STATUS
approved