|
|
A153033
|
|
Numbers with adjacent 1's and no adjacent 0's in binary expansion.
|
|
2
|
|
|
3, 6, 7, 11, 13, 14, 15, 22, 23, 26, 27, 29, 30, 31, 43, 45, 46, 47, 53, 54, 55, 58, 59, 61, 62, 63, 86, 87, 90, 91, 93, 94, 95, 106, 107, 109, 110, 111, 117, 118, 119, 122, 123, 125, 126, 127, 171, 173, 174, 175, 181, 182, 183, 186, 187, 189, 190, 191, 213, 214, 215
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(1)=3 because bin(3)= 11.
|
|
MAPLE
|
filter:= proc(n) local L;
L:= convert(n, base, 2);
L:= L[1..-2]+L[2..-1];
has(L, 2) and not has(L, 0)
end proc:
|
|
MATHEMATICA
|
fQ[n_] := Block[{st = Union@ Split@ IntegerDigits[n, 2]}, MemberQ[st, {1, __}] && !MemberQ[st, {0, __}]]; Select[Range@218, fQ@# &] (* Robert G. Wilson v, Dec 21 2008 *)
Select[Range[300], SequenceCount[IntegerDigits[#, 2], {0, 0}]== 0 && SequenceCount[ IntegerDigits[#, 2], {1, 1}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 11 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|