OFFSET
1,1
COMMENTS
Number of terms < 10^k: 1, 2, 6, 9, 17, 38, 91, 222, ..., .
LINKS
Robert Israel, Table of n, a(n) for n = 1..518
EXAMPLE
6 is a term because 6=2*3 and 2^2-1 (mod 3)=0;
21 is a term because 21=3*7 and 2^3-1 (mod 7)=0;
155 is a term because 155=5*31 and 2^5-1 (mod 31)=0;
253 is a term because 253=11*23 and 2^11-1 (mod 23)=0;
889 is a term because 889=7*127 and 2^7-1 (mod 127)=0;
979 is a term because 979=11*89 and 2^11-1 (mod 89)=0; etc.
MAPLE
N:= 10^6: # to get all terms <= N
Q:= ceil(fsolve(q*log[2](q)=N));
Res:= NULL:
q:= 2:
do
q:= nextprime(q);
if q > Q then break fi;
p:= numtheory:-order(2, q);
if not isprime(p) then next fi;
v:= p*q;
if v <= N then Res:= Res, v fi
od:
sort([Res]); # Robert Israel, Nov 23 2019
MATHEMATICA
fQ[n_] := Block[{fi = FactorInteger@ n}, Plus @@ Last /@ fi == 2 && PowerMod[2, fi[[1, 1]], fi[[2, 1]]] == 1]; Select[ Range@ 1000000, fQ] (* Robert G. Wilson v, Jan 10 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jan 10 2011
EXTENSIONS
Corrected, extended & edited by Robert G. Wilson v, Jan 10 2011
STATUS
approved