OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
a(1) = 5 because prevprime(5) + nextprime(5) = 3 + 7 = 10 = 5 * 2.
a(2) = 11 because prevprime(11) + nextprime(11) = 7 + 13 = 20 = 5 * 4.
a(3) = 19 because prevprime(19) + nextprime(19) = 17 + 23 = 40 = 5 * 8.
a(4) = 41 because prevprime(41) + nextprime(41) = 37 + 43 = 80 = 5 * 16.
MATHEMATICA
Prime@ Select[Range[2, 179], Mod[Prime[ # - 1] + Prime[ # + 1], 5] == 0 &] (* Robert G. Wilson v *)
Select[Partition[Prime[Range[200]], 3, 1], Divisible[#[[1]]+#[[3]], 5]&] [[All, 2]] (* Harvey P. Dale, May 18 2019 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Jan 01 2006
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Jan 05 2006
STATUS
approved