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

%I #20 May 04 2023 03:17:12

%S 1,2,3,5,7,11,167,2609,6247,7841

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

%e 7! + 2^7 - 1 = 5167 is prime, therefore 7 is in the sequence.

%e 11! + 2^11 - 1 = 39918847 is prime, therefore 11 is in the sequence.

%e 2609! + 2^2609 - 1 = 4110644622026.....780469952511 (7783 digits) is prime, therefore 2609 is in the sequence.

%t lst={}; Do[If[PrimeQ[k!+2^k-1], AppendTo[lst, k]], {k, 3000}]; lst

%o (Magma) [ n: n in [0..167] | IsPrime(Factorial(n)+2^n-1) ]; // _Klaus Brockhaus_, Feb 22 2011

%o (PARI) is(n)=ispseudoprime(n!+2^n-1) \\ _Charles R Greathouse IV_, Jun 13 2017

%Y Cf. A186450.

%K nonn,more

%O 1,2

%A _Michel Lagneau_, Feb 22 2011

%E a(9)-a(10) from _Michael S. Branicky_, May 03 2023