A223909 Numbers for which the maximal run of 1's in their binary representation contains odd number of 1's.
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
Offset: 1
Links
- Peter J. C. Moses, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[500],OddQ[Max[Map[Count[#,1]&,Split[IntegerDigits[#,2]]]]]&] (* Peter J. C. Moses, Mar 29 2013 *)
-
PARI
A038374(n)=n>>=valuation(n,2);if(n<2,return(n)); my(e=valuation(n+1,2)); max(e, A038374(n>>e)) is(n)=A038374(n)%2 \\ Charles R Greathouse IV, Jan 12 2014
Formula
Numbers n such that A038374(n) is odd. - Charles R Greathouse IV, Jan 12 2014
Comments