This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A360981 #19 Aug 07 2023 02:11:54 %S A360981 3,6,3,12,5,6,63,24,9,10,33,12,39,126,15,48,17,18,57,20,63,66,23,24, %T A360981 75,78,27,252,29,30,1023,96,33,34,105,36,111,114,39,40,123,126,43,132, %U A360981 45,46,141,48,147,150,51,156,53,54,165,504,57,58,177,60,183,2046 %N A360981 a(n) is the least positive multiple of n that is an evil number (A001969). %C A360981 This sequence is well defined: for any n > 0, A020330(n) is both a multiple of n and an evil number. %H A360981 Robert Israel, <a href="/A360981/b360981.txt">Table of n, a(n) for n = 1..10000</a> %F A360981 a(n) = A180938(n) * n. %F A360981 a(n) = n iff n belongs to A001969. %p A360981 f:= proc(n) local k; %p A360981 for k from n by n do %p A360981 if convert(convert(k,base,2),`+`)::even then return k fi %p A360981 od %p A360981 end proc: %p A360981 map(f, [$1..100]); # _Robert Israel_, Mar 29 2023 %t A360981 a[n_] := Module[{k = n}, While[OddQ[DigitCount[k, 2, 1]], k +=n]; k]; Array[a, 100] (* _Amiram Eldar_, Aug 07 2023 *) %o A360981 (PARI) a(n) = { forstep (m=n, oo, n, if (hammingweight(m)%2==0, return (m))) } %o A360981 (Python) %o A360981 def A360981(n): %o A360981 k = n %o A360981 while k.bit_count()&1: %o A360981 k += n %o A360981 return k # _Chai Wah Wu_, Feb 28 2023 %Y A360981 Cf. A001969, A020330, A180938, A360980 (variant for odious numbers). %K A360981 nonn,base,look %O A360981 1,1 %A A360981 _Rémy Sigrist_, Feb 27 2023