OFFSET
1,1
LINKS
Michel Marcus, Table of n, a(n) for n = 1..1000
EXAMPLE
a(5) = 97 because 97 + 101 = 198, and prime(5) = 11 is the largest prime divisor
of 198.
MAPLE
with(numtheory):for n from 1 to 100 do: nn:=ithprime(n):id:=0:for k from 1
to 2000 while(id=0) do:x:=ithprime(k+1)+ithprime(k): if irem(x, nn)=0 then id:=1:printf(`%d,
`, ithprime(k)):else fi:od:od:
MATHEMATICA
Table[p = 2; q = 3; While[Mod[p + q, Prime[n]] > 0, p = q; q = NextPrime[q]]; p, {n, 65}]
PROG
(PARI) a(n) = {my(pn=prime(n)); my(p=2); forprime(q=3, , if ((p+q) % pn, p = q, break); ); p; } \\ Michel Marcus, Jul 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Apr 11 2011
STATUS
approved