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.

A096985 Numbers k such that k*k! - NextPrime(k) is prime.

Original entry on oeis.org

3, 5, 8, 10, 12, 13, 23, 26, 30, 33, 38, 114, 162, 219, 265, 268, 277, 344, 463, 651, 877, 1128, 2466, 2594, 4828, 6512
Offset: 1

Views

Author

Farideh Firoozbakht, Jul 31 2004

Keywords

Comments

For a(23), the corresponding value of k*k! - NextPrime(k) has more than 6239 digits.

Examples

			3 is in the sequence because 3*3! - 5 = 13 is prime.
8 is in the sequence because 8*8! - 11 = 322549 is prime.
		

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions`;v={};Do[If[PrimeQ [n*n!-NextPrime[n]], v=Append[v, n];Print[v]], {n, 2150}]
    Select[Range[900],PrimeQ[# #!-NextPrime[#]]&] (* The program generates the first 21 terms of the sequence. To select more, increase the Range constant but the program may take a long time to run. *) (* Harvey P. Dale, Aug 16 2023 *)

Extensions

a(23)-a(24) from Ryan Propper, Jan 01 2008
a(25)-a(26) from Michael S. Branicky, Aug 21 2023