OFFSET
2,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 2..1000
EXAMPLE
Prime(5) = 11, 11 mod 4 = 3, 13 mod 4 = 1, 17 mod 4 = 1, 19 mod 4 = 3, hence a(5) = 11+19 = 30.
MATHEMATICA
nq4[n_]:=Module[{q=NextPrime[n], m=Mod[n, 4]}, While[Mod[q, 4]!=m, q= NextPrime[ q]]; n+q]; Table[nq4[n], {n, Prime[Range[2, 60]]}] (* Harvey P. Dale, Aug 18 2019 *)
PROG
(PARI) {forprime(p=3, 270, m=p%4; q=nextprime(p+1); while(q%4!=m, q=nextprime(q+1)); print1(p+q, ", "))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, May 28 2003
EXTENSIONS
Edited and extended by Klaus Brockhaus, May 28 2003
STATUS
approved