login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077459 Numbers k such that k and 3*k have the same digital binary sum. 6

%I #30 Sep 08 2022 08:45:07

%S 0,3,6,7,12,14,15,24,28,30,31,45,48,51,56,60,62,63,75,89,90,93,96,99,

%T 102,103,109,112,115,120,124,126,127,139,150,151,155,177,178,180,185,

%U 186,189,192,195,198,199,204,206,207,217,218,221,224,227,230,231,237

%N Numbers k such that k and 3*k have the same digital binary sum.

%C Numbers k such that valuation(C(3*k,k),2) = valuation(C(2*k,k),2). - _Benoit Cloitre_, Mar 20 2004

%C From _Robert Israel_, Dec 13 2018: (Start)

%C If n is in the sequence, then so is 2*n.

%C If m and n are in the sequence and 2^k>3*n then 2^k*m+n is in the sequence. (End)

%C Contains all terms of A000225 except 1. - _David A. Corneth_, Dec 13 2018

%C Let's call "primitive" those a(n) not of the form 2^k*a(i) + a(j) with 2^k > 3*a(j), i > 1. The primitive terms not of the form 2^n-1 are (45, 89, 93, 109, 139, 151, 177, 217, 221, 237, ...) = (101101, 1011001, 1011101, 1101101, 10001011, 10010111, 10110001, 11011001, 11011101, 11101101, ...) in binary. Are all of them of the form x*2^k + 1 or 2^k + x where x = 2^m - 2^n - 1, m > n+1 (base-2 repunit with one "interior" digit 0, so that 3x has one bit 1 less than x)? - _M. F. Hasler_, Dec 13 2018

%H Robert Israel, <a href="/A077459/b077459.txt">Table of n, a(n) for n = 1..10000</a>

%e 51 binary representation is [1, 1, 0, 0, 1, 1] and 3*51=153 binary representation is [1, 0, 0, 1, 1, 0, 0, 1], both binary sum = 4, hence 51 is in the sequence.

%p filter:= n -> convert(convert(n,base,2),`+`)=convert(convert(3*n,base,2),`+`):

%p select(filter, [$0..1000]); # _Robert Israel_, Dec 13 2018

%t digitSum[n_] := Total@IntegerDigits[n, 2]; Select[Range[0, 250], digitSum[#] == digitSum[3#] &] (* _Amiram Eldar_, Dec 13 2018 *)

%o (PARI) is(n)=hammingweight(n)==hammingweight(3*n) \\ _Charles R Greathouse IV_, Mar 27 2013

%o (Magma) [n: n in [0..300] | Valuation(Binomial(3*n, n), 2) eq Valuation(Binomial(2*n, n), 2)]; // _Vincenzo Librandi_, Dec 14 2018

%Y Cf. A000225.

%K base,nonn,easy

%O 1,2

%A _Benoit Cloitre_, Dec 01 2002

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)