OFFSET
1,2
COMMENTS
Subsequence of odd terms is given by A233415. - Charles R Greathouse IV, Dec 04 2013
Numbers 2k-1 form a subsequence of A187787. - Max Alekseyev, Sep 04 2024
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
MAPLE
a:= proc(n) option remember; local k;
if n=1 then 1 else for k from 1+a(n-1)
while 2&^k mod(2*k-1)<>1 do od; k fi
end:
seq(a(n), n=1..40); # Alois P. Heinz, May 27 2016
MATHEMATICA
terms = 100; Reap[For[n=1; k=1, k <= terms, n++, If[Divisible[2^n-1, 2n-1], Print[k, " ", n]; Sow[n]; k++]]][[2, 1]] (* Jean-François Alcover, Apr 06 2017 *)
Join[{1}, Select[Range[110000], PowerMod[2, #, 2*#-1]==1&]] (* Harvey P. Dale, Jan 19 2019 *)
PROG
(PARI) is(n)=Mod(2, 2*n-1)^n==1 \\ Charles R Greathouse IV, Dec 04 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 11 2003
EXTENSIONS
a(38)-a(40) from Michel Marcus, Dec 04 2013
STATUS
approved