OFFSET
1,1
COMMENTS
For a(23), the corresponding value of k*k! - NextPrime(k) has more than 6239 digits.
EXAMPLE
3 is in the sequence because 3*3! - 5 = 13 is prime.
8 is in the sequence because 8*8! - 11 = 322549 is prime.
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 *)
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Farideh Firoozbakht, Jul 31 2004
EXTENSIONS
a(23)-a(24) from Ryan Propper, Jan 01 2008
a(25)-a(26) from Michael S. Branicky, Aug 21 2023
STATUS
approved