|
|
A066879
|
|
n such that there are as many 1's as 0's in the base 2 expansion of Floor(n/2).
|
|
4
|
|
|
4, 5, 18, 19, 20, 21, 24, 25, 70, 71, 74, 75, 76, 77, 82, 83, 84, 85, 88, 89, 98, 99, 100, 101, 104, 105, 112, 113, 270, 271, 278, 279, 282, 283, 284, 285, 294, 295, 298, 299, 300, 301, 306, 307, 308, 309, 312, 313, 326, 327, 330, 331, 332, 333, 338, 339, 340
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
n such that there are as many odd as even terms in the orbit f(n), f(f(n)), f(f(f(n))), ..., 1, where f(k) = Floor(k/2).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
floor(18/2) = 9 = 1001 (base 2) has the same number of 1's as 0's. So 18 is a term of the sequence.
Also the orbit corresponding to 18 is 9, 4, 2, 1, which has an equal number (i.e. 2) of odd and even terms.
|
|
MATHEMATICA
|
Select[Range[500], DigitCount[Floor[#/2], 2, 1]==DigitCount[Floor[#/2], 2, 0]&] (* Harvey P. Dale, Jan 14 2014 *)
|
|
CROSSREFS
|
Complement is the union of 1 and A126388.
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|