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 A083567 #29 Nov 06 2022 20:01:59 %S A083567 21,37,42,45,53,69,73,74,81,83,84,90,106,133,137,138,141,146,148,155, %T A083567 161,162,165,166,168,177,180,211,212,261,265,266,269,273,274,276,281, %U A083567 282,289,291,292,295,296,299,310,321,322,324,330,332,336,354,359,360 %N A083567 Let B(k) be the number of binary digits in k equal to 1. This is the sequence of positive integers k such that 2B(k)=B(k^2). %C A083567 This includes all k > 1 such that the average of ones in the binary expansion of k is the same of the average of ones in binary expansion of k^2; these are the values in the sequence with sqrt(2)*2^j < a(k) < 2^(j+1) for some j. - Corrected by _Franklin T. Adams-Watters_, Aug 23 2012 %C A083567 Conjecture: The counting function p(n) satisfies p(n)=c n/log n + o(n/log n). %H A083567 Robert Israel, <a href="/A083567/b083567.txt">Table of n, a(n) for n = 1..10000</a> %H A083567 Giuseppe Melfi, <a href="https://www.academia.edu/28977395/Su_alcune_successioni_di_interi">Su alcune successioni di interi</a>, 2° Incontro Italiano di Teoria dei Numeri, Parma, 13-15 novembre 2003. %H A083567 Giuseppe Melfi, <a href="https://arxiv.org/abs/math/0404555">On certain positive integer sequences</a>, arXiv:math/0404555 [math.NT], 30 Apr 2004. %e A083567 21 is in the sequence because 21=10101_2 (3 1's) and 441=110111001_2 (6 1's). %p A083567 select(t -> 2*convert(convert(t,base,2),`+`) = convert(convert(t^2,base,2),`+`), [$1..1000]); # _Robert Israel_, Aug 27 2015 %t A083567 f[n_] := Total@ IntegerDigits[n, 2]; Select[Range@ 360, 2 f@ # == f[#^2] &] (* _Michael De Vlieger_, Aug 27 2015 *) %o A083567 (PARI) isok(n) = norml2(binary(n^2)) == 2*norml2(binary(n)) \\ _Michel Marcus_, Jun 20 2013 %Y A083567 Cf. A000120, A077436, A159918. %K A083567 easy,nonn,base %O A083567 1,1 %A A083567 _Giuseppe Melfi_, Jun 13 2003