|
|
A131323
|
|
Odd numbers whose binary expansion ends in an even number of 1's.
|
|
22
|
|
|
3, 11, 15, 19, 27, 35, 43, 47, 51, 59, 63, 67, 75, 79, 83, 91, 99, 107, 111, 115, 123, 131, 139, 143, 147, 155, 163, 171, 175, 179, 187, 191, 195, 203, 207, 211, 219, 227, 235, 239, 243, 251, 255, 259, 267, 271, 275, 283, 291, 299, 303, 307, 315, 319, 323, 331
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Also numbers of the form (4^a)*b - 1 with positive integer a and odd integer b. The sequence has linear growth and the limit of a(n)/n is 6. - Stefan Steinerberger, Dec 18 2007
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
11 in binary is 1011, which ends with two 1's.
|
|
MAPLE
|
N:= 1000: # to get all terms up to N
Odds:= [seq(2*i+1, i=0..floor((N-1)/2)]:
f:= proc(n) local L, x;
L:= convert(n, base, 2);
x:= ListTools:-Search(0, L);
if x = 0 then type(nops(L), even) else type(x, odd) fi
end proc:
|
|
MATHEMATICA
|
Select[Range[500], OddQ[ # ] && EvenQ[FactorInteger[ # + 1][[1, 2]]] &] (* Stefan Steinerberger, Dec 18 2007 *)
en1Q[n_]:=Module[{ll=Last[Split[IntegerDigits[n, 2]]]}, Union[ll] =={1} &&EvenQ[Length[ll]]]; Select[Range[1, 501, 2], en1Q] (* Harvey P. Dale, May 18 2011 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|