OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
MAPLE
b:= proc(n) option remember; is(n=2^ilog2(n)) end:
a:= proc(n) option remember; local p; p:= `if`(n=1, 1, a(n-1));
do p:= nextprime(p);
if andmap(b, map(i-> i[2]+1, ifactors(p+1)[2])) then break fi
od; p
end:
seq(a(n), n=1..55); # Alois P. Heinz, Sep 05 2019
MATHEMATICA
okQ[p_] := PrimeQ[p] && IntegerQ[Log[2, DivisorSigma[0, p+1]]];
Select[Prime[Range[200]], okQ] (* Jean-François Alcover, May 20 2020 *)
PROG
(PARI) isok(p) = isprime(p) && (nd = numdiv(p+1)) && (nd == 2^valuation(nd, 2)); \\ Michel Marcus, Sep 05 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 14 2009
EXTENSIONS
Extended by R. J. Mathar, Sep 20 2009
STATUS
approved