OFFSET
1,1
LINKS
EXAMPLE
n=4: prime(n-1) + prime(n+1) = 5 + 11 = 16 = 4*n,
n=20: 67 + 73 = 140 = 7*n,
n=16899042: 312632263 + 312632291 = 625264554 = 37*n,
n=69709721: 1394194387 + 1394194453 = 2788388840 = 40*n.
MATHEMATICA
Select[Range[2, 100000], Mod[Prime[# - 1] + Prime[# + 1], #] == 0 &] (* Michael De Vlieger, Aug 07 2015 *)
PROG
(PARI) a=2; b=5; for(n=2, 10^8, c=a+b; if(c%n<1, print1(n", ")); a=nextprime(a+1); b=nextprime(b+1))
(PARI) p=2; q=3; n=1; forprime(r=5, 1e9, if((p+r)%n++==0, print1(n", ")); p=q; q=r) \\ Charles R Greathouse IV, Aug 10 2015
(Magma) [n: n in [2..7*10^3], k in [2..7*10^3] | (NthPrime(n-1) + NthPrime(n+1)) eq n*k]; // Vincenzo Librandi, Aug 07 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 06 2015
EXTENSIONS
a(27)-a(33) from Charles R Greathouse IV, Aug 10 2015
STATUS
approved