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-6 of 6 results.

A063499 Primes of the form prime(n) + n!.

Original entry on oeis.org

3, 5, 11, 31, 131, 733, 362903, 39916831, 355687428096059, 6402373705728061, 15511210043330985984000097, 8222838654177922817725562880000127, 815915283247897734345611269596115894272000000173
Offset: 1

Views

Author

Jason Earls, Jul 30 2001

Keywords

Comments

Subsequence of A121926. - Michel Marcus, Apr 05 2015

Crossrefs

Cf. A064278 (Numbers n such that n! + prime(n) is prime). [From Alexander R. Povolotsky, Aug 13 2008]

Programs

  • Magma
    [a: n in [1..50] | IsPrime(a) where a is NthPrime(n) + Factorial(n) ]; // Vincenzo Librandi, Apr 05 2015
  • Mathematica
    Select[Table[Prime[n] + n!, {n, 1, 60}], PrimeQ] (* Vincenzo Librandi, Apr 05 2015 *)
  • PARI
    for(n=1,70,x=prime(n)+n!; if(isprime(x),print(x)))
    
  • PARI
    { n=0; f=1; for (m=1, 10^9, f*=m; if (isprime(a=prime(m) + f), write("b063499.txt", n++, " ", a); if (n==18, break)) ) } \\ Harry J. Smith, Aug 24 2009
    

A143933 a(n) is the smallest prime x such that x^2-n! is also prime.

Original entry on oeis.org

2, 2, 3, 11, 19, 31, 79, 211, 607, 1931, 6337, 21961, 78919, 295291, 1143563, 4574149, 18859777, 80014843, 348776611, 1559776279, 7147792903, 33526120129, 160785623729, 787685471519, 3938427356629, 20082117944579, 104349745809137, 552166953567737
Offset: 1

Views

Author

Artur Jasinski, Sep 05 2008

Keywords

Comments

Every prime > 3 in this sequence is bigger than the n-th prime, see comment to A121926. For the smallest number x such that x^2-n! is prime see A143931. For the smallest prime numbers of the form x^2-n! see A143932.

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,t;
      t:= n!;
      p:= floor(sqrt(t));
      do
        p:= nextprime(p);
        if isprime(p^2-t) then return p fi
      od
    end proc:
    map(f, [$1..28]); # Robert Israel, Feb 10 2019
  • Mathematica
    f[n_] := Block[{p = NextPrime[ Sqrt[ n!]]}, While[ !PrimeQ[p^2 - n!], p = NextPrime@ p]; p]; Array[f, 27] (* Robert G. Wilson v, Jan 08 2015 *)
  • PARI
    a(n)=my(N=n!,x=sqrtint(N)+1); while(!isprime(x^2-N), x=nextprime(x+1)); x \\ Charles R Greathouse IV, Dec 09 2014

Extensions

Corrected by Charles R Greathouse IV, Dec 09 2014

A143931 a(n) is the smallest positive integer x such that x^2 - n! is prime.

Original entry on oeis.org

2, 2, 3, 11, 19, 31, 79, 209, 607, 1921, 6337, 21907, 78913, 295289, 1143539, 4574149, 18859733, 80014841, 348776611, 1559776279, 7147792823, 33526120127, 160785623627, 787685471389, 3938427356623, 20082117944263, 104349745809077
Offset: 1

Views

Author

Artur Jasinski, Sep 05 2008

Keywords

Comments

For the smallest positive prime numbers of the form x^2 - n! see A143932.
For primes x in this sequence see A143933.

Examples

			a(1)=2 because 2^2-1! = 3 is prime;
a(2)=2 because 2^2-2! = 2 is prime;
a(3)=3 because 3^2-3! = 3 is prime;
a(4)=11 because 11^2-4! = 97 is prime.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[k = Round[Sqrt[n! ]] + 1; While[ ! PrimeQ[k^2 - n! ], k++ ]; AppendTo[a, k], {n, 1, 50}]; a
    spi[n_]:=Module[{k=Ceiling[Sqrt[n!]],nf=n!},While[!PrimeQ[k^2-nf],k++];k]; Array[ spi,30] (* Harvey P. Dale, Feb 17 2023 *)

A143932 a(n) = smallest positive prime number of the form x^2 - n! (where x is a positive integer).

Original entry on oeis.org

3, 2, 3, 97, 241, 241, 1201, 3361, 5569, 61441, 240769, 915049, 240769, 17302321, 7076521, 49186201, 2100735289, 1074527281, 23971813321, 32354445841, 68820869329, 2992426816129, 26238323995129, 104071698229321
Offset: 1

Views

Author

Artur Jasinski, Sep 05 2008

Keywords

Comments

For smallest positive integers x see A143931. Prime x see A143933.

Examples

			a(1)=3 because 2^2 - 1! = 3;
a(2)=2 because 2^2 - 2! = 2;
a(3)=3 because 3^2 - 3! = 3;
a(4)=97 because 11^2 - 4! = 97.
		

Crossrefs

Programs

  • Mathematica
    b = {}; Do[k = Round[Sqrt[n! ]] + 1; While[ ! PrimeQ[k^2 - n! ], k++ ]; AppendTo[b, k^2-n! ], {n, 1, 50}]; b

A261809 a(n) = n! - prime(n).

Original entry on oeis.org

-1, -1, 1, 17, 109, 707, 5023, 40301, 362857, 3628771, 39916769, 479001563, 6227020759, 87178291157, 1307674367953, 20922789887947, 355687428095941, 6402373705727939, 121645100408831933, 2432902008176639929, 51090942171709439927, 1124000727777607679921
Offset: 1

Views

Author

Altug Alkan, Sep 01 2015

Keywords

Examples

			For n=4, a(4) = 4! - prime(4) = 24 - 7 = 17.
		

Crossrefs

Programs

  • Magma
    [Factorial(n)-NthPrime(n): n in [1..30]]; // Vincenzo Librandi, Sep 02 2015
  • Mathematica
    Table[n! - Prime[n], {n,1,150}] (* G. C. Greubel, Sep 01 2015 *)
  • PARI
    vector(50, n, n!-prime(n))
    

Formula

a(n) = A000142(n) - A000040(n).

A104079 Numbers of the form prime(n) + n! such that Gamma(n) + prime(n) is prime.

Original entry on oeis.org

3, 11, 31, 40339, 362903, 479001637, 8683317618811886495518194401280000137, 295232799039604140847618609643520000139
Offset: 1

Views

Author

Roger L. Bagula, Mar 03 2005

Keywords

Crossrefs

Cf. A121926.

Programs

  • Mathematica
    a = Delete[Union[Table[If[PrimeQ[ Gamma[n] + Prime[n]] == True, n! + Prime[n], 0], {n, 1, 100}]], 1]

Extensions

Definition corrected from Bruno Berselli, Jul 20 2012
Showing 1-6 of 6 results.