login
A318908
a(n) = (2*(-4)^((p-3)/4) + 1)/p, where p is the n-th prime congruent to 3 mod 4.
1
1, -1, 3, 27, -89, -1057, 48771, -178481, 9099507, 128207979, -483939977, -6958934353, 26494256091, -21862134113449, 84179432287299, -72624976668147841, 281629680514649643, 4246732448623781667, -250191601741438157017, 14833445639443302757131, -57912614113275649087721, 3457933070629553840500347, -207403566791267899459539137, -3185051759367410556524379913
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
Cf. A002145 (primes of the form 4n + 3).
Cf. A270697 (composite k == 3 (mod 4) that divides 2*(-4)^((k-3)/4) + 1).
Sequence in context: A166102 A316754 A045491 * A343135 A343105 A200977
KEYWORD
sign
AUTHOR
Jianing Song, Sep 05 2018
STATUS
approved