login
Numbers k such that k! + 2^k + 11 or k! + 2^k - 11 is prime.
1

%I #21 Jul 25 2024 08:28:57

%S 0,2,3,4,5,6,7,9,15,34,41,79,99,379,2183

%N Numbers k such that k! + 2^k + 11 or k! + 2^k - 11 is prime.

%C Is there some k such that k! + 2^k + 11 and k! + 2^k - 11 are prime?

%C a(16) > 20000. - _Michael S. Branicky_, Jul 25 2024

%e For k = 0, k! + 2^k + 11 = 0! + 2^0 + 11 = 13, which is prime.

%e For k = 3, k! + 2^k - 11 = 3! + 2^3 - 11 = 3, which is prime.

%t Select[Range[0, 400], Or[PrimeQ[#! + 2^# + 11], PrimeQ[#! + 2^# - 11]] &] (* _Michael De Vlieger_, Nov 17 2015 *)

%t Select[Range[0,500],AnyTrue[#!+2^#+{11,-11},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 05 2019 *)

%o (PARI) for(n=0, 1e3, if(isprime(n!+2^n-11) || isprime(n!+2^n+11), print1(n", ")))

%o (PARI) is(n)=my(N=n!+2^n); ispseudoprime(N-11) || ispseudoprime(N+11) \\ _Charles R Greathouse IV_, Nov 17 2015

%Y Cf. A007611, A261714, A263469.

%K nonn,more

%O 1,2

%A _Altug Alkan_, Oct 19 2015

%E a(14) from _Charles R Greathouse IV_, Nov 17 2015

%E a(15) from _Michael S. Branicky_, Jun 17 2023