Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #22 Aug 07 2023 02:12:06
%S 1,2,21,4,25,42,7,8,81,50,11,84,13,14,285,16,289,162,19,100,21,22,69,
%T 168,25,26,81,28,87,570,31,32,1089,578,35,324,37,38,117,200,41,42,301,
%U 44,405,138,47,336,49,50,357,52,265,162,55,56,171,174,59,1140,61
%N a(n) is the least multiple of n that is an odious number (A000069).
%C This sequence is well defined (see A178757).
%H Robert Israel, <a href="/A360980/b360980.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A178757(n) * n.
%F a(n) = n iff n belongs to A000069.
%p f:= proc(n) local k;
%p for k from n by n do
%p if convert(convert(k,base,2),`+`)::odd then return k fi
%p od
%p end proc:
%p map(f, [$1..100]); # _Robert Israel_, Mar 29 2023
%t a[n_] := Module[{k = n}, While[EvenQ[DigitCount[k, 2, 1]], k +=n]; k]; Array[a, 100] (* _Amiram Eldar_, Aug 07 2023 *)
%o (PARI) a(n) = { forstep (m=n, oo, n, if (hammingweight(m)%2==1, return (m))) }
%o (Python)
%o def A360980(n):
%o k = n
%o while k.bit_count()&1^1:
%o k += n
%o return k # _Chai Wah Wu_, Feb 28 2023
%Y Cf. A000069, A178757, A360981 (variant for evil numbers).
%K nonn,base,look
%O 1,2
%A _Rémy Sigrist_, Feb 27 2023