OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
FORMULA
a(n) = n - A000265(n).
Sum_{k=1..n} a(k) ~ n^2/6. - Amiram Eldar, Sep 13 2024
MAPLE
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
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Feb 02 2020
STATUS
approved