Search: id:A080908 Results 1-1 of 1 results found. %I A080908 %S A080908 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 %V A080908 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 %N 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 %C A080908 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. %D A080908 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)! %e A080908 a(2) = -1 because 4! = 24 = -3 modulo 9 and a(5) = 0 because 10! = 0 modulo 21. %p A080908 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; %Y A080908 Sequence in context: A138886 A099859 A102460 this_sequence A131720 A131719 A100656 %Y A080908 Adjacent sequences: A080905 A080906 A080907 this_sequence A080909 A080910 A080911 %K A080908 sign %O A080908 0,1 %A A080908 Christophe Leuridan (Christophe.Leuridan(AT)ujf-grenoble.fr), Apr 01 2003 Search completed in 0.001 seconds