login
Primes of the form 2^x + 2^y - 1.
1

%I #18 Jun 10 2018 18:02:48

%S 2,3,5,7,11,17,19,23,31,47,67,71,79,127,131,191,257,263,271,383,1031,

%T 1039,1087,1151,1279,2063,2111,4099,4111,4127,4159,5119,6143,8191,

%U 8447,16447,20479,32771,32783,32831,33023,33791,65537

%N Primes of the form 2^x + 2^y - 1.

%H Ivan Neretin, <a href="/A188713/b188713.txt">Table of n, a(n) for n = 1..1000</a>

%e 2^2 + 2^2 - 1 = 7;

%e 2^2 + 2^3 - 1 = 11.

%t f[x_, y_] := 2^x + 2^y - 1; imax = 20; lst= {}; Do[p = f[x, y]; If[p < 2^imax && PrimeQ[p], AppendTo[lst, p]], {y, 0, imax}, {x, 0, y}]; lst (* Orlovski *)

%t nn=20; Select[Flatten[Table[2^x + 2^y - 1, {x, 0, nn}, {y, 0, x}]], #<2^nn && PrimeQ[#]&] (* _Alonso del Arte_, Apr 09 2011 *)

%Y Cf. A070739.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Apr 08 2011