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

A073308 Numbers k such that k! + k + 1 is prime.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 52, 6822, 30838
Offset: 1

Views

Author

Rick L. Shepherd, Jul 24 2002

Keywords

Comments

Clearly, for k>2, k != 2 (mod 3).
Often m! + 2, m! + 3, ..., m! + m is cited as a constructed sequence of m-1 consecutive composite numbers.
Except for 0, k+1 is prime. - Robert Israel, Jan 13 2015

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 52, p. 20, Ellipses, Paris 2008.

Crossrefs

Cf. A073309 (corresponding primes), A002981 (n!+1 is prime), A073443 (n!-n-1 is prime), A092791.

Programs

  • Mathematica
    f[n_]:=n!+n+1; lst={};Do[p=f[n];If[PrimeQ[p],AppendTo[lst,n]],{n,0,2*5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 02 2009 *)
  • PARI
    for(n=0,1960,if(isprime(n!+n+1),print1(n,",")))

Formula

a(n) = A092791(n) - 1. - Seiichi Manyama, Mar 19 2018

Extensions

a(8) from T. D. Noe, Jan 18 2008
a(9) from Seiichi Manyama (by using the data calculated by Giovanni Resta, May 04 2013), Mar 19 2018

A073444 Primes of the form n! - n - 1.

Original entry on oeis.org

2, 19, 3628789, 479001587
Offset: 1

Views

Author

Rick L. Shepherd, Jul 31 2002

Keywords

Comments

a(5), a 730-digit number, has been certified prime with Primo.

Examples

			a(1) = 4! - 4 - 1 = 19, a prime, so 19 is in this sequence (4 = A073443(1)).
		

Crossrefs

Cf. A073443 (corresponding n).

Programs

  • PARI
    for(n=3,2000, p=n!-n-1; if(isprime(p),print1(p,",")))

Formula

a(k) = A073443(k)! - A073443(k) - 1.

A301427 Least nonnegative integer k such that n! - n - k is prime.

Original entry on oeis.org

0, 1, 2, 5, 10, 23, 4, 1, 2, 1, 10, 3, 32, 37, 42, 23, 82, 11, 10, 51, 66, 49, 124, 11, 16, 73, 2, 49, 30, 131, 14, 159, 78, 91, 60, 41, 34, 43, 90, 37, 66, 65, 8, 43, 32, 55, 10, 47, 128, 15, 6, 73, 6, 405, 220, 51, 78, 79, 10, 9, 38, 295, 62, 251, 124, 183, 34, 27, 680, 91, 300
Offset: 3

Views

Author

Seiichi Manyama, Mar 21 2018

Keywords

Comments

The (n-1) consecutive numbers n!-n, ... , n!-2 (for n > 3) are not prime.

Examples

			a(3)=0 because 3! - 3 - 0 =   3 is prime.
a(4)=1 because 4! - 4 - 1 =  19 is prime and 20 is not.
a(5)=2 because 5! - 5 - 2 = 113 is prime and 114 and 115 are not prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local r; r:= n!-n;
      r - prevprime(r)
    end proc:
    f(3):= 0:
    seq(f(i),i=3..100); # Robert Israel, Mar 23 2018
  • Mathematica
    a[n_] := n! - NextPrime[n! - 1, -1] - n;
    a /@ Range[3, 100] (* Jean-François Alcover, Oct 26 2020 *)
  • PARI
    a(n) = apply(x->(x-precprime(x)), n!-n);
    vector(99, n, a(n+2)) \\ Altug Alkan, Mar 21 2018

Formula

a(n) = A037155(n) - n.

A365074 Numbers k such that k! - k^2 - 1 is prime.

Original entry on oeis.org

4, 6, 14, 126, 184, 634, 1354, 1550, 6710
Offset: 1

Views

Author

Darío Clavijo, Sep 12 2023

Keywords

Crossrefs

Cf. A073443.

Programs

  • Mathematica
    Select[Range[4, 1600, 2], PrimeQ[#! - #^2 - 1] &] (* Amiram Eldar, Sep 12 2023 *)
  • Python
    from gmpy2 import *
    print([k for k in range(0,2000) if is_prime((fac(k)- k*k - 1))])

Extensions

a(9) from Michael S. Branicky, Sep 14 2023
Showing 1-4 of 4 results.