OFFSET
1,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
EXAMPLE
2 is present as prime(3) - prime(2) = 5 - 3 = 2 = 2 modulo 3.
24 is present as prime(24) = 89, prime(25) = 97 and 97-89 = 8 = 2 modulo 3.
MATHEMATICA
Select[Range@ 225, Mod[Prime[# + 1] - Prime@ #, 3] == 2 &] (* Michael De Vlieger, Mar 17 2016 *)
Position[Differences[Prime[Range[300]]], _?(Mod[#, 3]==2&)]//Flatten (* Harvey P. Dale, Jul 22 2016 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(PARI) isok(n) = ((prime(n+1) - prime(n)) % 3) == 2; \\ Michel Marcus, Mar 17 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved