login

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”).

A161788
a(n) is the largest integer of the form 2^k - 1 that divides n.
3
1, 1, 3, 1, 1, 3, 7, 1, 3, 1, 1, 3, 1, 7, 15, 1, 1, 3, 1, 1, 7, 1, 1, 3, 1, 1, 3, 7, 1, 15, 31, 1, 3, 1, 7, 3, 1, 1, 3, 1, 1, 7, 1, 1, 15, 1, 1, 3, 7, 1, 3, 1, 1, 3, 1, 7, 3, 1, 1, 15, 1, 31, 63, 1, 1, 3, 1, 1, 3, 7, 1, 3, 1, 1, 15, 1, 7, 3, 1, 1, 3, 1, 1, 7, 1, 1, 3, 1, 1, 15, 7, 1, 31, 1, 1, 3, 1, 7, 3, 1, 1
OFFSET
1,3
COMMENTS
a(n) = 2^A161789(n) - 1.
a(A161790(n)) = 1.
MAPLE
A161788 := proc(n) for k from ilog2(n+1) to 0 by -1 do if n mod (2^k-1) = 0 then RETURN(2^k-1); fi; od: end: seq(A161788(n), n=1..120) ; # R. J. Mathar, Jun 27 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 19 2009
EXTENSIONS
Extended by R. J. Mathar, Jun 27 2009
STATUS
approved