login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A161151 a(n) = (largest odd divisor of (n+1))*(largest power of 2 dividing n). 4
1, 6, 1, 20, 3, 14, 1, 72, 5, 22, 3, 52, 7, 30, 1, 272, 9, 38, 5, 84, 11, 46, 3, 200, 13, 54, 7, 116, 15, 62, 1, 1056, 17, 70, 9, 148, 19, 78, 5, 328, 21, 86, 11, 180, 23, 94, 3, 784, 25, 102, 13, 212, 27, 110, 7, 456, 29, 118, 15, 244, 31, 126, 1, 4160, 33, 134, 17, 276, 35 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n)*A161150(n) = n*(n+1) = A002378(n).
a(n) = A000265(n+1)*A006519(n).
a(2^k*(2*n-1) - 1) = 2*n-1 and a(2^k*(2*n-1)) = 2^k*(1 + 2^k*(2*n-1)), n >= 1 and k >= 1. - Johannes W. Meijer, Oct 31 2012
1 <= a(n) <= n^2 + n; both bounds are sharp. - Charles R Greathouse IV, Oct 31 2012
a(2*n-1) = A000265(n) and a(2*n) = 2*A182241(n) - Johannes W. Meijer, Dec 24 2012
MAPLE
nmax:=69: for n from 1 to nmax do for k from 1 to floor(log[2](nmax)) do a(2^k*(2*n-1) - 1) := 2*n-1; a(2^k*(2*n-1)) := 2^k*(1 + 2^k*(2*n-1)) od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Oct 31 2012
MATHEMATICA
Array[SelectFirst[Reverse@ Divisors[# + 1], OddQ]*2^IntegerExponent[#, 2] &, 69] (* Michael De Vlieger, Nov 02 2017 *)
PROG
(PARI) a(n)=(n+1)>>valuation(n+1, 2)<<valuation(n, 2) \\ Charles R Greathouse IV, Oct 31 2012
CROSSREFS
Sequence in context: A200091 A180733 A334504 * A146383 A264313 A096130
KEYWORD
nonn,easy
AUTHOR
Leroy Quet, Jun 03 2009
EXTENSIONS
Extended by Ray Chandler, Jun 11 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 3 21:01 EDT 2024. Contains 375675 sequences. (Running on oeis4.)