A002982
Numbers k such that k! - 1 is prime.
Original entry on oeis.org
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
Offset: 1
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)
- 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).
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 118.
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 719 at p. 160.
- 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.
- Shyam Sunder Gupta, Fascinating Factorials, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 16, 411-442.
- R. K. Guy and 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.
- Robert G. Wilson v, Letter to N. J. A. Sloane, Jan. 1989.
- Index entries for sequences related to factorial numbers.
Cf.
A002981 (numbers n such that n!+1 is prime).
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
Original entry on oeis.org
5, 11, 59, 179, 1259, 7559, 37799, 415799, 1135133999, 5499724229999, 29220034833989999, 1408101540804746673385499999, 43673268652925265723884051023987499999
Offset: 1
-
Select[FoldList[Times, Array[FactorInteger[#][[-1, 1]] &, 100]] - 1, PrimeQ] (* Amiram Eldar, Apr 08 2024 *)
-
gpf(n) = {my(p = factor(n)[, 1]); if(n == 1, 1, p[#p]);}
lista(nmax) = {my(r = 1); for(k = 1, nmax, r * = gpf(k); if(isprime(r-1), print1(r-1, ", ")));} \\ Amiram Eldar, Apr 08 2024
A088054
Factorial primes: primes which are within 1 of a factorial number.
Original entry on oeis.org
2, 3, 5, 7, 23, 719, 5039, 39916801, 479001599, 87178291199, 10888869450418352160768000001, 265252859812191058636308479999999, 263130836933693530167218012159999999, 8683317618811886495518194401279999999
Offset: 1
Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Nov 02 2003
3! + 1 = 7; 7! - 1 = 5039.
39916801 is a term because 11! + 1 is prime.
- Chai Wah Wu, Table of n, a(n) for n = 1..29
- C. Caldwell's The Top Twenty, Factorial Primes.
- Shyam Sunder Gupta, Fascinating Factorials, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 16, 411-442.
- Romeo Meštrović, 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-2018. - From _N. J. A. Sloane_, Jun 13 2012
- Wikipedia, Factorial prime.
-
t = {}; Do[ If[PrimeQ[n! - 1], AppendTo[t, n! - 1]]; If[PrimeQ[n! + 1], AppendTo[t, n! + 1]], {n, 50}]; t (* Robert G. Wilson v *)
Union[Select[Range[50]!-1, PrimeQ], Select[Range[50]!+1, PrimeQ]] (Noe)
fp[n_] := Module[{nf=n!}, Select[{nf-1,nf+1},PrimeQ]]; Flatten[ Table[ fp[i],{i,50}]] (* Harvey P. Dale, Dec 18 2010 *)
Select[Flatten[#+{-1,1}&/@(Range[50]!)],PrimeQ] (* Harvey P. Dale, Apr 08 2019 *)
-
from itertools import count, islice
from sympy import isprime
def A088054_gen(): # generator of terms
f = 1
for k in count(1):
f *= k
if isprime(f-1):
yield f-1
if isprime(f+1):
yield f+1
A088054_list = list(islice(A088054_gen(),10)) # Chai Wah Wu, Feb 18 2022
A163076
Primes of the form k$ - 1. Here '$' denotes the swinging factorial function (A056040).
Original entry on oeis.org
5, 19, 29, 139, 251, 12011, 48619, 51479, 155117519, 81676217699, 1378465288199, 5651707681619, 386971244197199, 1580132580471899, 30067266499541039, 6637553085023755473070799, 35257120210449712895193719, 399608854866744452032002440111
Offset: 1
Since 4$ = 6 the prime 5 is listed.
-
a := proc(n) select(isprime, map(x -> A056040(x)-1,[$1..n])); sort(%) end:
-
Reap[Do[f = n!/Quotient[n, 2]!^2; If[PrimeQ[p = f - 1], Sow[p]], {n, 1, 70}]][[2, 1]] // Union (* Jean-François Alcover, Jun 28 2013 *)
A062701
Index of factorial primes of the form k! + 1.
Original entry on oeis.org
1, 2, 4, 2428957
Offset: 1
The exact subscript of the 5th prime [1 + 27! = 10888869450418352160768000001] is not yet available.
A062702
Index of factorial primes of form m!-1.
Original entry on oeis.org
3, 9, 128, 675, 25306287, 3610490805
Offset: 1
The exact subscript of 7th prime [=30!-1=265252859812191058636308479999999] is not yet available.
A093622
Largest prime of the form n!/k!-1.
Original entry on oeis.org
5, 23, 59, 719, 5039, 6719, 181439, 5039, 6652799, 479001599, 154439, 87178291199, 54486431999, 3487131647999, 59281238015999, 1067062284287999, 1013709170073599, 405483668029439999, 39070079, 180503769599
Offset: 3
a(5) =59 because 5!/1!-1=119=7*17 is composite, whereas 5!/2!-1=59 is prime.
Cf.
A093623 smallest k>0 such that n!/k!-1 is prime,
A055490 primes of form n!-1,
A093437 largest prime of the form n!/k!+1.
A233011
Primes of the form (2*n)! - n!^2 - 1.
Original entry on oeis.org
19, 683, 478483199, 20921164185599
Offset: 1
a(1)= 19: n= 2: (2*n)!- n!^2-1= 19 which is prime.
a(2)= 683: n= 3: (2*n)!- n!^2-1= 683 which is prime.
A374901
Numbers k such that k!^2 + ((k - 1)!^2) + 1 is prime.
Original entry on oeis.org
1, 3, 4, 6, 10, 11, 118, 271, 288, 441, 457, 2931, 5527, 6984, 9998, 10395, 13703
Offset: 1
4 is a term, because 4!^2 + 3!^2 + 1 = 576 + 36 + 1 = 613 is a prime number.
-
is(k) = isprime((k!^2)+((k-1)!)^2+1);
-
from itertools import count, islice
from sympy import isprime
def A374901_gen(): # generator of terms
f = 1
for k in count(1):
if isprime((k**2+1)*f+1):
yield k
f *= k**2
A374901_list = list(islice(A374901_gen(),10)) # Chai Wah Wu, Oct 02 2024
A126782
Primes of the form [n! mod (n!!+1)]/2, with n>=1.
Original entry on oeis.org
3, 17, 29, 281, 254993, 690953, 607435538171963, 192133794380608031505991200873083839505054136751452696277424837839455632569607117048950195313
Offset: 1
n=6 n!=720 n!!=48 [n! mod (n!!+1)]/2 = (720 mod 49)/2 = 34/2 = 17
n=7 n!=5040 n!!=105 [n! mod (n!!+1)]/2 = (5040 mod 106)/2 = 58/2 = 29
-
P:=proc(n) local i,j,k,w; for i from 2 by 1 to n do k:=i; w:=i-2; while w>0 do k:=k*w; w:=w-2; od; j:=(i! mod (k+1))/2; if isprime(j) then print(j); fi; od; end: P(1000);
-
Select[Table[Mod[n!,n!!+1]/2,{n,200}],PrimeQ] (* Harvey P. Dale, Apr 15 2018 *)
Showing 1-10 of 14 results.
Comments