%I #18 Oct 06 2023 09:12:05
%S 0,3,5,17,24,314,15783
%N Numbers k such that k! + k^2 + k + 1 is prime.
%C a(8) > 17548. - _J.W.L. (Jan) Eerland_, Oct 06 2023
%e 0!+0^2+0+1 = 1+1 = 2 which is prime, so a(1) = 0.
%e 1!+1^2+1+1 = 1+1+1+1 = 4, which is not prime.
%e 2!+2^2+2+1 = 2+4+2+1 = 8, which is not prime.
%e 3!+3^2+3+1 = 6+9+3+1 = 19, which is prime, so a(2)=3.
%t For[i = 0, i < 1000, If[PrimeQ[Factorial[i] + i^2 + i + 1] == True, Print[i]]; i++ ]
%t n=0;Monitor[Parallelize[While[True,If[PrimeQ[Factorial[n]+n^2+n+1],Print[n]];n++];n],n] (* _J.W.L. (Jan) Eerland_, Oct 06 2023 *)
%K nonn,more
%O 1,2
%A _Neil Fernandez_, Jan 22 2003
%E a(7) from _J.W.L. (Jan) Eerland_, Oct 06 2023
|