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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A002982 Numbers n such that n! - 1 is prime. (Formerly M2321) 87
 3, 4, 6, 7, 12, 14, 30, 32, 33, 38, 94, 166, 324, 379, 469, 546, 974, 1963, 3507, 3610, 6917, 21480, 34790, 94550, 103040, 147855, 208003 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The corresponding primes n!-1 are often called factorial primes. REFERENCES J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 166, p. 53, Ellipses, Paris 2008. R. K. Guy, Unsolved Problems in Number Theory, Section A2. N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). LINKS Table of n, a(n) for n=1..27. A. Borning, Some results for k!+-1 and 2.3.5...p+-1, Math. Comp., 26:118 (1972), pp. 567-570. J. P. Buhler et al., Primes of the form n!+-1 and 2.3.5....p+-1, Math. Comp., 38:158 (1982), pp. 639-643. Chris K. Caldwell, Factorial Primes C. K. Caldwell and Y. Gallot, On the primality of n!+-1 and 2*3*5*...*p+-1, Math. Comp., 71:237 (2002), pp. 441-448. P. Carmody, Factorial Prime Search Progress Pages Antonín Čejchan, Michal Křížek, and Lawrence Somer, On Remarkable Properties of Primes Near Factorials and Primorials, Journal of Integer Sequences, Vol. 25 (2022), Article 22.1.4. R. K. Guy & N. J. A. Sloane, Correspondence, 1985 H. Dubner, Factorial and primorial primes, J. Rec. Math., 19 (No. 3, 1987), 197-203. (Annotated scanned copy) Des MacHale and Joseph Manning, Maximal runs of strictly composite integers, The Mathematical Gazette, 99 (2015), pp 213-219. doi:10.1017/mag.2015.28. R. Mestrovic, Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof, arXiv preprint arXiv:1202.3670 [math.HO], 2012. R. Ondrejka, The Top Ten: a Catalogue of Primal Configurations PrimeGrid, World Record Factorial Prime!!! PrimeGrid, Announcement of 94550, (2010) - Felix Fröhlich, Jul 11 2014 PrimeGrid, Announcement of 103040, (2010) - Felix Fröhlich, Jul 11 2014 PrimeGrid, Announcement of 147855, (2013) - Felix Fröhlich, Jul 11 2014 Maxie D. Schmidt, New Congruences and Finite Difference Equations for Generalized Factorial Functions, arXiv:1701.04741 [math.CO], 2017. Eric Weisstein's World of Mathematics, Factorial Eric Weisstein's World of Mathematics, Factorial Prime Eric Weisstein's World of Mathematics, Integer Sequence Primes R. G. Wilson, V, Letter to N. J. A. Sloane, Jan. 1989 Index entries for sequences related to factorial numbers EXAMPLE From Gus Wiseman, Jul 04 2019: (Start) The sequence of numbers n! - 1 together with their prime indices begins: 1: {} 5: {3} 23: {9} 119: {4,7} 719: {128} 5039: {675} 40319: {9,273} 362879: {5,5,430} 3628799: {10,11746} 39916799: {6,7,9,992} 479001599: {25306287} 6227020799: {270,256263} 87178291199: {3610490805} 1307674367999: {7,11,11,16,114905} 20922789887999: {436,318519035} 355687428095999: {8,21,10165484947} 6402373705727999: {17,20157,25293727} 121645100408831999: {119,175195,4567455} 2432902008176639999: {11715,659539127675} (End) MATHEMATICA Select[Range[10^3], PrimeQ[ #!-1] &] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *) PROG (PARI) is(n)=ispseudoprime(n!-1) \\ Charles R Greathouse IV, Mar 21 2013 (Magma) [n: n in [0..500] | IsPrime(Factorial(n)-1)]; // Vincenzo Librandi, Sep 07 2017 (Python) from sympy import factorial, isprime A002982_list = [n for n in range(1, 10**2) if isprime(factorial(n)-1)] # Chai Wah Wu, Apr 04 2021 CROSSREFS Cf. A002981 (numbers n such that n!+1 is prime). Cf. A055490 (primes of form n!-1). Cf. A088332 (primes of form n!+1). Cf. A000142, A001221, A001222, A046051, A054991, A112798, A325272. Sequence in context: A105133 A211384 A281828 * A290432 A276783 A288731 Adjacent sequences: A002979 A002980 A002981 * A002983 A002984 A002985 KEYWORD hard,more,nonn,nice AUTHOR N. J. A. Sloane EXTENSIONS 21480 sent in by Ken Davis (ken.davis(AT)softwareag.com), Oct 29 2001 Updated Feb 26 2007 by Max Alekseyev, based on progress reported in the Carmody web site. Inserted missing 21480 and 34790 (see Caldwell). Added 94550, discovered Oct 05 2010. Eric W. Weisstein, Oct 06 2010 103040 was discovered by James Winskill, Dec 14 2010. It has 471794 digits. Corrected by Jens Kruse Andersen, Mar 22 2011 a(26) = 147855 from Felix Fröhlich, Sep 02 2013 a(27) = 208003 from Sou Fukui, Jul 27 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 28 15:40 EDT 2023. Contains 363019 sequences. (Running on oeis4.)