This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A275111 a(n) = prime(n)! mod prime(n+1). 4
 2, 1, 1, 2, 1, 3, 1, 4, 22, 1, 33, 7, 1, 8, 19, 30, 1, 43, 12, 1, 27, 14, 23, 24, 17, 1, 18, 1, 19, 19, 22, 8, 1, 94, 1, 140, 72, 28, 62, 91, 1, 105, 1, 33, 1, 177, 97, 38, 1, 39, 2, 1, 19, 15, 160, 204, 1, 247, 47, 1, 291, 299, 52, 1, 53, 198, 132, 55, 1, 59, 3, 176 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS By Wilson's theorem, if prime(n+1) - prime(n) = 2 then a(n) = 1. However a(991) = 1, while prime(992) - prime(991) = 7853 - 7841 = 12. See A286181, A286208, A286230. - Robert Israel, Jul 17 2016 LINKS Chai Wah Wu, Table of n, a(n) for n = 1..10000 FORMULA For n>1, a(n) = 1/((prime(n)+1)*(prime(n)+2)*...*(prime(n+1)-2)) mod prime(n+1). - Robert Israel, Jul 17 2016; corrected by Max Alekseyev, May 03 2017 For n>1, a(n) = 1/(prime(n+1)-prime(n)-1)! mod prime(n+1) = 1/(A001223(n)-1)! mod A000040(n+1). - Max Alekseyev, May 03 2017 MATHEMATICA Table[Mod[#!, NextPrime@ #] &@ Prime@ n, {n, 120}] (* Michael De Vlieger, Jul 17 2016 *) PROG (PARI) a(n) = prime(n)! % prime(n+1); \\ Michel Marcus, Jul 17 2016 (PARI) a(n, p=prime(n))=my(q=nextprime(p+1)); if(p==2, 2, lift( 1/prod(r=p+1, q-2, Mod(r, q)) ) ); \\ Charles R Greathouse IV, Jul 18 2016; corrected by Max Alekseyev, May 03 2017 (PARI) a(n, p=prime(n)) = my(q=nextprime(p+1)); if(p==2, 2, (1/(q-p-1)!)%q); \\ Max Alekseyev, May 03 2017 (Python) from sympy import prime from sympy.core.numbers import igcdex def A275111(n):     p, q = prime(n), prime(n+1)     a = q-1     for i in range(p+1, q):         a = (a*igcdex(i, q)[0]) % q     return a # Chai Wah Wu, Jul 18 2016 CROSSREFS Cf. A286181, A286208, A286230. Sequence in context: A113279 A213234 A034807 * A182961 A135062 A088428 Adjacent sequences:  A275108 A275109 A275110 * A275112 A275113 A275114 KEYWORD nonn AUTHOR Thomas Ordowski, Jul 17 2016 EXTENSIONS More terms from Altug Alkan, Jul 17 2016 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.

Last modified October 20 15:29 EDT 2019. Contains 328267 sequences. (Running on oeis4.)