login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A083567 Let B(n) be the number of binary digits in n equal to 1. This is the sequence of positive integers n such that 2B(n)=B(n^2). 4
21, 37, 42, 45, 53, 69, 73, 74, 81, 83, 84, 90, 106, 133, 137, 138, 141, 146, 148, 155, 161, 162, 165, 166, 168, 177, 180, 211, 212, 261, 265, 266, 269, 273, 274, 276, 281, 282, 289, 291, 292, 295, 296, 299, 310, 321, 322, 324, 330, 332, 336, 354, 359, 360 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

This includes all n > 1 such that the average of ones in the binary expansion of n is the same of the average of ones in binary expansion of n^2; these are the values in the sequence with sqrt(2)*2^k < a(n) < 2^(k+1) for some k. - Corrected by Franklin T. Adams-Watters, Aug 23 2012

Conjecture: The counting function p(n) satisfies p(n)=c n/log n + o(n/log n).

REFERENCES

G. Melfi, On a family of positive integer sequences, in preparation.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

G. Melfi, Su alcune successioni di interi, 2° Incontro Italiano di Teoria dei Numeri, Parma, 13-15 novembre 2003.

EXAMPLE

21 is in the sequence because 21=10101_2 (3 1's) and 441=110111001_2 (6 1's).

MAPLE

select(t -> 2*convert(convert(t, base, 2), `+`) = convert(convert(t^2, base, 2), `+`), [$1..1000]); # Robert Israel, Aug 27 2015

MATHEMATICA

f[n_] := Total@ IntegerDigits[n, 2]; Select[Range@ 360, 2 f@ # == f[#^2] &] (* Michael De Vlieger, Aug 27 2015 *)

PROG

(PARI) isok(n) =  norml2(binary(n^2)) == 2*norml2(binary(n)) \\ Michel Marcus, Jun 20 2013

CROSSREFS

Cf. A000120, A077436.

Sequence in context: A043751 A043759 A043768 * A109211 A224701 A050782

Adjacent sequences:  A083564 A083565 A083566 * A083568 A083569 A083570

KEYWORD

easy,nonn,base

AUTHOR

Giuseppe Melfi, Jun 13 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 4 09:03 EDT 2020. Contains 336201 sequences. (Running on oeis4.)