login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080909 a(n) = (2n+1)! modulo 4n+3, |a(n)| <= 1. 0

%I #30 Jul 26 2023 08:30:14

%S 1,-1,-1,0,-1,1,0,1,0,0,-1,-1,0,0,1,0,-1,1,0,-1,1,0,0,0,0,-1,1,0,0,0,

%T 0,-1,-1,0,1,0,0,1,0,0,-1,1,0,0,-1,0,0,-1,0,-1,0,0,1,0,0,1,-1,0,0,1,0,

%U 0,1,0,0,-1,0,1,0,0,1,0,0,0,0,0,1,1,0,0,0,0,1

%N a(n) = (2n+1)! modulo 4n+3, |a(n)| <= 1.

%C If 4n+3 is composite, then a(n)=0. If 4n+3 is prime, then a(n)=(-1)^m where m is the number of quadratic non-residues less than or equal to 2n+1. Is there a way to predict whether a(n)=1 or a(n)=-1?

%D G. H. Hardy and E. M. Wright, An introduction to the theory of number, fourth edition, 1960, section 7.7: the residue of ((p-1)/2)!.

%F a(n) = mods((2*n+1)!, 4*n+3).

%e a(3) = 0 since 7! == 0 (mod 15).

%e a(4) = 1 since 9! == -1 (mod 19).

%p seq(mods((2*n+1)!, 4*n+3), n=0..100);

%t a[ n_] := Mod[(2*n+1)!, 4*n+3, -1]; (* _Michael Somos_, Jul 25 2023 *)

%o (PARI) a(n)= {v =(2*n+1)! % (4*n+3); if (2*v > 4*n+3, v -= 4*n+3); return (v);} \\ _Michel Marcus_, Jul 21 2013

%K sign

%O 0,1

%A Christophe Leuridan (ChristopheLeuridan(AT)ujf-grenoble.fr), Apr 01 2003

%E More terms from _Michel Marcus_, Jul 21 2013

%E Name edited by _Michael Somos_, Jul 25 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 5 04:35 EDT 2024. Contains 372257 sequences. (Running on oeis4.)