OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..680
EXAMPLE
MAPLE
f:= proc(n) local m, p;
p:= -1;
for m from n do
p:= p + 2^m;
if isprime(p) then return p fi
od
end proc:
map(f, [$0..30]); # Robert Israel, Jan 13 2020
MATHEMATICA
a[n_] := For[m = n+1, True, m++, If[PrimeQ[p = 2^m-2^n-1], Return[p]]];
a /@ Range[0, 28] (* Jean-François Alcover, Oct 25 2020 *)
PROG
(PARI) for(n=0, 28, for(m=n+1, oo, k=2^m-2^n-1; if(isprime(k), print1(k, ", "); break)))
(Magma) a:=[]; for n in [0..30] do m:=n+1; while not IsPrime(2^m-2^n-1) do m:=m+1; end while; Append(~a, 2^m-2^n-1); end for; a; // Marius A. Burtea, Jan 13 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jan 12 2020
STATUS
approved