OFFSET
0,7
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
MAPLE
N:= 100: # for a(0)..a(N)
P:= select(isprime, [seq(i, i=3..nextprime(2*N+1), 2)]):
Delta:= P[2..-1]-P[1..-2] mod 4:
A:= Array(0..N): t:= 0: j:= 1:
for n from 0 to N do
m:= 2*n+1:
if m = P[j] then t:= t + charfcn[0](Delta[j]); j:= j+1 fi;
A[n]:= t
od:
convert(A, list); # Robert Israel, Dec 31 2019
PROG
(Magma) [#[p:p in PrimesInInterval(1, 2*n+1)| (NextPrime(p)-p) mod 4 eq 0]:n in [0..80]]; // Marius A. Burtea, Dec 31 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 29 2019
STATUS
approved