Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #19 Nov 20 2020 05:35:01
%S 3,7,5,31,9,127,17,73,33,2047,65,8191,129,1057,257,131071,513,524287,
%T 1025,16513,2049,8388607,4097,1082401,8193,262657,16385,536870911,
%U 32769,2147483647,65537,4196353,131073,270549121,262145,137438953471,524289
%N If b(n) = the largest proper divisor of n, then a(n) = (2^n - 1)/(2^b(n) - 1).
%H Alois P. Heinz, <a href="/A161818/b161818.txt">Table of n, a(n) for n = 2..1000</a>
%e a(6) = (2^6 - 1)/(2^3 - 1) = 63/7 = 9. - _Emeric Deutsch_, Jun 26 2009
%p with(numtheory): a := proc (n) options operator, arrow: (2^n-1)/(2^divisors(n)[tau(n)-1]-1) end proc: seq(a(n), n = 2 .. 40); # _Emeric Deutsch_, Jun 26 2009
%t b[n_] := Divisors[n][[-2]];
%t a[n_] := (2^n - 1)/(2^b[n] - 1);
%t a /@ Range[2, 40] (* _Jean-François Alcover_, Nov 20 2020 *)
%o (PARI) a(n) = my(d=divisors(n)); (2^n-1)/(2^d[#d-1]-1); \\ _Michel Marcus_, Nov 20 2020
%Y Cf. A032742.
%K nonn
%O 2,1
%A _Leroy Quet_, Jun 20 2009
%E Extended by _Emeric Deutsch_, Jun 26 2009