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 A358268 #33 Jan 20 2025 18:50:54 %S A358268 1,21,5,21,17,17,9,113,17,49,665,37,149,17,275,163,33,41,97,67,141,67, %T A358268 135,197,49,267,81,81,69,779,1163,69,325,49,587,837,281,197,293,49, %U A358268 147,677,67,651,647,67,793,277,353,49,1233,1177,165,775,721,353,817,69,647,709,209,1233,69,67,263 %N A358268 a(n) is the least number k > 0 such that the binary weight of k^n is n times the binary weight of k. %C A358268 a(n) is the least number k > 0 such that A000120(k^n) = n*A000120(k). %C A358268 All terms are odd. %C A358268 Conjecture: lim_{n -> infinity} a(n) = infinity. %H A358268 Chai Wah Wu, <a href="/A358268/b358268.txt">Table of n, a(n) for n = 1..10000</a> (n = 1..1004 from Robert Israel) %e A358268 a(3) = 5 because 5 = 101_2 and 5^3 = 1111101_2 so A000120(5) = 2, A000120(5^3) = 6 and 6 = 3*2. %p A358268 f:= proc(n) local k; %p A358268 for k from 1 by 2 do %p A358268 if convert(convert(k^n,base,2),`+`) = n*convert(convert(k,base,2),`+`) then return k %p A358268 fi %p A358268 od %p A358268 end proc: %p A358268 map(f, [$1..50]); %t A358268 a[n_] := Module[{k = 1}, While[Divide @@ DigitCount[k^{n, 1}, 2, 1] != n, k += 2]; k]; Array[a, 65] (* _Amiram Eldar_, Nov 07 2022 *) %o A358268 (Python) %o A358268 def a(n): %o A358268 k = 1 %o A358268 while bin(k**n).count("1") != n*bin(k).count("1"): k += 2 %o A358268 return k %o A358268 print([a(n) for n in range(1, 66)]) # _Michael S. Branicky_, Nov 06 2022 %o A358268 (Python) %o A358268 from itertools import count %o A358268 def A358268(n): return next(filter(lambda k:k.bit_count()*n==(k**n).bit_count(),count(1,2))) # _Chai Wah Wu_, Nov 07 2022 %o A358268 (PARI) a(n) = my(k=1); while (hammingweight(k^n) != n*hammingweight(k), k++); k; \\ _Michel Marcus_, Nov 07 2022 %Y A358268 Cf. A000120, A083567, A212314. %K A358268 nonn,base,look %O A358268 1,2 %A A358268 _Robert Israel_, Nov 06 2022