cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 14 results. Next

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

Views

Author

Keywords

Comments

The corresponding primes n!-1 are often called factorial primes.

Examples

			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)
		

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).
  • 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.

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).

Programs

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

A104364 Primes of the form A104350(k) - 1.

Original entry on oeis.org

5, 11, 59, 179, 1259, 7559, 37799, 415799, 1135133999, 5499724229999, 29220034833989999, 1408101540804746673385499999, 43673268652925265723884051023987499999
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Crossrefs

Intersection of A104357 and A000040.

Programs

  • Mathematica
    Select[FoldList[Times, Array[FactorInteger[#][[-1, 1]] &, 100]] - 1, PrimeQ] (* Amiram Eldar, Apr 08 2024 *)
  • PARI
    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

Views

Author

Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Nov 02 2003

Keywords

Comments

Conjecture: 3 is the intersection of A002981 and A002982.

Examples

			3! + 1 = 7; 7! - 1 = 5039.
39916801 is a term because 11! + 1 is prime.
		

Crossrefs

Union of A055490 and A088332.

Programs

  • Mathematica
    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 *)
  • Python
    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

Extensions

Corrected by Paul Muljadi, Oct 11 2005
More terms from Robert G. Wilson v and T. D. Noe, Oct 12 2005

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

Views

Author

Peter Luschny, Jul 21 2009

Keywords

Examples

			Since 4$ = 6 the prime 5 is listed.
		

Crossrefs

Cf. A055490, A056040, A163078 (arguments k), A163074, A163075.

Programs

  • Maple
    a := proc(n) select(isprime, map(x -> A056040(x)-1,[$1..n])); sort(%) end:
  • Mathematica
    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 *)

Extensions

More terms from Jinyuan Wang, Mar 22 2020

A062701 Index of factorial primes of the form k! + 1.

Original entry on oeis.org

1, 2, 4, 2428957
Offset: 1

Views

Author

Labos Elemer, Jul 11 2001

Keywords

Examples

			The exact subscript of the 5th prime [1 + 27! = 10888869450418352160768000001] is not yet available.
		

Crossrefs

Formula

a(n) = PrimePi(A002981(n)!+1).

Extensions

Offset 1 from Michel Marcus, Aug 29 2019

A062702 Index of factorial primes of form m!-1.

Original entry on oeis.org

3, 9, 128, 675, 25306287, 3610490805
Offset: 1

Views

Author

Labos Elemer, Jul 11 2001

Keywords

Examples

			The exact subscript of 7th prime [=30!-1=265252859812191058636308479999999] is not yet available.
		

Crossrefs

Formula

a(n) = PrimePi(A002982(n)!-1) = A000720(A055490(n)).

Extensions

Offset 1 from Michel Marcus, Aug 29 2019

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

Views

Author

Hugo Pfoertner, Apr 06 2004

Keywords

Examples

			a(5) =59 because 5!/1!-1=119=7*17 is composite, whereas 5!/2!-1=59 is prime.
		

Crossrefs

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

Views

Author

K. D. Bajpai, Dec 03 2013

Keywords

Comments

The 5th term a(5) has 268 digits and is too long to display in data section.
The 7th term a(7) in the sequence has 823 digits.
a(8) has 2030 digits; a(9) has 2264 digits (these are not included in b-file).

Examples

			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.
		

Crossrefs

Cf. A055490 (primes: n! -1).
Cf. A118812 (primes: (2*n)!-n!+1).

Programs

  • Maple
    KD := proc() local a; a:=(2*n)!-n!^2-1; if isprime(a) then RETURN (a);  fi; end: seq(KD(), n=1..200);

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

Views

Author

Arsen Vardanyan, Jul 31 2024

Keywords

Comments

a(18) > 15000 - Karl-Heinz Hofmann, Aug 23 2024

Examples

			4 is a term, because 4!^2 + 3!^2 + 1 = 576 + 36 + 1 = 613 is a prime number.
		

Crossrefs

Programs

  • PARI
    is(k) = isprime((k!^2)+((k-1)!)^2+1);
    
  • Python
    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

Extensions

a(12)-a(14) from Michael S. Branicky, Aug 01 2024
a(15)-a(17) from Karl-Heinz Hofmann, Aug 23 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

Views

Author

Keywords

Comments

The next term has 611 digits. - Harvey P. Dale, Apr 15 2018

Examples

			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
		

Crossrefs

Cf. A055490.

Programs

  • Maple
    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);
  • Mathematica
    Select[Table[Mod[n!,n!!+1]/2,{n,200}],PrimeQ] (* Harvey P. Dale, Apr 15 2018 *)
Showing 1-10 of 14 results. Next