login
A080909
a(n) = (2n+1)! modulo 4n+3, |a(n)| <= 1.
0
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, 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, 0, 1, 0, 0, -1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1
OFFSET
0,1
COMMENTS
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?
REFERENCES
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)!.
FORMULA
a(n) = mods((2*n+1)!, 4*n+3).
EXAMPLE
a(3) = 0 since 7! == 0 (mod 15).
a(4) = 1 since 9! == -1 (mod 19).
MAPLE
seq(mods((2*n+1)!, 4*n+3), n=0..100);
MATHEMATICA
a[ n_] := Mod[(2*n+1)!, 4*n+3, -1]; (* Michael Somos, Jul 25 2023 *)
PROG
(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
CROSSREFS
Sequence in context: A267533 A118274 A275737 * A087755 A050072 A267576
KEYWORD
sign
AUTHOR
Christophe Leuridan (ChristopheLeuridan(AT)ujf-grenoble.fr), Apr 01 2003
EXTENSIONS
More terms from Michel Marcus, Jul 21 2013
Name edited by Michael Somos, Jul 25 2023
STATUS
approved