OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
39 in binary is 100111, which has two 0's and four 1's. 39+1 = 40 is 101000 in binary, which contains two 1's and four 0's. Since the number of 0's in binary 39 equals the number of 1's in binary 40, and because the number of 1's in binary 39 equals the number of 0's in binary 40, then 39 is in the sequence.
MAPLE
MATHEMATICA
Select[Range[400], DigitCount[#, 2, 0]==DigitCount[#+1, 2, 1]&&DigitCount[#, 2, 1]==DigitCount[#+1, 2, 0]&] (* Harvey P. Dale, Nov 02 2024 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 11 2009
EXTENSIONS
Extended beyond a(8) by R. J. Mathar, Aug 01 2009
STATUS
approved