OFFSET
1,3
COMMENTS
a(n) is always an integer. If p == 3 (mod 8), then 2*(-4)^((p-3)/4) == 2*4^((p-3)/4) == 2^((p-1)/2) (mod p). 2 is a quadratic nonresidue modulo p so 2^((p-1)/2) == -1 (mod p). If p == 7 (mod 8), then 2*(-4)^((p-3)/4) == -2*4^((p-3)/4) == -2^((p-1)/2) (mod p). 2 is a quadratic residue modulo p so 2^((p-1)/2) == 1 (mod p).
EXAMPLE
The third prime congruent to 3 mod 4 is 11, so a(3) = (2*(-4)^2 + 1)/11 = 33/11 = 3.
PROG
(PARI) forstep(p=3, 200, 4, if(isprime(p), print1((2*(-4)^((p-3)/4)+1)/p, ", ")))
CROSSREFS
KEYWORD
sign
AUTHOR
Jianing Song, Sep 05 2018
STATUS
approved