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!)
A331739 a(n) is n minus its largest odd divisor. 4
0, 1, 0, 3, 0, 3, 0, 7, 0, 5, 0, 9, 0, 7, 0, 15, 0, 9, 0, 15, 0, 11, 0, 21, 0, 13, 0, 21, 0, 15, 0, 31, 0, 17, 0, 27, 0, 19, 0, 35, 0, 21, 0, 33, 0, 23, 0, 45, 0, 25, 0, 39, 0, 27, 0, 49, 0, 29, 0, 45, 0, 31, 0, 63, 0, 33, 0, 51, 0, 35, 0, 63, 0, 37, 0, 57, 0, 39, 0, 75, 0, 41, 0, 63, 0, 43, 0, 77, 0, 45, 0, 69, 0, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) = n - A000265(n).
MAPLE
A331739 := proc(n)
n-A000265(n) ;
end proc:
seq(A331739(n), n=1..40) ; # R. J. Mathar, Jan 24 2022
MATHEMATICA
a[n_] := n - n/2^IntegerExponent[n, 2];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 19 2023 *)
PROG
(PARI) A331739(n) = (n-(n>>valuation(n, 2)));
(Python)
def A331739(n): return n-(n>>(~n & n-1).bit_length()) # Chai Wah Wu, Jul 01 2022
CROSSREFS
Cf. A129527 (even bisection).
Sequence in context: A132748 A022901 A348215 * A356169 A055945 A138123
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Feb 02 2020
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 August 22 04:50 EDT 2024. Contains 375356 sequences. (Running on oeis4.)