login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = (2*(-4)^((p-3)/4) + 1)/p, where p is the n-th prime congruent to 3 mod 4.
1

%I #10 Sep 06 2018 04:43:17

%S 1,-1,3,27,-89,-1057,48771,-178481,9099507,128207979,-483939977,

%T -6958934353,26494256091,-21862134113449,84179432287299,

%U -72624976668147841,281629680514649643,4246732448623781667,-250191601741438157017,14833445639443302757131,-57912614113275649087721,3457933070629553840500347,-207403566791267899459539137,-3185051759367410556524379913

%N a(n) = (2*(-4)^((p-3)/4) + 1)/p, where p is the n-th prime congruent to 3 mod 4.

%C 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).

%e The third prime congruent to 3 mod 4 is 11, so a(3) = (2*(-4)^2 + 1)/11 = 33/11 = 3.

%o (PARI) forstep(p=3, 200, 4, if(isprime(p), print1((2*(-4)^((p-3)/4)+1)/p, ", ")))

%Y Cf. A002145 (primes of the form 4n + 3).

%Y Cf. A270697 (composite k == 3 (mod 4) that divides 2*(-4)^((k-3)/4) + 1).

%K sign

%O 1,3

%A _Jianing Song_, Sep 05 2018