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 A357660 #29 Dec 21 2022 12:53:10 %S A357660 2,3,5,7,11,15,21,27,45,53,89,117,181,235,362,491,723,949,1241,1773, %T A357660 2891,3915,5747,7093,11309,16203,19637,31595,44491,64747,86581,113447, %U A357660 185269,244661,357081,453677,738539,980853,1481453,2079669,2965685,3923411,5931189,8222581 %N A357660 a(n) is the largest k such that k^2 has a maximal Hamming weight A357658(n) in the range 2^n <= k^2 < 2^(n+1). %H A357660 Hugo Pfoertner, <a href="/A357660/b357660.txt">Table of n, a(n) for n = 2..125</a>, including results from Bert Dobbelaere and from users l4m2, gsitcia, and anttiP in Code Golf challenge (terms 103..125) %H A357660 Code Golf Stackexchange, <a href="https://codegolf.stackexchange.com/questions/255529/smallest-and-largest-100-bit-square-with-maximum-hamming-weight">Smallest and largest 100-bit square with maximum Hamming weight</a>, fastest code challenge started Dec 15 2022. %e A357660 See A357658. %o A357660 (Python 3.10+) %o A357660 from math import isqrt %o A357660 def A357660(n): %o A357660 c = 0 %o A357660 for k in range(isqrt((1<<n)-1)+1,isqrt((1<<n+1)-1)+1): %o A357660 if (d:=(k**2).bit_count()) > c: %o A357660 c, m = d, k %o A357660 elif d == c: %o A357660 m = max(m,k) %o A357660 return m # _Chai Wah Wu_, Oct 14 2022 %o A357660 (C, x64asm, Rust, c++) see Code Golf link. %Y A357660 Cf. A000120, A000290, A357658, A357659. %K A357660 nonn,base %O A357660 2,1 %A A357660 _Hugo Pfoertner_, Oct 09 2022