OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 200: # for a(1)..a(N)
P:= [seq(ithprime(i), i=1..N+1)]:
Delta:= P[2..-1]-P[1..-2] mod 4:
R:= map(charfcn[2], Delta):
ListTools:-PartialSums(R); # Robert Israel, Dec 31 2019
MATHEMATICA
Accumulate[Map[Boole[Mod[#, 4] == 2]&, Differences[Prime[Range[100]]]]] (* Paolo Xausa, Feb 05 2024 *)
PROG
(Magma) [#[p:p in PrimesInInterval(1, NthPrime(n))| (NextPrime(p)-p) mod 4 eq 2]:n in [1..90]]; // Marius A. Burtea, Dec 31 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 30 2019
STATUS
approved