login
A188815
Least prime p such that prime(n) divides p + nextprime(p).
3
3, 5, 2, 19, 97, 23, 31, 73, 67, 347, 89, 109, 199, 83, 281, 631, 233, 607, 131, 421, 727, 1103, 743, 353, 577, 907, 307, 641, 433, 1237, 251, 389, 271, 829, 593, 449, 1879, 487, 331, 3109, 1609, 3257, 1907, 383, 2357, 1987, 3163, 443, 2719, 683, 1861, 6211, 719, 2251, 769, 3943, 5647, 2437, 4153, 3371, 563, 877, 3677, 929, 937
OFFSET
1,1
LINKS
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
Cf. A000040.
Sequence in context: A053979 A130847 A337064 * A010615 A114865 A096196
KEYWORD
nonn
AUTHOR
Michel Lagneau, Apr 11 2011
STATUS
approved