OFFSET
1,2
COMMENTS
From Robert Israel, Dec 08 2016: (Start)
2^k is in the sequence if and only if k+1 is a power of 2.
If k and m are in the sequence with gcd(k,m) = 1 and gcd(sigma(k),sigma(m)) = 1, then k*m is in the sequence. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..1143
EXAMPLE
8 is a term because sigma(8) = 15 divides 2^8 - 1.
MAPLE
N:= 10^7: # to get all terms <= N
cands:= [seq(x^2, x=1..floor(sqrt(N))), seq(2*x^2, x=1..floor(sqrt(N/2)))]:
sort(select(n -> 2 &^n -1 mod numtheory:-sigma(n) = 0, cands)); # Robert Israel, Dec 08 2016
MATHEMATICA
{1}~Join~Select[Range[5*10^5], Mod[2^#, DivisorSigma[1, #]] == 1 &] (* Michael De Vlieger, Dec 10 2016 *)
Join[{1}, Select[Range[450000], PowerMod[2, #, DivisorSigma[1, #]]==1&]] (* Harvey P. Dale, May 14 2019 *)
PROG
(PARI) is(n)=Mod(2, sigma(n))^n==1;
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Dec 06 2016, following a suggestion from Michel Marcus
STATUS
approved