|
| |
|
|
A164707
|
|
A positive integer n is included if all runs of 1's in binary n are of the same length.
|
|
4
| |
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 21, 24, 27, 28, 30, 31, 32, 33, 34, 36, 37, 40, 41, 42, 48, 51, 54, 56, 60, 62, 63, 64, 65, 66, 68, 69, 72, 73, 74, 80, 81, 82, 84, 85, 96, 99, 102, 108, 112, 119, 120, 124, 126, 127, 128, 129, 130, 132, 133, 136
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,2
|
|
|
COMMENTS
| Clarification: A binary number consists of "runs" completely of 1's alternating with runs completely of 0's. No two or more runs all of the same digit are adjacent.
This sequence contains in part positive integers that each contain one run of 1's. For those members of this sequence each with at least two runs of 1's, see A164709.
|
|
|
MAPLE
| isA164707 := proc(n) local bdg, arl, lset ; bdg := convert(n, base, 2) ; lset := {} ; arl := -1 ; for p from 1 to nops(bdg) do if op(p, bdg) = 1 then if p = 1 then arl := 1 ; else arl := arl+1 ; end if; else if arl > 0 then lset := lset union {arl} ; end if; arl := 0 ; end if; end do ; if arl > 0 then lset := lset union {arl} ; end if; return (nops(lset) <= 1 ); end proc: for n from 1 to 300 do if isA164707(n) then printf("%d, ", n) ; end if; end do; [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 27 2010]
|
|
|
CROSSREFS
| A164708, A164709, A164710
Sequence in context: A108549 A045779 A062014 * A057890 A161604 A125121
Adjacent sequences: A164704 A164705 A164706 * A164708 A164709 A164710
|
|
|
KEYWORD
| base,nonn
|
|
|
AUTHOR
| Leroy Quet, Aug 23 2009
|
|
|
EXTENSIONS
| Extended beyond 42 by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 27 2010
|
| |
|
|