login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A365639
Numbers k such that k! + k^3 + 1 is prime.
0
0, 1, 2, 4, 6, 16, 28, 42
OFFSET
1,3
COMMENTS
If k is a term then k+1 is not composite (since k! + k^3 + 1 is divisible by k+1 for a composite k > 4). - Amiram Eldar, Sep 14 2023
Any further terms exceed 50000. - Lucas A. Brown, Mar 05 2024
MATHEMATICA
Select[Range[0, 50], ! CompositeQ[# + 1] && PrimeQ[#! + #^3 + 1] &] (* Amiram Eldar, Sep 14 2023 *)
PROG
(Python)
from sympy import isprime, factorial
print([k for k in range(0, 43) if isprime((factorial(k)+ k**3 + 1))])
KEYWORD
nonn,hard,more
AUTHOR
Darío Clavijo, Sep 14 2023
STATUS
approved