|
|
A223909
|
|
Numbers for which the maximal run of 1's in their binary representation contains odd number of 1's.
|
|
2
|
|
|
1, 2, 4, 5, 7, 8, 9, 10, 14, 16, 17, 18, 20, 21, 23, 28, 29, 31, 32, 33, 34, 36, 37, 39, 40, 41, 42, 46, 55, 56, 57, 58, 59, 62, 64, 65, 66, 68, 69, 71, 72, 73, 74, 78, 80, 81, 82, 84, 85, 87, 92, 93, 95, 103, 110, 112, 113, 114, 115, 116, 117, 118, 119, 124
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
We call these numbers "maxodious".
If a(n) is in the sequence, then 2^k*a(n) is in the sequence. If a(n)==0 (mod 4) is in the sequence, then a(n)+1 is in the sequence. If a(n)==0 (mod 8) is in the sequence, then a(n)+1, a(n)+2 are in the sequence.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
Select[Range[500], OddQ[Max[Map[Count[#, 1]&, Split[IntegerDigits[#, 2]]]]]&] (* Peter J. C. Moses, Mar 29 2013 *)
|
|
PROG
|
(PARI) A038374(n)=n>>=valuation(n, 2); if(n<2, return(n)); my(e=valuation(n+1, 2)); max(e, A038374(n>>e))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|