cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A256594 Numbers k such that k!*2^k + 1 is prime.

This page as a plain text file.
%I A256594 #28 Sep 08 2022 08:46:11
%S A256594 0,1,259,16708,18655,26304,61999,110251
%N A256594 Numbers k such that k!*2^k + 1 is prime.
%F A256594 a(n) = A080778(n+1)/2 for n >= 2. - _Amiram Eldar_, Dec 06 2018
%e A256594 0 is in the sequence since 0!*2^0 + 1 = 2 is prime.
%t A256594 Select[Range[0, 20000], PrimeQ[2^#*#! + 1] &]
%o A256594 (Magma) [n: n in [0..3*10^2] | IsPrime(Factorial(n)*2^n+1)]; // _Vincenzo Librandi_, Apr 05 2015
%o A256594 (PARI) for(n=0,300,if(ispseudoprime(n!*2^n+1),print1(n,", "))) \\ _Derek Orr_, Apr 05 2015
%o A256594 (Python)
%o A256594 from sympy import factorial, isprime
%o A256594 for n in range(0,300):
%o A256594     if isprime(factorial(n)*(2**n)+1):
%o A256594         print(n, end=', ') # _Stefano Spezia_, Dec 06 2018
%Y A256594 Cf. A007749, A080778, A117141, A091415.
%K A256594 nonn,hard,more
%O A256594 1,3
%A A256594 _Robert Price_, Apr 03 2015
%E A256594 a(6)-a(8), from the data at A080778, added by _Amiram Eldar_, Dec 06 2018