login
Numbers n such that n!! - 2^7 is prime.
2

%I #15 Apr 03 2023 10:36:13

%S 11,13,21,47,59,77,109,129,155,163,245,337,511,1417,3013,3757,4989,

%T 8977,12479,12869

%N Numbers n such that n!! - 2^7 is prime.

%C a(21) > 50000. - _Robert Price_, May 11 2015

%C a(n) is odd. - _Chai Wah Wu_, May 12 2015

%H C. K. Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/page.php/MultifactorialPrime.html">multifactorial prime</a>

%H Joe McLean, <a href="http://web.archive.org/web/20091027034731/http://uk.geocities.com/nassarawa%40btinternet.com/probprim2.htm">Interesting Sources of Probable Primes</a>

%t Select[Range[0, 50000], #!! - 128 > 0 && PrimeQ[#!! - 128] &]

%o (PARI) is(n)=ispseudoprime(prod(i=0,(n-1)\2, n-2*i)-128) \\ _Charles R Greathouse IV_, May 11 2015

%o (Python)

%o from gmpy2 import is_prime, mpz

%o A257864_list, g, h = [], mpz(105), mpz(128)

%o for i in range(9,10**5,2):

%o ....g *= i

%o ....if is_prime(g-h):

%o ........A257864_list.append(i) # _Chai Wah Wu_, May 12 2015

%o (Perl)

%o use ntheory ":all"; use Math::GMPz;

%o sub mf2 { my($n,$P)=(shift,Math::GMPz->new(1)); $P *= $n-($_<<1) for 0..($n-1)>>1; $P; }

%o for (1..100000) { say if is_prob_prime(mf2($_)-128) } # _Dana Jacobsen_, May 13 2015

%Y Cf. A007749, A094144, A123910 (other forms of n!!-2^k)

%Y Cf. A080778, A076185, A076186, A076188, A076189, A076190, A076193, A076194, A076195, A076196, A076197 (other forms of n!!+2^k)

%K nonn,hard,more

%O 1,1

%A _Robert Price_, May 11 2015