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

A092970 Smallest prime of the form n!/k + 1. k < = n, or 0 if no such prime exists.

Original entry on oeis.org

2, 2, 3, 7, 31, 181, 1009, 13441, 45361, 453601, 3991681, 39916801, 566092801, 10897286401, 130767436801, 2988969984001, 25406244864001, 0, 8109673360588801, 304112751022080001, 2688996956405760001
Offset: 1

Views

Author

Amarnath Murthy, Mar 26 2004

Keywords

Examples

			a(10) = 453601 = 10!/8 + 1, as 10!/10 + 1 and 10!/9 + 1 are both composite.
		

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Reverse[n!/Range[n]+1],PrimeQ],{n,30}]/.(Missing[ "NotFound"] -> 0) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 15 2019 *)
  • PARI
    a(n)=for (i=1,n,if(isprime(n!/(n-i+1)+1),return((n!/(n-i+1)+1))))

Extensions

Corrected and extended by Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 26 2004

A093520 Numbers n such that there exists no k with 0 < k < n for which n!/k + 1 is a prime.

Original entry on oeis.org

1, 18, 51, 53, 84, 95, 100, 104, 106, 143, 178, 180, 181, 188, 202, 203, 211, 214, 217, 222, 227, 232, 237, 239, 244, 250, 258, 272, 281, 284, 300, 303, 313, 315, 317, 323, 326, 342, 358, 364, 370, 374, 386, 387, 396, 401, 409, 413, 422, 423, 429, 438, 440
Offset: 1

Views

Author

Robert G. Wilson v, Mar 29 2004

Keywords

Comments

Essentially the same as A092068. - R. J. Mathar, Sep 05 2008

Crossrefs

Cf. A092969.

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[n!/k + 1], k++ ]; If[k < n, n!/k + 1, 0]]; Do[ If[ f[n] == 0, Print[n]], {n, 440}]
    Join[{1},Select[Range[500],NoneTrue[#!/Range[#]+1,PrimeQ]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 14 2018 *)

A206762 a(n) is the least number from 1,2,...,n-1, such that n!/a(n)+1 is prime, and a(n)=0, if such number does not exist.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 2, 5, 6, 1, 8, 2, 5, 7, 2, 3, 0, 5, 8, 4, 16, 3, 8, 4, 10, 1, 13, 8, 2, 19, 4, 11, 11, 7, 3, 1, 12, 13, 4, 1, 24, 2, 8, 5, 9, 25, 16, 2, 12, 0, 26, 0, 17, 22, 44, 22, 37, 7, 48, 4, 37, 18, 7, 39, 16, 19, 7, 15, 19, 36, 30, 1, 14, 15, 16, 1
Offset: 2

Views

Author

Vladimir Shevelev, Feb 12 2012

Keywords

Comments

The sequence of primes n!/a(n)+1, when a(n)>0, is increasing.

Crossrefs

Programs

  • Mathematica
    Table[s = Select[Range[n - 1], PrimeQ[n!/# + 1] &, 1]; If[s == {}, 0, s[[1]]], {n, 2, 100}] (* T. D. Noe, Feb 13 2012 *)
Showing 1-3 of 3 results.