OFFSET
1,2
COMMENTS
This sequence is well defined (see A178757).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local k;
for k from n by n do
if convert(convert(k, base, 2), `+`)::odd then return k fi
od
end proc:
map(f, [$1..100]); # Robert Israel, Mar 29 2023
MATHEMATICA
a[n_] := Module[{k = n}, While[EvenQ[DigitCount[k, 2, 1]], k +=n]; k]; Array[a, 100] (* Amiram Eldar, Aug 07 2023 *)
PROG
(PARI) a(n) = { forstep (m=n, oo, n, if (hammingweight(m)%2==1, return (m))) }
(Python)
def A360980(n):
k = n
while k.bit_count()&1^1:
k += n
return k # Chai Wah Wu, Feb 28 2023
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Feb 27 2023
STATUS
approved