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

A093437 a(n) = largest prime of the form n!/k! + 1.

Original entry on oeis.org

2, 2, 3, 7, 13, 61, 31, 2521, 20161, 15121, 604801, 39916801, 3991681, 3113510401, 14529715201, 54486432001, 10461394944001, 59281238016001, 53353114214401, 2, 670442572801, 8515157028618240001, 9366672731480064001
Offset: 0

Views

Author

Amarnath Murthy, Apr 01 2004

Keywords

Comments

Is 19 the largest n such that a(n) = 2? There are none for 19 < n <= 600. - Robert Israel, Jan 16 2017

Examples

			a(7) = 2521 because 7!/2! + 1 = 2521 is prime, whereas 7!/1! + 1 = 5041 = 71^2 is composite;
a(19) = 2 because the only prime of the form 19!/k! + 1 is 19!/19! + 1 = 2.
		

Crossrefs

Cf. A093621 (smallest k > 0 such that n!/k! + 1 is prime), A002981 (n! + 1 is prime), A088332 (primes of form n! + 1).

Programs

  • Maple
    f:= proc(n) local k,x;
      x:= n!;
      for k from 2 do
        if isprime(x+1) then return x+1 fi;
        x:= x/k;
      od
    end proc:
    map(f, [$0..40]); # Robert Israel, Jan 16 2017
  • Mathematica
    a[n_] := Module[{k, x}, x = n!; For[k = 2, True, k++, If[PrimeQ[x+1], Return[x+1]]; x = x/k]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 08 2023, after Robert Israel *)

Extensions

Corrected and extended by Hugo Pfoertner, Apr 06 2004

A093623 Smallest k>0 such that n!/k!-1 is prime.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 2, 6, 3, 1, 8, 1, 4, 3, 3, 3, 5, 3, 15, 13, 13, 10, 8, 4, 5, 12, 14, 1, 2, 1, 1, 5, 13, 11, 11, 1, 25, 4, 2, 32, 3, 4, 15, 9, 10, 34, 16, 3, 5, 23, 13, 30, 3, 13, 7, 34, 3, 21, 22, 9, 10, 15, 7, 26, 51, 42, 18, 6, 6, 31, 23, 31, 51, 12, 20, 8, 24, 50, 40, 4, 30, 49, 36, 4, 23
Offset: 3

Views

Author

Hugo Pfoertner, Apr 06 2004

Keywords

Comments

a(A002982(n)) = 1. The existence of a solution has been checked up to n=500.
The results were computed using the PrimeFormGW (PFGW) primality-testing program. - Hugo Pfoertner, Nov 14 2019

Examples

			a(10) = 6 because 10!/6! - 1 = 5039 is prime, whereas 10!/k! - 1 is composite for k = 1..5.
		

Crossrefs

Cf. A093622 largest prime of the form n!/k!-1, A002982 n!-1 is prime, A093621 smallest k>0 such that n!/k!+1 is prime.

Extensions

a(53) corrected by Gionata Neri, Jul 18 2017
Showing 1-2 of 2 results.