login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A080908
a(n) = the sign of r(n), where r(n) is the integer in [ -2n,2n] which is congruent to (2n)! modulo 4n+1
0
0, 1, -1, 1, -1, 0, 0, 1, 0, -1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1
OFFSET
0,1
COMMENTS
If 4n+1 is composite, then a(n)=0, except when n=2. If 4n+1 is a prime number, then (2n)! is a square root of -1 modulo 4n+1 and a(n)=1 or a(n)=-1. Is there a simple way to predict whether a(n)=1 or a(n)=-1 ? The Maple program could be simplified by setting sign(0)=0, but I do not know how to do that.
REFERENCES
Hardy, G. H. and Wright, E. M., An introduction to the theory of number (Fourth Edition, 1960), section 7.7: the residue of ((p-1)/2)!
EXAMPLE
a(2) = -1 because 4! = 24 = -3 modulo 9 and a(5) = 0 because 10! = 0 modulo 21.
MAPLE
for n from 0 to 100 do (sign(2*mods((2*n)!, 4*n+1)+1) + sign(2*mods((2*n)!, 4*n+1)-1))/2 end do;
CROSSREFS
Sequence in context: A099859 A176416 A102460 * A131720 A131719 A342460
KEYWORD
sign
AUTHOR
Christophe Leuridan (Christophe.Leuridan(AT)ujf-grenoble.fr), Apr 01 2003
STATUS
approved