login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k such that 2k-1 divides 2^k-1.
6

%I #32 Sep 04 2024 12:59:55

%S 1,2,8,128,228,648,1352,1908,3240,4608,5220,5976,11448,13160,13920,

%T 21528,22050,23760,23940,24840,30960,31284,31584,31968,32768,37224,

%U 46092,46512,47268,60480,65664,66528,78540,78600,81728,82800,84312,98406,102672,103968

%N Numbers k such that 2k-1 divides 2^k-1.

%C Subsequence of odd terms is given by A233415. - _Charles R Greathouse IV_, Dec 04 2013

%C Numbers 2k-1 form a subsequence of A187787. - _Max Alekseyev_, Sep 04 2024

%H Alois P. Heinz, <a href="/A081856/b081856.txt">Table of n, a(n) for n = 1..1000</a>

%p a:= proc(n) option remember; local k;

%p if n=1 then 1 else for k from 1+a(n-1)

%p while 2&^k mod(2*k-1)<>1 do od; k fi

%p end:

%p seq(a(n), n=1..40); # _Alois P. Heinz_, May 27 2016

%t 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 *)

%t Join[{1},Select[Range[110000],PowerMod[2,#,2*#-1]==1&]] (* _Harvey P. Dale_, Jan 19 2019 *)

%o (PARI) is(n)=Mod(2,2*n-1)^n==1 \\ _Charles R Greathouse IV_, Dec 04 2013

%Y Cf. A187787, A233415.

%K nonn

%O 1,2

%A _Benoit Cloitre_, Apr 11 2003

%E a(38)-a(40) from _Michel Marcus_, Dec 04 2013