OFFSET

1,2

LINKS

Michael De Vlieger, Table of n, a(n) for n = 1..14031 (all terms k <= 2^14).

Jason Bell, Thomas Finn Lidbetter, and Jeffrey Shallit, Additive Number Theory via Approximation by Regular Languages, arXiv:1804.07996 [cs.FL], 2018.

Thomas Finn Lidbetter, Counting, Adding, and Regular Languages, Master's Thesis, University of Waterloo, Ontario, Canada, 2018.

FORMULA

a(n) ~ n. - Charles R Greathouse IV, Apr 18 2020

EXAMPLE

From Michael De Vlieger, Feb 07 2019: (Start)

11 (binary 1011) has more 1's than 0's, thus it is in the sequence.

12 (binary 1100) has an equal number of 0's and 1's, thus it is not in the sequence.

(End)

MATHEMATICA

Select[Range@ 77, UnsameQ @@ DigitCount[#, 2] &] (* Michael De Vlieger, Feb 07 2019 *)

PROG

(PARI) is(n)=2*hammingweight(n)!=exponent(n)+1 \\ Charles R Greathouse IV, Apr 18 2020

CROSSREFS

KEYWORD

nonn,base,easy

AUTHOR

STATUS

approved