OFFSET
1,1
COMMENTS
Every term of this sequence corresponds to a different term of sequence A031443 (Numbers that in base 2 have the same number of 0's as 1's). (See formula.) - Leroy Quet, Sep 05 2008
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
165 in binary is 10100101. This binary representation is a palindrome. And it has both four 0's and four 1's. So 165 is in the sequence.
MATHEMATICA
Select[Range[100000], Reverse[IntegerDigits[ #, 2]] == IntegerDigits[ #, 2] && DigitCount[ #, 2, 0] == DigitCount[ #, 2, 1] &] (* Stefan Steinerberger, Sep 05 2008 *)
PROG
(PARI) isok(n) = {my(b = binary(n)); (Vecrev(b) == b) && (hammingweight(n) == #b/2); } \\ Michel Marcus, Aug 01 2017
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Sep 04 2008
EXTENSIONS
More terms from Stefan Steinerberger and R. J. Mathar, Sep 05 2008
STATUS
approved