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.

A087147 Numbers k such that k! + (k+1)! + 1 is prime.

Original entry on oeis.org

0, 3, 7, 9, 67, 291, 1343, 6984, 12861
Offset: 1

Views

Author

Farideh Firoozbakht, Aug 19 2003

Keywords

Comments

291 is in the sequence and also is in the sequence A087146, thus (291!+292!-1,291!+292!+1) is a twin pair of primes. Any additional terms are greater than 1800 with the next prime having more than 5086 digits.
Next term is greater than 4200. - Gabriel Cunningham (gcasey(AT)mit.edu), Sep 09 2003
a(10) > 25000. - Robert Price, Aug 26 2015
k+1 is not prime because (p-1)! + p! + 1 == 0 mod p and (p-1)! + p! + 1 > p where p is prime. - Seiichi Manyama, Mar 22 2018

Examples

			3 is in the sequence because 3!+4!+1=31 is prime.
		

References

  • H. Dubner, Factorial and primorial primes, J. Rec. Math., 19 (No.3, 1987)

Crossrefs

Primes in A118913. [From Dmitry Kamenetsky, Oct 21 2008]

Programs

  • Mathematica
    v={}; Do[If[PrimeQ[n!+(n+1)!+1], v=Append[v, n]; Print[v]], {n, 1800}]; v
    Select[Range[0,25000],PrimeQ[#!+(#+1)!+1]&] (* Robert Price, Aug 26 2015 *)
  • PARI
    isok(k) = ispseudoprime(k!+(k+1)!+1); \\ Altug Alkan, Mar 22 2018

Extensions

a(8)-a(9) from Robert Price, Aug 26 2015

A125174 Primes of the form k! + (k+1)! - 1.

Original entry on oeis.org

2, 7, 29, 839, 3991679, 93405311999, 1394852659199, 6758061133823999, 315777214062132212662271999999, 9146650338351415815045119999999, 303916116658416027343136804044799999999, 836313165329095177704251551336018791628799999999
Offset: 1

Views

Author

Tomas Xordan, Jan 12 2007

Keywords

Comments

Next term is too long (167 digits) to include in data. - James C. McMahon, Dec 11 2024

Examples

			0!+1!-1 = 1 is not prime, 1!+2!-1 = 2 is prime, 2!+3!-1 = 7 is prime, 3!+4!-1 = 29 is prime, 4!+5!-1 = 143 = 11*13 is not prime.
		

Crossrefs

Cf. A087146 (values of k), A118913 (primes of the form k! + (k+1)! + 1).

Programs

  • Mathematica
    Select[Table[n!+(n+1)!-1,{n,110}],PrimeQ] (* James C. McMahon, Dec 11 2024 *)
  • PARI
    for(n=0,35,if(isprime(a=n!+(n+1)!-1),print1(a,",")))

Extensions

Edited and extended by Klaus Brockhaus, Jan 24 2007
a(12) from James C. McMahon, Dec 11 2024
Showing 1-2 of 2 results.