OFFSET
1,2
COMMENTS
Sequence is infinite and all terms are squares. Square roots of terms are 1, 2, 4, 6, 12, 18, 20, 24, 27, 28, 30, 42, 44, 48, 50, 52, 54, 60, 66, 68, 72, 76, 78, 84, 90, 92, 98, 100, 102, 108, 114, 116, 120, 124, 126, 128, 132, 138, 144, ...
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
MAPLE
a:= proc(n) option remember; local k;
for k from 1+`if`(n=1, 0, a(n-1))
while 0<>2&^k-1 mod numtheory[tau](k) do od; k
end:
seq(a(n), n=1..50); # Alois P. Heinz, Nov 06 2016
MATHEMATICA
Select[Range[10^5], Divisible[2^# - 1, DivisorSigma[0, #]] &] (* Michael De Vlieger, Oct 10 2016 *)
PROG
(PARI) is(n) = (2^n-1) % numdiv(n) == 0;
(PARI) is(n)=Mod(2, numdiv(n))^n==1; \\ Joerg Arndt, Oct 09 2016
(Python)
from sympy import divisor_count
A277285_list = [1] + [j for j in (i**2 for i in range(1, 10**4)) if pow(2, j, int(divisor_count(j))) == 1] # Chai Wah Wu, Nov 06 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved