|
|
A365639
|
|
Numbers k such that k! + k^3 + 1 is prime.
|
|
0
|
|
|
|
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
|
|
LINKS
|
|
|
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))])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|