login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A201361 Numbers k such that (2^k - k + 1)*2^k - 1 is prime. 7

%I #17 Apr 09 2023 02:05:01

%S 1,2,3,8,14,35,75,83,89,90,215,342,753,1452,4578,10337,25580,26381

%N Numbers k such that (2^k - k + 1)*2^k - 1 is prime.

%e 3 is in the sequence because (2^3 - 3 + 1)*2^3 - 1 = 47 is prime.

%t lst={};Do[If[PrimeQ[(2^n - n+1)*2^n-1],AppendTo[lst,n]],{n,10000}];lst

%o (PARI) is(n)=ispseudoprime((2^n-n+1)<<n-1) \\ _Charles R Greathouse IV_, Feb 17 2017

%o (Python)

%o from sympy import isprime

%o def afind(limit, startk=1):

%o pow2 = 2**startk

%o for k in range(startk, limit+1):

%o if isprime((pow2 - k + 1)*pow2 - 1):

%o print(k, end=", ")

%o pow2 *= 2

%o afind(1500) # _Michael S. Branicky_, Jan 11 2022

%Y Cf. A201356, A201357, A201358, A201359, A201360, A201362, A201363.

%K nonn,hard,more

%O 1,2

%A _Michel Lagneau_, Nov 30 2011

%E a(16) from _Michael S. Branicky_, Jan 11 2022

%E a(17)-a(18) from _Michael S. Branicky_, Apr 07 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)