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!)
A077459 Numbers k such that k and 3*k have the same digital binary sum. 6
0, 3, 6, 7, 12, 14, 15, 24, 28, 30, 31, 45, 48, 51, 56, 60, 62, 63, 75, 89, 90, 93, 96, 99, 102, 103, 109, 112, 115, 120, 124, 126, 127, 139, 150, 151, 155, 177, 178, 180, 185, 186, 189, 192, 195, 198, 199, 204, 206, 207, 217, 218, 221, 224, 227, 230, 231, 237 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Numbers k such that valuation(C(3*k,k),2) = valuation(C(2*k,k),2). - Benoit Cloitre, Mar 20 2004

From Robert Israel, Dec 13 2018: (Start)

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

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

Contains all terms of A000225 except 1. - David A. Corneth, Dec 13 2018

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

LINKS

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

EXAMPLE

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.

MAPLE

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

select(filter, [$0..1000]); # Robert Israel, Dec 13 2018

MATHEMATICA

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

PROG

(PARI) is(n)=hammingweight(n)==hammingweight(3*n) \\ Charles R Greathouse IV, Mar 27 2013

(MAGMA) [n: n in [0..300] | Valuation(Binomial(3*n, n), 2) eq Valuation(Binomial(2*n, n), 2)]; // Vincenzo Librandi, Dec 14 2018

CROSSREFS

Cf. A000225.

Sequence in context: A028792 A325804 A144795 * A048717 A175332 A022434

Adjacent sequences:  A077456 A077457 A077458 * A077460 A077461 A077462

KEYWORD

base,nonn,easy

AUTHOR

Benoit Cloitre, Dec 01 2002

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 January 25 15:03 EST 2021. Contains 340416 sequences. (Running on oeis4.)