login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A290171 Numbers n such that (n-1)^2 < ((n-1)! mod n^2). 0
5, 13, 563, 1277, 780887 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The Wilson primes (A007540) are members of this sequence.

a(n) is prime or twice a prime. Else ((n-1)! mod n^2 == 0). - David A. Corneth, Jul 23 2017

LINKS

Table of n, a(n) for n=1..5.

PROG

(PARI) for(n=1, 1e5, a=(n-1)!%n^2; if((n-1)^2<a, print1(n", ")))

(PARI) is(n) = (n-1)^2 < lift(Mod((n-1)!, n^2)) \\ Felix Fröhlich, Jul 23 2017

(PARI) val(n, p) = my(r=0); while(n, r+=n\=p); r

is(n) = my(f = factor(n), r = Mod(1, n^2)); if(#f~ > 2, return(0), if(#f~==2, if(f[1, 1]!=2, return(0)))); forprime(p=2, n-1, r*=Mod(p, n^2)^val(n-1, p)); (n-1)^2 < lift(r) \\ David A. Corneth, Jul 23 2017

CROSSREFS

Cf. A007540.

Sequence in context: A145557 A012033 A007540 * A157250 A009157 A153374

Adjacent sequences:  A290168 A290169 A290170 * A290172 A290173 A290174

KEYWORD

nonn,more

AUTHOR

Gionata Neri, Jul 23 2017

EXTENSIONS

a(5) from Chai Wah Wu, Jul 30 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 6 23:56 EDT 2020. Contains 335484 sequences. (Running on oeis4.)