OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
q:= 2: r:= 3:
R:= NULL: count:= 0:
for n from 2 while count < 100 do
p:= q; q:= r; r:= nextprime(r);
if igcd(n, p+r) > 1 then count:= count+1; R:= R, q; fi
od:
R; # Robert Israel, Dec 08 2020
MATHEMATICA
p[n_] := Prime[n];
u = Select[Range[2, 200], GCD[#, p[# - 1] + p[# + 1]] == 1 &] (* A336378 *)
v = Select[Range[2, 200], GCD[#, p[# - 1] + p[# + 1]] > 1 &] (* A336379 *)
Prime[u] (* A336380 *)
Prime[v] (* A336381 *)
Select[Partition[Prime[Range[100]], 3, 1], GCD[PrimePi[#[[2]]], #[[1]]+#[[3]]]>1&][[All, 2]] (* Harvey P. Dale, Dec 07 2022 *)
PROG
(PARI) for(n=2, 200, if(gcd(n, prime(n-1)+prime(n+1))>1, print1(prime(n), ", "))) \\ Derek Orr, Nov 23 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Oct 25 2020
EXTENSIONS
Offset changed by Robert Israel, Dec 08 2020
STATUS
approved