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
KEYWORD
base,nonn,easy
AUTHOR
Benoit Cloitre, Dec 01 2002
STATUS
approved