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 A261586 #13 Sep 08 2022 08:46:13 %S A261586 1,3,7,15,31,63,79,91,127,157,159,183,187,255,279,287,317,319,351,365, %T A261586 375,379,445,511,573,575,637,639,703,735,751,759,763,815,893,975,1023, %U A261586 1071,1087,1145,1149,1151,1215,1255,1277,1279,1407,1449,1455,1463 %N A261586 Odd numbers n such that the sum of the binary digits of n equals the sum of the binary digits of n^2. %C A261586 A077436 consists of elements of this sequence times powers of 2. %C A261586 Hare, Laishram, & Stoll show that this sequence is infinite. In particular for each k in {12, 13, 16, 17, 18, 19, 20, ...} there are infinitely many terms in this sequence with binary digit sum k. %C A261586 Subsequence of A077436. %H A261586 Charles R Greathouse IV, <a href="/A261586/b261586.txt">Table of n, a(n) for n = 1..10000</a> %H A261586 K. G. Hare, S. Laishram, and T. Stoll, <a href="http://arxiv.org/abs/1001.4170">The sum of digits of n and n^2</a>, International Journal of Number Theory 7:7 (2011), pp. 1737-1752. %H A261586 Giuseppe Melfi, <a href="http://www.arXiv.org/abs/math.NT/0402458">On simultaneous binary expansions of n and n^2</a>, arXiv:math/0402458 [math.NT], 2004. %e A261586 15 = 1111_2 and 15^2 = 11100001_2, both of which have a Hamming weight (sum of binary digits) equal to 4. %t A261586 Select[Range[1, 1463, 2], Total@ IntegerDigits[#, 2] == Total@ IntegerDigits[#^2, 2] &] (* _Michael De Vlieger_, Aug 29 2015 *) %o A261586 (PARI) is(n)=n%2 && hammingweight(n)==hammingweight(n^2) %o A261586 (Magma) [n: n in [1..1500 by 2] | &+Intseq(n, 2) eq &+Intseq(n^2, 2) ]; // _Vincenzo Librandi_, Aug 30 2015 %Y A261586 Cf. A077436, A254066. %K A261586 nonn,base %O A261586 1,2 %A A261586 _Charles R Greathouse IV_, Aug 25 2015